This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 2330 - How to redefine a component in an included schema document
Summary: How to redefine a component in an included schema document
Status: CLOSED LATER
Alias: None
Product: XML Schema
Classification: Unclassified
Component: Structures: XSD Part 1 (show other bugs)
Version: 1.0/1.1 both
Hardware: All All
: P3 normal
Target Milestone: ---
Assignee: C. M. Sperberg-McQueen
QA Contact: XML Schema comments list
URL:
Whiteboard: important, hard; composition cluster
Keywords: resolved
Depends on:
Blocks:
 
Reported: 2005-10-06 18:25 UTC by Sandy Gao
Modified: 2009-04-21 19:21 UTC (History)
0 users

See Also:


Attachments

Description Sandy Gao 2005-10-06 18:25:07 UTC
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.
Comment 1 C. M. Sperberg-McQueen 2007-08-03 18:36:42 UTC
On its telcon today, the Working Group discussed this and other issues
related to schema composition and concluded (not without some pangs of
regret) that for scheduling reasons it is not feasible for us to
resolve them before we go to Last Call.

The WG continues to believe that this issue is important and should be
resolved; our decision to close the issue for now reflects the fact
that we have not been able to reach consensus on how to resolve the
problems related to composition, coupled with the observation that for
the most part, users are able to avoid the problems by avoiding
problematic constructs in their schema documents.  The cost of
delaying XSDL 1.1 for these issues is thus high, while the practical
benefit for users is not as high as it might be.

The Working Group continues to hope that this issue can be resolved at
some point in the future.  Accordingly I am closing this issue with a
disposition of LATER.  
Comment 2 C. M. Sperberg-McQueen 2008-05-29 06:32:10 UTC
A wording proposal intended to resolve this issue in part is at
http://www.w3.org/XML/Group/2004/06/xmlschema-1/structures.b2224.html
(memger-only link).

The resolution is only partial, because the proposal does not actually
repair any problems directly; it only deprecates xs:redefine in order
to warn schema authors away from it and make it possible to remove
the feature at some future date.