Altova Mailing List Archives>Archive Index >xml-dev Archive Home >Recent entries >Thread Prev - Using xsi:type for traversing the derivation hierarchy [Thread Next] RE: [xml-dev] Using xsi:type for traversing the derivation hierarchyTo: "'Eran Balter'" <E.Balter@--.--->,<xml-dev@-----.---.---> Date: 4/4/2008 6:56:00 AM >Are there derivation relationships between listOfFloat and float? XML Schema 1.0 sometimes uses the terminology that listOfFloat is "derived by list" from float. The preferred terminology however is that listOfFloat is "constructed by list", rather than being derived by list. >Can I write the following XML instance? <o:p></o:p> <listOfFloat xsi:type=”float”>4.5</listOfFloat> Assuming the declared type of element listOfFloat is type listOfFloat, no. The type referenced in xsi:type must satisfy Type Derivation OK (Simple Type) in relation to the declared type, and this doesn't. The rules are in http://www.w3.org/TR/xmlschema-1/#cos-st-derived-ok Michael Kay http://www.saxonica.com/ <o:p></o:p> <o:p></o:p> From: Eran Balter [mailto:E.Balter@F...] Sent: 03 April 2008 21:49 To: xml-dev@l... Subject: [xml-dev] Using xsi:type for traversing the derivation hierarchy Hi,<o:p></o:p> <o:p> </o:p> If I define a list of built-in types, such as an integer, are there derivation relations between the list and integer, for example:<o:p></o:p> <simpleType name='listOfFloat'><o:p></o:p> <list itemType='float'/><o:p></o:p> </simpleType><o:p></o:p> Are there derivation relationships between listOfFloat and float?<o:p></o:p> <o:p> </o:p> Can I write the following XML instance? <o:p></o:p> <listOfFloat xsi:type=”float”>4.5</listOfFloat><o:p></o:p> <o:p> </o:p> Regards,<o:p></o:p> Eran<o:p></o:p> | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
