Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


XSV choice validation

From: "Vaughan, Dallas" <VAUGHAN@----.--->
To: <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


transparent
Print
Mail
Digg
delicious
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