![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - Lexical representation of xsd:decimal and xsd:integer >Thread Next - The same element in one content model with different type XSV choice validationTo: <xmlschema-dev@--.---> Date: 11/2/2005 2:01:00 AM Hi,
When using the online XSV tool at http://www.w3.org/2001/03/webdata/xsv, =
the following schema did not pass because of a "non-deterministic =
content model" within the choice element. Here is what didn't pass:
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="root">
<xs:complexType>
<xs:choice>
<xs:sequence>
<xs:element name="A" type="xs:string" maxOccurs="5"/>
<xs:element name="B" type="xs:string" minOccurs="0"/>
<xs:element name="C" type="xs:string" minOccurs="0"/>
</xs:sequence>
<xs:sequence>
<xs:element name="B" type="xs:string"/>
<xs:element name="C" type="xs:string" minOccurs="0"/>
</xs:sequence>
<xs:sequence>
<xs:element name="C" type="xs:string"/>
</xs:sequence>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
The output from XSV was:
"Invalid: non-deterministic content model for type None: =
{None}:B/{None}:B"
However, changing the maxOccurs="5" in the first element ("A") to =
maxOccurs="1" results in a successful validation.
It should not matter that the maxOccurs is greater than 1, since, in =
that case, all occurences would be in sequence. There is no ambiguity =
here, since the initial element is ALWAYS mandatory in each sequence =
within the choice, so there is one and only one sequence that can be =
used for a given initial element (if there is an initial "A" element, =
the first sequence HAS to be used, since "A" does not appear within any =
other sequences). Also, this was deemed valid by XMLSpy's schema =
validator (which correctly validates other instances of =
non-deterministic content).
Is there a faulty algorithm in XSV that decides what is =
non-deterministic and what is not?
Thank you,
Dallas Vaughan
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
