Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [xml-dev] Using xsi:type for traversing the derivation hierarchy

From: "Michael Kay" <mike@--------.--->
To: "'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>


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