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: Re: [relax-ng] Making ambiguous schemas deterministic


On Thu, 2002-07-11 at 10:55, James Clark wrote:
> 
> > 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.
> 
> Yes, I think this is an possibility. This is what regex implementations do:
> they allow non-deterministic models, but they define an order so that \1,
> \2,... have well-defined values.  Also I believe XSD does this for <union>:
> the first choice wins (unless there's an xsi:type).

Yes, this is the case with W3C XML Schema unions.
> 
> > 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.
> 
> I think this would be straightfoward for a naive backtracking implementation
> to deal with, but I suspect it would be harder for a derivative-based
> streaming implementation, but I haven't thouoght about it enough to be sure.

My implementation is still naive, then :-).

In any case, an implementation would have to comply with this only if it
claims itself "deterministic" or "ordered" or whatever term would be
used to qualify this behavior. And there would be no benefit for an
implementation not interested in returning validation metadata (type or
other) to claim itself "deterministic" or "ordered" since the binary
result of the validation is already deterministic. 

Thanks

Eric

-- 
See you in San Diego.
                               http://conferences.oreillynet.com/os2002/
------------------------------------------------------------------------
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