why SOM of msxml4 can't load this schema?

M

Martin Honnen

tgtt said:
the schema is:
http://www.web3d.org/specifications/x3d-3.0.xsd

when use SOM to load as:
...
SchemaCache = new ActiveXObject("Msxml2.XMLSchemaCache.4.0");
SchemaCache.add("","x3d-3.0.xsd");
...

pop up a messageBox report that there are some error.but the schema is
well-formated.how to solution?

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.
 
C

C. M. Sperberg-McQueen

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top