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

[Bug 7913] New: Strange result from definition of governing element declaration

From: <bugzilla@wiggum.w3.org>
Date: Tue, 13 Oct 2009 21:16:33 +0000
To: www-xml-schema-comments@w3.org
Message-ID: <bug-7913-703@http.www.w3.org/Bugs/Public/>

           Summary: Strange result from definition of governing element
           Product: XML Schema
           Version: 1.1 only
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Structures: XSD Part 1
        AssignedTo: David_E3@VERIFONE.com
        ReportedBy: kbraun@obj-sys.com
         QAContact: www-xml-schema-comments@w3.org
                CC: cmsmcq@blackmesatech.com

The definition of governing element declaration seems to produce an odd effect.
 According to the rules, when there is no processor-stipulated decl, and no
context-determined decl, but there is a locally declared type, the governing
element declaration is absent.

Consider this example:
<xs:element name="elem1" type="xs:int" fixed="10"/>
<xs:element name="elem2" type="xs:int" fixed="10"/>

<xs:element name="root" type="OddBall"/>

<xs:complexType name="OddBall">
      <xs:element name="elem1" type="xs:int"/>

And consider this instance:

The second elem1 is attributed to a strict wildcard; it does not have a
context-determined declaration.  It does have a locally declared type, the
local elem1 declaration.  The result is that elem1 does not have a governing
declaration, and it not required to meet the fixed value constraint.  However,
elem2 is in a fairly parallel situation, but it will have a governing element
declaration and elem2's fixed value will apply.

Perhaps I have missed something, but this seems quite odd to me.  I can't quite
make out why 3.3 in the definition of governing element declaration is there. 
Also, it looks like this is different behavior from XSD 1.0.

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, 13 October 2009 21:16:34 UTC

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