Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.9.0
-
None
Description
Xerces currently handles one special case correctly; a choice between an empty sequence and one non-empty particle:
<xs:choice>
<xs:sequence/>
<xs:element name="a"/>
</xs:choice>
but fails to produce the correct content model representation when more than one non-empty particle is specified:
<xs:choice>
<xs:sequence/>
<xs:element name="a"/>
<xs:element name="b"/>
...
</xs:choice>
If one (or more) of the choices is an empty sequence the CMBuilder needs to wrap the choice node (i.e. XSCMBinOp) in a zero-or-one (optional) node so that the content model produced will allow the empty sequence.