<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>5918</bug_id>
          
          <creation_ts>2008-07-30 22:29:44 +0000</creation_ts>
          <short_desc>Top level declarations</short_desc>
          <delta_ts>2009-03-16 13:27:17 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XML Schema</product>
          <component>Structures: XSD Part 1</component>
          <version>1.1 only</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>editorial, resolved</keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Kay">mike</reporter>
          <assigned_to name="C. M. Sperberg-McQueen">cmsmcq</assigned_to>
          <cc>David_E3</cc>
          
          <qa_contact name="XML Schema comments list">www-xml-schema-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>21402</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2008-07-30 22:29:44 +0000</bug_when>
    <thetext>NOTE: it might be best to fix these problems by making greater and more formal use of the adjective &quot;top-level&quot; which is currently used throughout the specification but apparently has no definition.

In 3.2.2 &quot;If the &lt;attribute&gt; element information item has &lt;schema&gt; as its parent...&quot; should be &quot;If the &lt;attribute&gt; element information item has &lt;schema&gt; or &lt;override&gt; as its parent...&quot;

Similarly in 3.2.2.1; and for the {targetNamespace} property &quot;parent &lt;schema&gt; element&quot; should be &quot;ancestor &lt;schema&gt; element&quot;.

In 3.2.3, the rule &quot;If the item&apos;s parent is not &lt;schema&gt;&quot; needs to be &quot;... not &lt;schema&gt; or &lt;override&gt;&quot;

In 3.3.2, &quot;&lt;element&gt;s within &lt;schema&gt; &quot; needs to be &quot;&lt;element&gt;s within &lt;schema&gt; or &lt;override&quot;&gt; (except that &quot;within&quot; is really a bit sloppy)

In the same section, &quot;If the &lt;element&gt; element information item has &lt;schema&gt; as its parent&quot; needs to add &quot;or &lt;override&quot;.

In 3.3.3.2 &quot;If the &lt;element&gt; element information item has &lt;schema&gt; as its parent&quot; needs to add &quot;or &lt;override&gt;&quot; and for the {targetNamespace} property &quot;parent &lt;schema&gt; element&quot; should be &quot;ancestor &lt;schema&gt; element&quot;.

In 3.3.3 the rule &quot;If the item&apos;s parent is not &lt;schema&gt;&quot; needs to add &quot;or &lt;override&gt;&quot;

In 3.6.2.1 &quot;When an &lt;attributeGroup&gt; appears as a &amp;#8593;child&amp;#8593; of &lt;schema&gt; or &lt;redefine&gt;&quot; needs to add &quot;or &lt;override&gt;&quot;

In 3.7.2 &quot;If there is a name [attribute] (in which case the item will have &lt;schema&gt; or &lt;redefine&gt; as parent)&quot; needs to add &quot;or &lt;override&gt;&quot;

In 3.9.2 &quot;&lt;element&gt; not immediately within &lt;schema&gt;&quot; needs to add &quot;or &lt;override&gt;&quot;, and &quot;&lt;group&gt; not immediately within &lt;schema&gt;&quot; similarly.

In 3.17.2, in the XML Mapping Summary, phrases like &quot;The simple and complex type definitions corresponding to all the &lt;simpleType&gt; and &lt;complexType&gt; element information items in the [children], if any,&quot; fail to allow for &lt;redefine&gt; or &lt;override&gt;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>23965</commentid>
    <comment_count>1</comment_count>
    <who name="Sandy Gao">sandygao</who>
    <bug_when>2009-02-26 20:58:30 +0000</bug_when>
    <thetext>Given that we use an XSLT transformation to handle &lt;override&gt;, schema processors, in theory, do not need to deal with things under &lt;override&gt; directly, so most of the suggested changes do not apply.

It seems only the last change in 3.17 needs to be made, for &lt;redefine&gt;.

On the general question, we could define terms like &quot;global&quot; and &quot;top-level&quot;. 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 &lt;schema&gt; or &lt;redefine&gt;), 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?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>24256</commentid>
    <comment_count>2</comment_count>
    <who name="Sandy Gao">sandygao</who>
    <bug_when>2009-03-16 13:22:37 +0000</bug_when>
    <thetext>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 &quot;3.17.2 XML Representations of Schemas&quot;, where &lt;redefine&gt; 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&apos;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&apos;s disposition of the comment by closing or reopening the issue, we&apos;ll be grateful. If we don&apos;t hear from you in the next two weeks, we&apos;ll assume that silence implies consent.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>