[Bug 5940] New: Element Declarations Consistent

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

           Summary: Element Declarations Consistent
           Product: XML Schema
           Version: 1.1 only
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Structures: XSD Part 1
        AssignedTo: cmsmcq@w3.org
        ReportedBy: mike@saxonica.com
         QAContact: www-xml-schema-comments@w3.org


In section 3.8.6.3 we read:

<quote>
If the {particles} property contains, either directly, indirectly (that is,
within the {particles} property of a contained model group, recursively), or
·implicitly·, both one or more element declarations with the same expanded name
and one or more ·wildcard particles· which ·match· the same expanded name as
the element declarations, then the {type table}s of the element declarations
and the {type table} of any top-level element declaration with the same
expanded name must either all be ·absent· or else all be present and have the
same sequence of {alternatives} and the same {default type definition}.
</quote>

Firstly, this seems to be a new rule added since 1.0, and it appears to
introduce a backwards incompatibility.

Secondly, it's not clear what it achieves. It means that with a strict
wildcard, an element <a> that matches an explicit element particle will always
get the same type as an element <a> that matches the wildcard. But the rule
also applies to lax and skip wildcards, and they offer no such guarantee.

It seems that despite "Element Declarations Consistent", XML Schema 1.0 allowed
a content model of the form

  <xs:element name="X" type="xs:integer"/>
  <xs:any namespace="##local" processContents="strict"/>

with the global element declaration for X having type="xs:date"; and this is
now being disallowed.


-- 
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 Thursday, 7 August 2008 11:56:18 UTC