Begin forwarded message:

Date: Fri, 22 Mar 2002 13:16:40 +0100
From: Taco Hoekwater <[EMAIL PROTECTED]>
To: "Berend de Boer" <[EMAIL PROTECTED]>
Subject: Re: question for xml/dtd experts


On 22 Mar 2002 13:06:52 +0100
"Berend de Boer" <[EMAIL PROTECTED]> wrote:

> Taco Hoekwater <[EMAIL PROTECTED]> writes:
> 
> > > ><!ELEMENT one ( (a, b?, c?) | (a, c?, b?) |
> > > >                 (b?, a, c?) | (c?, a, b?) |
> > > >                 (b?, c?, a) | (c?, b?, a) )
> > 
> > Berend, this doesn't actually work. The XML parser cannot find the correct
> > branch so it considers the definition to be ambiguous when it finds alternative
> > 2, 5 or 6 (because it has already seen 1,4 and 3 resp.)
> 
> It might be interesting to know that it does actually work :-) Xerces
> finds this totally acceptable. As this is the only XML validating
> parser I have, I'm interested in what other parser do. Or does anyone
> know that xerces does look ahead?
> 
> According to the specs it is ambiguous, but it works :-)

xmllint (libxml2) chokes on it, as does nsgmls (in both modes).
I don't know what xerces actually does, but it is likely that it
backtracks on the compiled pattern for the content (so no lookahead).

-- 
groeten,

Taco


-- 
groeten,

Taco

Reply via email to