Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [Updated] XML Schema 1.1 Tutorial

From: "Michael Kay" <mike@--------.--->
To: "'Costello, Roger L.'" <costello@-----.--->, <xmlschema-dev@--.--->
Date: 7/30/2009 1:12:00 PM
> 108 shows an xsd:alternative element with an inline simple type 
> definition.  This is not strictly speaking illegal or 
> impossible, but since the element in question is being handled with 
> conditional type 
> assignment it will typically have attributes, and if it has any 
> attributes, it won't be legal against any simple type.  So a simple 
> type will be a possible alternative type only when the tests are 
> rather unusual.  The use of a simple type is most plausible if all the 
> tests relate to some inherited attribute.
> 

Another plausible scenario is for one alternative to be a complex type with
simple content (where an attribute exists) and for another alternative to be
a simple type (where the attribute doesn't exist). I'm not quite sure if
that works, without checking the detailed rules, but it's a reasonable
scenario. It could arise where version 1 of a schema had
<weight>200g</weight>, and version 2 retains that format for backwards
compatibility, but also allows <weight units="g">200</weight>

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay 




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent