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
Message-Id: <E1ENaQV-0004cc-JA@wiggum.w3.org>


           Summary: How to redefine a component in an included schema
           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 

<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 
- 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 UTC

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