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 15926 - mgO001 (minOccurs=maxOccurs=0) valid for XSD1.1?
Summary: mgO001 (minOccurs=maxOccurs=0) valid for XSD1.1?
Status: RESOLVED FIXED
Alias: None
Product: XML Schema Test Suite
Classification: Unclassified
Component: Microsoft tests (show other bugs)
Version: 2006-11-06
Hardware: All All
: 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-02-07 13:27 UTC by Andreas Meissl
Modified: 2012-03-27 12:27 UTC (History)
3 users (show)

See Also:


Attachments

Description Andreas Meissl 2012-02-07 13:27:28 UTC
I'm not sure if I'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'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.
Comment 1 Michael Kay 2012-02-07 15:25:14 UTC
Interesting. The XML representation summary has

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

although the S4SD has

       <xs:attribute name="maxOccurs" default="1" use="optional">
          <xs:simpleType>
            <xs:restriction base="xs:allNNI">
              <xs:enumeration value="0"/>
              <xs:enumeration value="1"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:attribute>

The spec says that the summary is derived from the S4SD, but in the event of conflict, the S4SD wins.
Comment 2 Andreas Meissl 2012-02-08 08:56:01 UTC
The same for test mgO018.
Comment 3 David Ezell 2012-03-09 17:29:16 UTC
Resolved: mark as editorial, and fix the table in 3.8.2 to match what'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.
Comment 4 Michael Kay 2012-03-09 17:51:36 UTC
I have changed tests mgO001 and mgO018 to make the schemas valid in 1.1.
Comment 5 Altova XML Developers 2012-03-12 14:10:59 UTC
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. 
<current> should be before <prior> in the content of <schemaTest> (lines 4026 and 4278 in ModelGroups_w3c.xml).

Best regards,
Andreas Meissl
Comment 6 Michael Kay 2012-03-27 12:27:49 UTC
Fixed as suggested.