- From: <bugzilla@jessica.w3.org>
- Date: Mon, 10 Jan 2011 12:38:32 +0000
- To: public-qt-comments@w3.org
http://www.w3.org/Bugs/Public/show_bug.cgi?id=11713
Summary: [XPath 3.0] Rules for union types
Product: XPath / XQuery / XSLT
Version: Working drafts
Platform: PC
OS/Version: Windows NT
Status: NEW
Severity: normal
Priority: P2
Component: XPath 3.0
AssignedTo: jonathan.robie@redhat.com
ReportedBy: mike@saxonica.com
QAContact: public-qt-comments@w3.org
We currently say in 2.5.4.2
If the expanded QName of an AtomicOrUnionType is not defined as an atomic type
or a union type in the in-scope schema types, a static error is raised
[err:XPST0051].
We should restrict this so that the only union types allowed are what I will
call "plain union types". A plain union type is one whose base type is
xs:anySimpleType (that is, it is defined directly as the union of a number of
atomic types, as opposed to a union type that is derived by restriction from
another union type).
The reason for this rule is that no atomic value will ever be an instance of a
non-plain union type; it is pointless to allow such types to be used, for
example in a function signature as the type could never be satisfied.
We can then change this Note:
<old>
Note:
The current (second) edition of XML Schema 1.0 contains an error in respect of
the substitutability of a union type by one of its members: it fails to
recognize that this is unsafe if the union is derived by restriction from
another union. This problem is fixed in the current working draft of XML Schema
1.1, and implementers are advised to adopt the solution given there. It is
likely that this specification will be updated to refer normatively to XML
Schema 1.1 when that specification reaches Recommendation status.
</old>
to read:
<new>
Note:
The current (second) edition of XML Schema 1.0 contains an error in respect of
the substitutability of a union type by one of its members: it fails to
recognize that this is unsafe if the union is derived by restriction from
another union. This problem is fixed in XSD 1.1, but the effect of the
resolution is that an atomic value labeled with an atomic type cannot be
treated as being substitutable for a union type without explicit validation.
This specification therefore allows union types to be used as item types only
if they are defined directly as the union of a number of atomic types.
</new>
--
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Monday, 10 January 2011 12:38:34 UTC