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

[Bug 2330] How to redefine a component in an included schema document

From: <bugzilla@wiggum.w3.org>
Date: Thu, 06 Oct 2005 18:25:07 +0000
To: www-xml-schema-comments@w3.org
Cc:
Message-Id: <E1ENaQV-0004cc-JA@wiggum.w3.org>

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

           Summary: How to redefine a component in an included schema
                    document
           Product: XML Schema
           Version: 1.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSD Part 1: Structures
        AssignedTo: ht@w3.org
        ReportedBy: sandygao@ca.ibm.com
         QAContact: www-xml-schema-comments@w3.org


Consider 3 schema documents A, B, and C for the same target namespace. B 
includes A; C wants to redefine B by modifying a component define in A. Is this 
possible?

<redefine schemaLocation="B">
  <simpleType name="aTypeDefinedInA">

In section 4.2.2 of the structure spec,
"In all cases there must be a top-level definition item of the appropriate name 
and kind in the <redefine>d schema document."

Note that it says "redefined schema document", which implies that the above 
redefinition is invalid. Then how would one write such a C?

<include schemaLocation="B"/>
<redefine schemaLocation="A">
  <simpleType name="aTypeDefinedInA">

will probably give "duplicate component" for aTypeDefinedInA, because you get 
it both from B and from the redefinition.

Possible solutions:
- No way to define such a C
- Make the second approach (include+redefine) work: it doesn't have duplicate 
components
- Make the first approach work: redefine schemas as opposed to redefine schema 
documents. That is, loose the cited constraints.
Received on Thursday, 6 October 2005 18:25:30 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:13:09 GMT