[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Creating a XML Schema for an existing database
> Because the REC says they can: Thanks for the link Henry-- I kind of figured that was the case because it seemed very intuitive. Though it didn't appear in the example, I figured that if one value had been nonNegativeInteger and another integer (and both values were positive) then they should be comparable. I remember reading something somewhere about comparability for XS datatypes (maybe in that spec) but didn't have time to look for it. "Values of differing type can only be equal if one type is derived from the other, and the value is in the value space of both." This explains why Xerces and XSV allow comparison of anySimpleType and xs:string-- but it shows that they are inconsistent in not allowing comparison between anySimpleType and xs:integer. "The simple ur-type definition is a special restriction of the ur-type definition whose name is anySimpleType in the XML Schema namespace. anySimpleType can be considered as the ·base type· of all ·primitive· datatypes. anySimpleType is considered to have an unconstrained lexical space and a ·value space· consisting of the union of the ·value space·s of all the ·primitive· datatypes and the set of all lists of all members of the ·value space·s of all the ·primitive· datatypes." [1] xs:integer is a derived type from the primitive xs:decimal which according to the above should be considered derived from anySimpleType. (I know you know all this, I am just putting it here for completeness) Hence the simple ur-type and xs:integer should be comparable but none of the three implementations tested allow it. So, should it not be considered a bug? [1] http://www.w3.org/TR/xmlschema-2/#decimal#dt-anySimpleType Thanks, Jeff Rafter
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|