Re: FW: About those "non-deterministic content model" errors

Dear Judith Slein,

Some time ago, you filed a comment on XML Schema 1.0 (archived at
http://lists.w3.org/Archives/Public/www-xml-schema-comments/ 
2001JanMar/0050)
about a dificulty you had encountered in writing a schema for the JDF
specification.  In further discussion with members of the working
group (in particular Matthew Fuchs), I have the impression that
several possible solutions to that difficulty were canvassed:

   - The validator should choose the more restrictive validation
     path -- i.e. given the choice between matching an element
     particle and a wildcard particle, it should prefer the
     element.  (You suggested this in the message cited above.
     It may be the earliest suggestion of what the Working
     Group has come to call 'weakened wildcards'.)

   - The use of a 'PrivateExtension' element to label (and
     contain) private extensions to a public base schema.

   - A 'parse-as-base' parsing mode that allows an xsi:type
     attribute to be ignored and checks an element against its
     declared type, assuming that any unrecognized material at
     the end of the content comes from an extension to the
     declared type.  (Matthew Fuchs suggested this, at
     http://lists.w3.org/Archives/Public/www-xml-schema-comments/ 
2001JanMar/0060.html
     in what may be the earliest suggestion of what the Working
     Group now calls 'fallback to declared type', which is not
     present in the most recent working draft but which may be
     in the next.)

   - Not declaring the 'CD' element as being in the substitution
     group headed by jdf:Resource.

   - Creating a 'negative wildcard' that excludes your extension
     namespace from the wildcard, thus avoiding the non-determinism.
     (This was proposed implicitly when your comment was attached
     to an issue suggesting negative wildcards.)

Other approaches could be devised (re-reading the thread, I am tempted
to suggest further solutions myself, but I'll restrain myself).

Some time has passed, and I don't know whether you still take any
interest in the issues you raised then against XML Schema 1.0.  But if
you do, I hope you will be pleased by the news that the most recent
working draft of XML Schema 1.1 has two relevant pieces of
functionality.

First, in XML Schema 1.1, wildcards can specify not just the set of
namespaces which they match, but can specify instead a set of
namespaces which they do NOT match.  Specific qualified names can also
be excluded from the match.  Fuller details can be found in section
3.10 of the most recent working draft
(http://www.w3.org/TR/xmlschema11-1/#Wildcards).

Second, the rule forbidding competition between particles in a content
model has been relaxed; element/element and wildcard/wildcard
competition is still banned, but element/wildcard competition, of the
kind illustrated by your examples, is now allowed.  Further details
are in section 3.8.6 of the current draft
(http://www.w3.org/TR/xmlschema11-1/#coss-modelGroup), in particular
the text surrounding the Unique Particle Attribution constraint
(http://www.w3.org/TR/xmlschema11-1/#cos-nonambig).

As noted, at some point your comments cited above were attached to the
negative wildcard issue, which is why I am writing you now (we would
like to close the issue and would like confirmation from those who
raised it that the spec now does what they need).  Looking carefully
at the examples in your comments, I am not sure you were actually
asking for negative wildcards, or that negative wildcards actually
help in the specific case you described (because the wildcard is not
in the extender's content model, but in the standard schema).  But
since you are recorded as having raised the issue, this note is to
call your attention to the record of the issue and its resolution, in
the W3C's public Bugzilla installation, at
http://www.w3.org/Bugs/Public/show_bug.cgi?id=2867

We would be glad if you were to add a comment to the issue record,
indicating whether you agree, or do not agree, with our resolution of
the issue.  Alternatively, you could reply to this email, which I am
copying to the public comments list.

If we do not hear from you in the next two weeks, we will assume you
agree, or at least have no grave problems, with the WG decision

best regards,

--Michael Sperberg-McQueen
   W3C XML Schema Working Group

Received on Tuesday, 19 September 2006 01:36:06 UTC