<?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>5296</bug_id>
          
          <creation_ts>2007-11-29 13:52:37 +0000</creation_ts>
          <short_desc>An oddity with substitution groups</short_desc>
          <delta_ts>2008-01-25 00:24:12 +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 XP</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>medium, work</status_whiteboard>
          <keywords></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>
          
          
          <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>17902</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2007-11-29 13:52:37 +0000</bug_when>
    <thetext>Consider a base type:

    &lt;xs:complexType name=&quot;b&quot;&gt;
       &lt;xs:sequence&gt;     
         &lt;xs:element ref=&quot;a&quot;/&gt;
       &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;

and a supposedly derived type

     &lt;xs:complexType name=&quot;r&quot;&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:restriction base=&quot;b&quot;&gt;
          &lt;xs:sequence&gt;
            &lt;xs:element name=&quot;A&quot;/&gt; &lt;!--NB name, not ref--&gt;
          &lt;/xs:sequence&gt;
        &lt;/xs:restriction&gt;
      &lt;/xs:complexContent&gt;
    &lt;/xs:complexType&gt; 

with the element declarations

&lt;xs:element name=&quot;a&quot;/&gt;
&lt;xs:element name=&quot;A&quot; substitutionGroup=&quot;a&quot;/&gt;

Is r validly derived from b? As far as I can see, it satisfies &quot;Content type restricts&quot;, despite the fact that the local element declaration A is not a member of the substitution group of &quot;a&quot; (local element declarations never belong to a substitution group). 

Is this intended?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>18025</commentid>
    <comment_count>1</comment_count>
    <who name="Sandy Gao">sandygao</who>
    <bug_when>2007-12-10 15:10:54 +0000</bug_when>
    <thetext>You can view this as derivation in 2 steps:
Step 1: &quot;a&quot; -&gt; ref=&quot;A&quot; (replace head with member)
Step 2: ref=&quot;A&quot; -&gt; name=&quot;A&quot; (replace global with local)

If both these 2 steps are valid (which seems to be the case in this example), they can be collapsed into a single step, which explains why the example is valid.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>18514</commentid>
    <comment_count>2</comment_count>
    <who name="David Ezell">David_E3</who>
    <bug_when>2008-01-24 18:47:16 +0000</bug_when>
    <thetext>The WG discussed this issue and determined that the answer in comment #1 is correct; i.e. that the effect is intended.

Please let us know if you agree with this resolution of your issue, by adding a comment to the issue record and changing the Status of the issue to Closed. Or, if you do not agree with this resolution, please add a comment explaining why. If you wish to appeal the WG&apos;s decision to the Director, then also change the Status of the record to Reopened. If you wish to record your dissent, but do not wish to appeal the decision to the Director, then change the Status of the record to Closed. If we do not hear from you in the next two weeks, we will assume you agree with the WG decision.

</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>