W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > January to March 2009

[Bug 6644] New: Context determined type table

From: <bugzilla@wiggum.w3.org>
Date: Mon, 02 Mar 2009 07:36:11 +0000
To: www-xml-schema-comments@w3.org
Message-ID: <bug-6644-703@http.www.w3.org/Bugs/Public/>

           Summary: Context determined type table
           Product: XML Schema
           Version: 1.1 only
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Structures: XSD Part 1
        AssignedTo: David_E3@VERIFONE.com
        ReportedBy: hrennau@yahoo.de
         QAContact: www-xml-schema-comments@w3.org
                CC: cmsmcq@blackmesatech.com

The definition of "context determined type table" uses an "effective type
table" - constructed from {type definition} - if the Element Declaration D has
no {type table}. The application of this definition in Conditional Type
Substitutable in Restriction ( has an inacceptable effect:

Let T1 be a complex type definition which contains a wildcard matched by one or
more global Element Declarations without {type table}. Then any type T2 derived
from T1 which contains a local Element Declaration overriding one of those
Element Declarations matching the wildcard is likely to make any element
validated against it invalid, if only that element contains a child element
whose name matches the overriding Element Declaration.

This follows from, clause 7, that is, the application of "Conditional
Type Substitutable in Restriction" to that child element. If the local element
declaration contains a type table, the element is invalid because it violates
Element Declarations Consistent (; if it does not contain an element
declaration, application of Conditional Type Substitutable in Restriction
( will probably result in ST != SB.

This is illustrated by the following example schema:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="e2" type="t2"/>
  <xs:element name="b" type="xs:integer"/>

  <xs:complexType name="t1">
      <xs:element name="a" type="xs:string"/>
      <xs:any processContents="skip"/>

  <xs:complexType name="t2">
      <xs:extension base="t1">
          <xs:element name="b" type="xs:date"/>


Any element validated against Element Declaration e2 will be invalid, because
applying "Conditional Type Substitutable in Restriction" to child element b
(with T=t2, B=t1) yields:
ST = xs:date
SB = xs:integer

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, 2 March 2009 07:36:22 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:50:09 UTC