W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > April to June 2010

[Bug 9661] New: Ambiguity: overriding components that don't exist

From: <bugzilla@jessica.w3.org>
Date: Wed, 05 May 2010 11:07:46 +0000
To: www-xml-schema-comments@w3.org
Message-ID: <bug-9661-703@http.www.w3.org/Bugs/Public/>

           Summary: Ambiguity: overriding components that don't exist
           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: David_E3@VERIFONE.com
        ReportedBy: mike@saxonica.com
         QAContact: www-xml-schema-comments@w3.org
                CC: cmsmcq@blackmesatech.com

Section 4.2.5 contains in a Note the sentence "Source declarations not present
in the target set of E cannot be overridden". A casual reader might interpret
this as saying that it's an error to have an element declaration with name="N"
as a child of xs:override if there is no element declaration in the "target
set" (that is, the schema being overridden) with name "N". In fact, careful
reading of the override transformation shows that this is not the case.

So what exactly is it saying? It's presumably saying something about source
declarations that actually exist but are not part of the target set. If those
source declarations are in the wrong namespace, then it's a fact that you can't
override them, because there is no mechanism to refer to them. Perhaps it's
just pointing out that fact. But can there be source declarations in the right
namespace that are not part of the target set? It seems there can: for example
if A includes both B and C, and C overrides D, then a declaration in
C/xs:override will conflict with a like-named declaration in B, rather than
overriding it (xs:override, unlike xs:redefine, is not pervasive).

It might be helpful to rephrase the sentence along the lines: "If there is no
source declaration in the target set that matches a declaration E appearing as
a child of xs:override, then E is processed exactly as if it appeared directly
as a child of xs:schema. In consequence, E can conflict with like-named
declarations contained in schema documents that are not part of the target

It might also be helpful to point out that a complex type declaration cannot
override a simple type declaration, or vice versa, even though they share the
same symbol space. At the moment, I think you have to read the XSLT code to
discover this.

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 Wednesday, 5 May 2010 11:07:47 UTC

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