Martin Honnen said:
The error doesn't say that the XML is not well-formed, it claims that
the definition of the complex type named X3DGroupingNode is not
deterministic.
I have tried to follow all the references in the schema but got lost,
so maybe you can try another schema processor to see what that says
when the schema is processed. When I use
http://www.w3.org/2001/03/webdata/x...3d-3.0.xsd&warnings=on&keepGoing=on&style=xsl
no errors are reported so maybe it is a bug with MSXML.
I don't think it's a bug in MSXML.
Xerces J also finds a number of non-deterministic content models; the
majority of the error messages mention the element MetadataDouble
appearing twice in competing positions in the content model, but this
is an artifact: MetadataDouble happens to be the first element
mentioned in a group (ChildContentModeCore) which is used more than
once in competing positions -- so MetadataDouble is likely to be the
first one checked and detected to be non-deterministic.
My desk copy of XSV also complains about a non-deterministic content
model involving MetadataDouble (although I don't understand why it's
pointing where it's pointing in the source). I'm surprised that the
Web version of XSV doesn't complain; perhaps there's a bug there.
For those who care, the problem with type X3DGroupingNode is not hard
to explain, though the layers of type derivation make it a bit wordy
to explain. We have
X3DGroupingNode extends X3DChildNode extends X3DNode
X3DNode ends with an optional choice among various metadata elements,
including metadataDouble.
X3DChildNode doesn't change the content model (it just adds an
attribute).
X3DGroupingNode adds an optional occurrence of the group
ChildContentModel, which in turn consists of a choice, one of whose
members is the group ChildContentModeCore, which in turn contains a
reference to element MetadataDouble.
A parser can't tell whether an occurrence of MetadataDouble should
match the one in the core definition of X3DNode, or the one in the
X3DGroupingNode extension. Ergo, the content model is
non-deterministic, ergo, the schema processor is right to raise an
error.
Of course, some have said (including me) that it would be better to do
away with the non-determinism rule, but we haven't persuaded others of
that yet.
-C. M. Sperberg-McQueen
World Wide Web Consortium / MIT CSAIL