[Bug 7749] New: [XPath 2.0] derives-from() and union types

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

           Summary: [XPath 2.0] derives-from() and union types
           Product: XPath / XQuery / XSLT
           Version: Recommendation
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XPath
        AssignedTo: jonathan.robie@redhat.com
        ReportedBy: mike@saxonica.com
         QAContact: public-qt-comments@w3.org


We allow an ItemType in a SequenceType to take the form element(N, U) or
attribute(N, U) where U is a union type defined in the schema. But under the
rules for the derives-from() function, no element or attribute will ever match
such a sequence type, because the type annotation of the element or attribute
will never be a union type (it will always be one of its member types), and
derives-from() requires derivation by restriction or extension: a member type
of a union is not derived by restriction or extension from the union type.

This also affects schema-element(N) or schema-attribute(N) if the element or
attribute declaration for N has a declared type that is a union type.

In 2.5.4, the first rule "1. AT is a schema type found in the in-scope schema
definitions, and is the same as ET or is derived by restriction or extension
from ET" should be changed to "1. AT is validly derived from ET given the empty
set [of blocked derivation methods] as defined in [XSD 1.0] by Type Derivation
OK (Complex) (§3.4.6) or Type Derivation OK (Simple) (§3.14.6), as
appropriate." This also affects the rule numbered 1 in the second list.

Note that the schema rules for Type Derivation OK allow transitive derivation,
thus obviating the need for our rule 3.

Complicating matters, there is a bug in XSD 1.0 whereby the rules for simple
type substitutability do not correctly take account of a union type that is
derived by restriction from another union. This bug is fixed in XSD 1.1.


-- 
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 Tuesday, 29 September 2009 09:01:30 UTC