Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Doubt in Unique Particle Attribution Constraint

From: Bharath Kumar Reddy T <bharathkr@------.--->
To: xmlschema-dev@--.---
Date: 2/18/2009 4:17:00 PM
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.



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent