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 5918 - Top level declarations
Summary: Top level declarations
Status: CLOSED FIXED
Alias: None
Product: XML Schema
Classification: Unclassified
Component: Structures: XSD Part 1 (show other bugs)
Version: 1.1 only
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: C. M. Sperberg-McQueen
QA Contact: XML Schema comments list
URL:
Whiteboard:
Keywords: editorial, resolved
Depends on:
Blocks:
 
Reported: 2008-07-30 22:29 UTC by Michael Kay
Modified: 2009-03-16 13:27 UTC (History)
1 user (show)

See Also:


Attachments

Description Michael Kay 2008-07-30 22:29:44 UTC
NOTE: it might be best to fix these problems by making greater and more formal use of the adjective "top-level" which is currently used throughout the specification but apparently has no definition.

In 3.2.2 "If the <attribute> element information item has <schema> as its parent..." should be "If the <attribute> element information item has <schema> or <override> as its parent..."

Similarly in 3.2.2.1; and for the {targetNamespace} property "parent <schema> element" should be "ancestor <schema> element".

In 3.2.3, the rule "If the item's parent is not <schema>" needs to be "... not <schema> or <override>"

In 3.3.2, "<element>s within <schema> " needs to be "<element>s within <schema> or <override"> (except that "within" is really a bit sloppy)

In the same section, "If the <element> element information item has <schema> as its parent" needs to add "or <override".

In 3.3.3.2 "If the <element> element information item has <schema> as its parent" needs to add "or <override>" and for the {targetNamespace} property "parent <schema> element" should be "ancestor <schema> element".

In 3.3.3 the rule "If the item's parent is not <schema>" needs to add "or <override>"

In 3.6.2.1 "When an <attributeGroup> appears as a &#8593;child&#8593; of <schema> or <redefine>" needs to add "or <override>"

In 3.7.2 "If there is a name [attribute] (in which case the item will have <schema> or <redefine> as parent)" needs to add "or <override>"

In 3.9.2 "<element> not immediately within <schema>" needs to add "or <override>", and "<group> not immediately within <schema>" similarly.

In 3.17.2, in the XML Mapping Summary, phrases like "The simple and complex type definitions corresponding to all the <simpleType> and <complexType> element information items in the [children], if any," fail to allow for <redefine> or <override>.
Comment 1 Sandy Gao 2009-02-26 20:58:30 UTC
Given that we use an XSLT transformation to handle <override>, schema processors, in theory, do not need to deal with things under <override> directly, so most of the suggested changes do not apply.

It seems only the last change in 3.17 needs to be made, for <redefine>.

On the general question, we could define terms like "global" and "top-level". I would prefer to use global for components in the schema (those globally accessible) and top-level for definition items in schema documents (those under <schema> or <redefine>), because there are components that are global but not top-level (e.g. identity constraints), and definition items that are top-level but not global (e.g. those being redefined). Thoughts?
Comment 2 Sandy Gao 2009-03-16 13:22:37 UTC
During its 2009-03-13 telecon, the schema WG adopted a proposal to address this issue.

The proposal can be found at (member-only):
  http://www.w3.org/XML/Group/2004/06/xmlschema-1/structures.omni.20090313.html

The only changes are in section "3.17.2 XML Representations of Schemas", where <redefine> is taken into account when the properties for global components are discussed.

With these change, the WG believes that the issue raised in this bug report is addressed. I'm marking this RESOLVED accordingly.

Michael, as the persons who opened and reopened this issue, if you would indicate your concurrence with or dissent from the WG's disposition of the comment by closing or reopening the issue, we'll be grateful. If we don't hear from you in the next two weeks, we'll assume that silence implies consent.