RE: X3D schema validation problem

The schema I find at that location is different from the one you cite. It
says:

<xsd:group name="TextureBackgroundChildContentModel">
		<xsd:annotation>
			<xsd:appinfo>Child-node content model corresponding
to TextureBackground.  Can contain up to six Texture nodes (ImageTexture,
MovieTexture, MultiTexture or PixelTexture).  Each child texture must have a
different containerField for topTexture, bottomTexture, leftTexture,
rightTexture, frontTexture and backTexture.</xsd:appinfo>
			<xsd:documentation
source="http://www.web3d.org/specifications/ISO-IEC-19775/Part01/components/
enveffects.html#TextureBackground"/>
		</xsd:annotation>
		<xsd:choice>
			<xsd:element ref="ImageTexture"/>
			<xsd:element ref="MovieTexture"/>
			<xsd:element ref="MultiTexture"/>
			<xsd:element ref="PixelTexture"/>
			<xsd:element ref="ProtoInstance"/>
		</xsd:choice>
		<!--Controversial construct, throws errors if includes
minOccurs="0" maxOccurs="6".  Deterministic content model.
		    Moved constraint to parent referring xsd:group OK.
Still need to test if more than 6 children will be invalidated.-->
	</xsd:group>

That is, the minOccurs and maxOccurs have been removed, and a comment has
been added saying the construct is "controversial". I'm reasonably confident
that it's not actually controversial, it's invalid.

I did find some other problems processing this schema (the one I downloaded,
not the one you quoted). Firstly, handling the complex patterns seems to be
very slow - I suspect this is down to the JDK and there may not be much I
can do about it. Secondly, the schema defines a simple type SFFloat derived
from string, which seems to be modelling floating point numbers as character
strings. This type is used extensively throughout the schema, in many cases
with minInclusive and maxInclusive facets. However, these facets are not
allowed on types derived from string, because the string type is not
ordered, and Saxon is rejecting them.

Xerces gives me a StackOverflowError processing this schema - it appears to
be recursing infinitely in a regex matching method.

XSV accepts the schema with no problems. 

SQC seems to go into a busy loop - I gave up after 5 minutes. There's
something very odd about it, but I don't know what!

Thanks for reporting it, anyway - I'm keen to add to my collection of test
cases. Though I'm not quite sure what to do if and when I find schemas that
are in widespread use but that appear to be incorrect.

Michael Kay
Saxonica

> -----Original Message-----
> From: xmlschema-dev-request@w3.org 
> [mailto:xmlschema-dev-request@w3.org] On Behalf Of Helka Folch
> Sent: 30 June 2004 15:45
> To: xmlschema-dev@w3.org
> Subject: X3D schema validation problem
> 
> 
> Hi,
> I'm having problems validating X3D scenes with respect to the 
> X3D schema 
> (http://www.web3d.org/x3d/specifications/schema.html).
> 
> With the schema validator included in the evaluation version 
> of Saxonica 
> (http://www.saxonica.com/), I get the following error when 
> checking the 
> X3D schema :
> 
>  Cannot specify 'minOccurs' on a 'choice' compositor within a group
>   Cannot specify 'maxOccurs' on a 'choice' compositor within a group
> 
> The problem seems to concern a 'choice' in a group element  that has 
> minOccurs and maxOccurs attributes.
> It is the following structure in the X3D schema that seems to 
> cause the 
> error:
> 
>     <xsd:group name="TextureBackgroundChildContentModel">
>         <xsd:annotation>
>             <xsd:appinfo/>
>             <xsd:documentation>Child-node content model 
> corresponding to 
> TextureBackground.  Can contain up to six Texture nodes 
> (ImageTexture, 
> MovieTexture, MultiTexture or PixelTexture).  Each child texture must 
> have a different containerField for topTexture, bottomTexture, 
> leftTexture, rightTexture, frontTexture and 
> backTexture.</xsd:documentation>
>         </xsd:annotation>
>         <xsd:choice minOccurs="0" maxOccurs="6">
>             <xsd:element ref="ImageTexture"/>
>             <xsd:element ref="MovieTexture"/>
>             <xsd:element ref="MultiTexture"/>
>             <xsd:element ref="PixelTexture"/>
>         </xsd:choice>
>     </xsd:group>
> 
> 
> I thought that minOccurs and maxOccurs attributs were allowed 
> on choice 
> elements, or is that not so? Is it an error in the X3D schema?
> What schema validator do you recommend me to use for validating X3D?
> 
> Many thanks,
> 
> Helka Folch
> 
> 

Received on Wednesday, 30 June 2004 13:11:49 UTC