OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   XQuery/XPath 2.0 Data Model - values of union types

[ Lists Home | Date Index | Thread Index ]

A union type may ambiguously match more than one string. In section 5, "The
values of nodes whose type is derived by union from an XML Schema primitive
type are represented by a sequence of atomic values each of whose type is
one of the individual types from the union. The union type information is
lost and only the specific types of each individual item is retained.

1. (Nit) Shouldn't this be "...derived by union from XML Schema primitive
types..."?

2. Given the following:

<element name="ambig">
  <simpleType>
    <union memberTypes="xs:integer xs:string"/>
  </simpleType>
</element>

And an instance:

<ambig>5</ambig>

Then is the value of this node the sequence (5, "5")? If so, what is the
reason for preserving both values? Are they used elsewhere? This treatment
seems inconsistent with that given non-primitive types, like list. If not,
and the value is (5) please ignore the remaining questions and explain what
the paragraph in question really means?

3. If so, is this the value returned by the dm:typed-value accessor for the
node described in 4.3.2?

4. Whether the answer is (5) or (5, "5") I would guess the dm:type accessor
would return xs:integer and this would be the value of type in the data
model, as this is the value consistent with validation?

Bob





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS