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 Particles test set, test <test group="particlesV020" name="particlesV020"/> the schema is described as invalid. XSV also reports it invalid, but I am not convinced this is supported by a reading of the spec. In private correspondence, Henry Thompson suggested that R is not validly derived from B, because the type of bar is derived from the type of SUB by extension, not by restriction. However, the rule: 2.1 Any top-level element declaration particle (in R or B) which is the {substitution group affiliation} of one or more other element declarations and whose ·substitution group· contains at least one element declaration other than itself is treated as if it were a choice group whose {min occurs} and {max occurs} are those of the particle, and whose {particles} consists of one particle with {min occurs} and {max occurs} of 1 for each of the declarations in its ·substitution group·. suggests that it boils down to a question of whether <element name="bar" type="x:c2"/> is validly derived from <choice> <element name="SUB" type="x:c1"/> <element name="bar" type="x:c2"/> </choice> and it would seem that it is, regardless of the relationship of x:c1 to x:c2.
Actually you have to wrap the derived element particle in a <choice> group itself to check a valid restriction as per Elt:All/Choice/Sequence -- RecurseAsIfGroup. So it comes down the question if <choice> <element name="bar" type="x:c2" maxOccurs="2"/> </choice> is a valid restriction of: <choice maxOccurs="3"> <element name="SUB" type="x:c1"/> <element name="bar" type="x:c2"/> </choice> which is clearly is not as the bar in the derived type is not a valid restriction of the one in the base type as it fails occurence range check.
tending towards disputedTest. . .