W3C home > Mailing lists > Public > xmlschema-dev@w3.org > June 2002

Re: Ambiguous content models -- allowed or disallowed by XSDL?

From: Jeni Tennison <jeni@jenitennison.com>
Date: Thu, 13 Jun 2002 10:21:39 +0100
Message-ID: <572139734525.20020613102139@jenitennison.com>
To: xmlschema-dev@w3.org, ht@cogsci.ed.ac.uk (Henry S. Thompson)
CC: Ian Stokes-Rees <ijs@decisionsoft.com>

Hi Henry,

> Summary: Ambiguity and unique attribution are different -- the *ML
> family have never ruled out the former, always required the latter.

Thanks for that clear summary. The example that's been buzzing around
in the back of my head is:

  <xs:sequence minOccurs="2" maxOccurs="2">
    <xs:element name="a" minOccurs="1" maxOccurs="2" />
    <xs:element name="b" minOccurs="0" />

which fulfils the unique attribution constraint since there is only
one particle for each of the two elements a and b, but is ambiguous
because if you have:

  <a /><a /><b />

then you don't know whether you've got to the end of the content model
(the first a comes from the first occurrence of the sequence, the
remainder from the second occurrence of that sequence) or if you're
still within the first occurrence of the sequence.

For my education, could you explain (or point me to something that
explains) how parsers manage to accept the sequence a, a, b without

BTW, XSV and Xerces (C++ and Java) are quite happy with the sequence
a, a, b, but MSXML objects, saying that the content model hasn't been
completed, so it looks like Microsoft needs some education as well ;)



Jeni Tennison
Received on Thursday, 13 June 2002 05:21:41 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:57 UTC