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 15618 - maxOccurs not allowed on openContent/any
Summary: maxOccurs not allowed on openContent/any
Status: RESOLVED FIXED
Alias: None
Product: XML Schema Test Suite
Classification: Unclassified
Component: Saxon tests (show other bugs)
Version: 2006-11-06
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: C. M. Sperberg-McQueen
QA Contact: XML Schema Test Suite mailing list
URL:
Whiteboard:
Keywords: decided
Depends on:
Blocks:
 
Reported: 2012-01-19 03:46 UTC by Sandy Gao
Modified: 2012-04-25 21:51 UTC (History)
2 users (show)

See Also:


Attachments

Description Sandy Gao 2012-01-19 03:46:58 UTC
Saxon test open042x.xsd has:

<xs:openContent>
     <xs:any namespace="##other" processContents="lax" maxOccurs="unbounded"/>
</xs:openContent>

But according to the Appendix A [1], <xs:any> under <xs:openContent> can't specify min/maxOccurs attributes.

(With irrelevant items omitted)

  <xs:element name="openContent" id="openContent">
          <xs:sequence>
            <xs:element name="any" minOccurs="0" type="xs:wildcard"/>
          </xs:sequence>
  </xs:element>

  <xs:complexType name="wildcard">
      <xs:extension base="xs:annotated">
         <xs:attributeGroup ref="xs:anyAttrGroup"/>
      </xs:extension>
  </xs:complexType>

where "xs:anyAttrGroup" doesn't allow min/maxOccurs attributes. These attributes are included in the "xs:occurs" group, which is referenced by the normal <any> element:

  <xs:element name="any" id="any">
        <xs:extension base="xs:wildcard">
          <xs:attributeGroup ref="xs:occurs"/>
        </xs:extension>
  </xs:element>

[1] http://www.w3.org/TR/xmlschema11-1/#normative-schemaSchema
Comment 1 David Ezell 2012-01-20 17:01:19 UTC
Resolution: update the test to remove the maxOccurs attribute, and add a second "negative" test to check for this error.
Comment 2 Michael Kay 2012-01-20 17:48:23 UTC
Fixed as decided. open042 has been corrected; the error case is retained in test open048.