[Bug 5652] Constuctors for union types

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

           Summary: Constuctors for union types
           Product: XPath / XQuery / XSLT
           Version: Recommendation
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Functions and Operators
        AssignedTo: mike@saxonica.com
        ReportedBy: nick@cbcl.co.uk
         QAContact: public-qt-comments@w3.org


Imagine a schema defining my:sizeType

  <xs:simpleType name="sizeType">
    <xs:union memberType="xs:integer xs:string"/>
  </xs:simpleType>

The various specifications seem to suggest such a constructor exists (5.4) but
do not appear to be clear as to what the behaviour of a constructor for such a
union type should be.

So for example, should

my:sizeType("123") instance of xs:integer

return true, false, or throw an exception (for the constructor being invalid -
if so which?).

Our thoughts are that the behaviour should be the same as during schema
validation (so should map to an xs:integer and hence return true), but are
unable to find anything definite in the specification to confirm this.

Received on Tuesday, 22 April 2008 13:29:46 UTC