[Bug 2768] [XDM] constructing list of union types from PSVI

http://www.w3.org/Bugs/Public/show_bug.cgi?id=2768

           Summary: [XDM]  constructing list of union types from PSVI
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Data Model
        AssignedTo: Norman.Walsh@Sun.COM
        ReportedBy: joannet@ca.ibm.com
         QAContact: public-qt-comments@w3.org


When recursively applying the typed value determination rules in section 
3.3.1.2 of XDM, a list of union types is not handled properly because the 
current rules assume each item in the list has associated [member type 
definition]*  properties.

For example:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           targetNamespace="http://example.org/list"
           xmlns:li="http://example.org/list">
  <xs:simpleType name="unionType">
    <xs:union memberTypes="xs:integer xs:float"/>
  </xs:simpleType>

  <xs:simpleType name="listType">
    <xs:list itemType="li:unionType"/>
  </xs:simpleType>

  <xs:element name="e" type="li:listType"/>
</xs:schema>

  
As is currently defined, when element e is encountered, the last rule in the 
bulleted list applies to the information item which results from schema 
assessment - the type T is li:listType, whose {variety} is list.  The {item 
type definition} is li:unionType, so it becomes T for the recursive 
application of the rules for each space-separated member of the [schema 
normalized value].  The {variety} of T is now union, and the fourth bullet 
applies, which relies upon either the [member type definition] or [member type 
definition anonymous] property, but neither of those properties exists for 
this information item, so the typed value determination process breaks down.

     In order for the typed value determination to work for list of union, the 
PSVI element information item would have to have [member type definition *] 
properties for each item in the list, which is not the case in "Schema:  
Structures 1.0", nor in the draft of 1.1.  That could be accomplished through 
a change to XML Schema or by XDM repeating the validation process for the 
union type on each member of the space-separated list of lexical forms in 
[schema normalized value] in order to compute the [member type definition *] 
properties.

Received on Wednesday, 25 January 2006 14:06:56 UTC