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

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

From: Morris Matsa <mmatsa@us.ibm.com>
Date: Wed, 12 Jun 2002 13:52:20 -0400
To: Jeni Tennison <jeni@jenitennison.com>
Cc: xmlschema-dev@w3.org, Ian Stokes-Rees <ijs@decisionsoft.com>, "Dare Obasanjo" <dareo@microsoft.com>
Message-ID: <OF8052F7D9.A6508E3D-ON85256BD6.00605059@pok.ibm.com>

Ian's example is clearly disallowed.  Until he sent the example I thought
he was asking a different question.

Jeni, I'm sorry I didn't provide an example earlier.  I believe Henry has
said that he no longer thinks this example is legal.  What do you think?


<sequence min='2' max='2'>
 <element name='a' min='2' max='3'/>



If the schema is legal, then this instance is legal by the schema.  It is
ambiguous because it is unclear whether the third <a/> belongs to the first
sequence or the second sequence.  The schema is legal by the schema
constraint because the particle is uniquely determined, trivially because
there is only one particle with a term that is the element 'a', and only
one particle with a term that is the model group of compositor sequence.
Dare, you re-quote the spec saying that you must know which particle in
advance.  After parsing the second <a/>, and seeing that the next element
has a name 'a', before even looking at the attributes or the rest of the
items, I know exactly which particle to validate it against:  the only

You might not call this an ambiguous case.  Is it a legal schema?


Jeni Tennison <jeni@jenitennison.com> on 06/12/2002 12:01:02 PM

Please respond to Jeni Tennison <jeni@jenitennison.com>

To:    xmlschema-dev@w3.org, Morris Matsa/Somers/IBM@IBMUS
cc:    Ian Stokes-Rees <ijs@decisionsoft.com>
Subject:    Re: Ambiguous content models -- allowed or disallowed by XSDL?

Hi Morris,

>> I believe it does explicitly disallow ACMs, and would appreciate
>> some clarification from those who are better versed on the subject.
> My understanding of the rec: Ambiguous content models are allowed.
> What is required is that by looking at the next tag's name I must
> already be able to unambiguously attribute it to a given unique
> particle in the schema. This disallows most ambiguous content models
> but allows some of them. The rec includes a constraint for this [1],
> and a non-normative explanation. [2]
> [1] http://www.w3.org/TR/xmlschema-1/#cos-nonambig
> [2] http://www.w3.org/TR/xmlschema-1/#non-ambig

Can you give an example of an ambiguous content model that *is*
allowed, according to [1]?



Jeni Tennison
Received on Wednesday, 12 June 2002 13:51:43 UTC

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