<?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>15926</bug_id>
          
          <creation_ts>2012-02-07 13:27:28 +0000</creation_ts>
          <short_desc>mgO001 (minOccurs=maxOccurs=0) valid for XSD1.1?</short_desc>
          <delta_ts>2012-03-27 12:27:49 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XML Schema Test Suite</product>
          <component>Microsoft tests</component>
          <version>2006-11-06</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>decided</keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Andreas Meissl">am_spamfaenger</reporter>
          <assigned_to name="C. M. Sperberg-McQueen">cmsmcq</assigned_to>
          <cc>David_E3</cc>
    
    <cc>mike</cc>
    
    <cc>xml.dev</cc>
          
          <qa_contact name="XML Schema Test Suite mailing list">public-xml-schema-testsuite</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>63833</commentid>
    <comment_count>0</comment_count>
    <who name="Andreas Meissl">am_spamfaenger</who>
    <bug_when>2012-02-07 13:27:28 +0000</bug_when>
    <thetext>I&apos;m not sure if I&apos;m right with my interpretation of the specification, but I think test mgO001 of set MS-ModelGroups2006-07-15 should be valid for XSD 1.1. The testcase has a complex type with an all model group with minOccurs=maxOccurs=0. 
In XSD 1.1 this model group will map to no component at all (http://www.w3.org/TR/xmlschema11-1/#declare-contentModel), resulting in a complex type with empty content.
So in my opinion it&apos;s:
- Valid with respect to schema for schemas. 
- There are no schema representation contraints for model groups. 
- And it results in no component, so no component constraint is violated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63844</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2012-02-07 15:25:14 +0000</bug_when>
    <thetext>Interesting. The XML representation summary has

&lt;all
  id = ID
  maxOccurs = 1 : 1
  minOccurs = (0 | 1) : 1
  {any attributes with non-schema namespace . . .}&gt;
  Content: (annotation?, (element | any | group)*)
&lt;/all&gt;

although the S4SD has

       &lt;xs:attribute name=&quot;maxOccurs&quot; default=&quot;1&quot; use=&quot;optional&quot;&gt;
          &lt;xs:simpleType&gt;
            &lt;xs:restriction base=&quot;xs:allNNI&quot;&gt;
              &lt;xs:enumeration value=&quot;0&quot;/&gt;
              &lt;xs:enumeration value=&quot;1&quot;/&gt;
            &lt;/xs:restriction&gt;
          &lt;/xs:simpleType&gt;
        &lt;/xs:attribute&gt;

The spec says that the summary is derived from the S4SD, but in the event of conflict, the S4SD wins.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>63879</commentid>
    <comment_count>2</comment_count>
    <who name="Andreas Meissl">am_spamfaenger</who>
    <bug_when>2012-02-08 08:56:01 +0000</bug_when>
    <thetext>The same for test mgO018.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65217</commentid>
    <comment_count>3</comment_count>
    <who name="David Ezell">David_E3</who>
    <bug_when>2012-03-09 17:29:16 +0000</bug_when>
    <thetext>Resolved: mark as editorial, and fix the table in 3.8.2 to match what&apos;s in the S4S, as the text says it should.  Add a new bug.

Resolved: change validity from invalid to valid for both 1.0 and 1.1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65220</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2012-03-09 17:51:36 +0000</bug_when>
    <thetext>I have changed tests mgO001 and mgO018 to make the schemas valid in 1.1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65355</commentid>
    <comment_count>5</comment_count>
    <who name="Altova XML Developers">xml.dev</who>
    <bug_when>2012-03-12 14:10:59 +0000</bug_when>
    <thetext>Thanks for the changes, but ModelGroups_w3c.xml is now invalid with respect to xsts.xsd making test introspect-testSet-MS-ModelGroups2006-07-15-26 invalid. 
&lt;current&gt; should be before &lt;prior&gt; in the content of &lt;schemaTest&gt; (lines 4026 and 4278 in ModelGroups_w3c.xml).

Best regards,
Andreas Meissl</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66110</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2012-03-27 12:27:49 +0000</bug_when>
    <thetext>Fixed as suggested.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>