This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
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.
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
Fair enough. It's not an intuitive interpretation but that does seem to be what the spec says.