Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   XML (http://www.velocityreviews.com/forums/f32-xml.html)
-   -   Can XSD simple types be derived from complex types? (http://www.velocityreviews.com/forums/t170254-can-xsd-simple-types-be-derived-from-complex-types.html)

Soren Kuula 11-30-2005 04:26 PM

Can XSD simple types be derived from complex types?
 
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

Soren Kuula 11-30-2005 04:37 PM

Re: Can XSD simple types be derived from complex types?
 
Soren Kuula wrote:
> 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

Henry S. Thompson 12-01-2005 07:51 PM

Re: Can XSD simple types be derived from complex types?
 
Soren Kuula writes:

> 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: ht@inf.ed.ac.uk
URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]


All times are GMT. The time now is 07:04 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.