Can XSD simple types be derived from complex types?

S

Soren Kuula

Looks like a silly question? I'm in doubt!

- the Recommendation does it (anyType / anySimple type)

- it's possible to restrict away all optional elements and attributes
from a mixed complex type. If doing that on a type where all elements
and attributes are optional, does that leave one with the equivalent of
anySimpleType, then?

Soren
 
S

Soren Kuula

Soren said:
Looks like a silly question? I'm in doubt!

- the Recommendation does it (anyType / anySimple type)

- it's possible to restrict away all optional elements and attributes
from a mixed complex type. If doing that on a type where all elements
and attributes are optional, does that leave one with the equivalent of
anySimpleType, then?

Soren

-- or is the answer: It's possible enough in the way I said, but XSD
doesn't provide for it syntactically?

Soren
 
H

Henry S. Thompson

Soren said:
Looks like a silly question? I'm in doubt!

- the Recommendation does it (anyType / anySimple type)

That's special-cased.
- it's possible to restrict away all optional elements and attributes
from a mixed complex type. If doing that on a type where all elements
and attributes are optional, does that leave one with the equivalent
of anySimpleType, then?

Not really -- such a type defn would have untyped content, not quite
the same as anySimpleType -- _but_ you can derive a complex type defn
with simple content, e.g. xs:date, from an emptiable mixed complex
type defn.

ht
--
Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
Half-time member of W3C Team
2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
Fax: (44) 131 650-4587, e-mail: (e-mail address removed)
URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,001
Messages
2,570,254
Members
46,850
Latest member
VMRKlaus8

Latest Threads

Top