<?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>6982</bug_id>
          
          <creation_ts>2009-05-29 15:42:21 +0000</creation_ts>
          <short_desc>Open content allows (but ignores) minOccurs and maxOccurs</short_desc>
          <delta_ts>2009-10-26 16:44:07 +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>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></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="David Ezell">David_E3</assigned_to>
          <cc>cmsmcq</cc>
    
    <cc>kbraun</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>25366</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2009-05-29 15:42:21 +0000</bug_when>
    <thetext>It seems that the XML representation allows minOccurs and maxOccurs on the &lt;xs:any&gt; element that is a child of &lt;xs:openContent&gt;, but these attributes are not mapped to anything in the schema component model. Since the attribute have no meaning (and especially since it may not be obvious to users that they have no meaning) they should be disallowed in the XML representation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25575</commentid>
    <comment_count>1</comment_count>
    <who name="Sandy Gao">sandygao</who>
    <bug_when>2009-06-13 20:19:02 +0000</bug_when>
    <thetext>They are already disallowed.

In Appendix A &quot;Schema for Schema Documents (Structures) (normative)&quot;:

  &lt;xs:element name=&quot;openContent&quot; id=&quot;openContent&quot;&gt;
    ...
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base=&quot;xs:annotated&quot;&gt;
          &lt;xs:sequence&gt;
            &lt;xs:element name=&quot;any&quot; minOccurs=&quot;0&quot; type=&quot;xs:wildcard&quot;/&gt;
          &lt;/xs:sequence&gt;

Here type &quot;wildcard&quot; doesn&apos;t allow min/maxOccurs. To allow them on normal wildcards:

  &lt;xs:element name=&quot;any&quot; id=&quot;any&quot;&gt;
    ...
    &lt;xs:complexType&gt;
      &lt;xs:complexContent&gt;
        &lt;xs:extension base=&quot;xs:wildcard&quot;&gt;
          &lt;xs:attribute name=&quot;notQName&quot; type=&quot;xs:qnameList&quot;
                        use=&quot;optional&quot;/&gt;
          &lt;xs:attributeGroup ref=&quot;xs:occurs&quot;/&gt;

P.S. this also means that &quot;notQName&quot; is not allowed on &lt;any&gt; in open content. I do not recall why that&apos;s the case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>25728</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2009-06-26 16:18:14 +0000</bug_when>
    <thetext>Thanks for pointing this out.

Closing as invalid.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29039</commentid>
    <comment_count>3</comment_count>
    <who name="Kevin Braun">kbraun</who>
    <bug_when>2009-10-26 16:44:07 +0000</bug_when>
    <thetext>IMHO, this seems like something that should be noted in the main body of the recommendation.  At least for minOccurs/maxOccurs, you can see on a careful reading that they would be ignored (if they were allowed).  The notQName attribute is more subtle.

There is an analogous situation at the end of 3.7.2, where the XML representation presented is not precise and attention is called to the implications of the S4S.  That seems like the right approach, as readers will have the expectation that the XML Representation sections are complete - at least, that&apos;s been my expectation.

Please consider reopening this one.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>