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 4139 - MS ModelGroups test mgH014
Summary: MS ModelGroups test mgH014
Status: RESOLVED INVALID
Alias: None
Product: XML Schema Test Suite
Classification: Unclassified
Component: Microsoft tests (show other bugs)
Version: 2006-11-06
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Henry S. Thompson
QA Contact: XML Schema Test Suite mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-02 22:25 UTC by Michael Kay
Modified: 2007-01-24 16:57 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2007-01-02 22:25:27 UTC
In the Microsoft ModelGroups test set, test

<test group="mgH014" name="mgH014"/>

The expected result is that the schema is valid. However, the content model of the complex type foo is not a valid restriction of the content model of the type bar. The derived type permits empty content, but the base type does not.
Comment 1 Zafar Abbas 2007-01-24 02:07:18 UTC
Under Element Declaration Schema Component [1], the spec says if the maxOccurs=minOccurs=0 for that element declaration that the schema component does not correspond to any component. In the test case you mentioned, the element e1 in the derived type (foo) has such a declaration for e1 inside the choice, e1 plays no part in the choice and should be stripped off the content model and it thus makes the choice non-emptiable and a valid restriction of bar.

[1] http://www.w3.org/TR/2004/PER-xmlschema-1-20040318/structures-with-errata.html#Element_Declaration_details
Comment 2 Michael Kay 2007-01-24 16:57:04 UTC
Fair enough. It's not an intuitive interpretation but that does seem to be what the spec says.