[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Doubt in Unique Particle Attribution Constraint

From: Bharath Kumar Reddy T <bharathkr@huawei.com>
Date: Wed, 18 Feb 2009 10:59:16 +0530
To: xmlschema-dev@w3.org
Cc: ashutosh_p@huawei.com, ranjit@huawei.com
Message-id: <000001c99189$d83181c0$3a12120a@china.huawei.com>
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 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.