OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

relax-ng message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Subject: [relax-ng] Making ambiguous schemas deterministic

The main objections against ambiguous schemas are performance (but it
has now been proved that efficient algorithms can be found to process
ambiguous schemas) and the fact that they could produce random type
assignment and I'd like to challenge the fact that ambiguous always
means random type assignment.

I think that this is only a matter of specification and that two
implementations using for instance the derivative algorithm will always
produce the same type assignment given a schema and an instance

A way to answer to this objection is to define "simple type" grammars as
tested by Kohsuke Kawaguchi' RelaxMeter and I am wondering if another
answer couldn't be to define an optional order which would be followed
by a class of Relax NG implementations to produce a deterministic type
assignments on ambiguous schemas.

I *think* (but may be wrong) that it shouldn't be much more complex than
defining the order in which patterns should be checked and in the simple
form of a Relax NG schema there are only 3 patterns with more than one
non name class sub-pattern: group for which the order is obvious, choice
and interleave.

We could say that a Relax NG implementation would be called
"deterministic" if following this order and could thus produce
deterministic type assignment on ambigous schemas.

People are kind of used to this kind of stuff and the priority mechanism
in XSLT for instance is a way to give some determinism to patterns which
would otherwise be ambiguous and it would be the same here...

Or have I missed something and is it more complex than this?

See you in San Diego.
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Powered by eList eXpress LLC