W3C home > Mailing lists > Public > public-qt-comments@w3.org > April 2008

[Bug 5652] Constuctors for union types

From: <bugzilla@farnsworth.w3.org>
Date: Tue, 22 Apr 2008 13:29:11 +0000
CC:
To: public-qt-comments@w3.org
Message-Id: <E1JoIYZ-00064I-Du@farnsworth.w3.org>

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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:22 UTC