Doubt in Unique Particle Attribution Constraint

Hi..

According to spec. Two non-group particles overlap if 

They are both element declaration particles one of whose
<http://www.w3.org/TR/xmlschema-1/#e-name> {name} and
<http://www.w3.org/TR/xmlschema-1/#e-target_namespace> {target namespace}
are the same as those of an element declaration in the other's
<http://www.w3.org/TR/xmlschema-1/#key-eq> .substitution group..

In the following schema, element ref = b and element ref = c are both
element declarations and c's name and target namespace are same as b's
substitution group's name and targetnamespace. So, they both overlap. and
both are under <choice> model group. So, the content model is
non-deterministic. 

 

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

<xs:element name="a" type="xs:short" substitutionGroup="b"/>

<xs:element name="b" type="xs:decimal" substitutionGroup="c"/>

<xs:element name="c" type="xs:decimal" block="substitution"
substitutionGroup="d"/>

<xs:element name="d" block="substitution"/>

<xs:element name="foo"/>

<xs:complexType name="base">

        <xs:choice>

            <xs:element ref="b"/>

            <xs:element ref="c"/>

            <xs:element ref="d"/>

            <xs:element ref="foo"/>

        </xs:choice>

</xs:complexType>

<xs:element name="doc" type="base"/>

</xs:schema>

 

But one of the XML parsers is not giving any error about the
non-deterministic content model.

Please reply me whether the elements <xs:element ref="b"/> and <xs:element
ref="c"/> will overlap or not. and whether the content model is
non-deterministic or not.

 

Thanks and Regards,

Bharath.

Received on Wednesday, 18 February 2009 05:30:11 UTC