W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > October to December 2001

Re: clarification on Unique Particle Attribution

From: <sandygao@ca.ibm.com>
Date: Wed, 24 Oct 2001 11:37:35 -0400
To: www-xml-schema-comments@w3.org
Message-ID: <OF291558B2.BAB47372-ON85256AEF.00543A91@torolab.ibm.com>
Hi Henry,

I don't think the following two <choice> declarations are the same, and
result in the same content model.

  <group name="grp">
      <element name="e"/>

    <group ref="grp"/>
    <group ref="grp" maxOccurs="3"/>


     <element name="e"/>
   <sequence max='3'>
     <element name="e"/>

Let's follow the spec, and see which particles are involved in the above
two cases:

In the first one, there are 4 particles: one for the local element (call it
PE), one for the sequence in the group (PG), one for the first group
reference (PG1), and one for the second group reference (PG2). When we see
an instance "e", we always use the same element particle PE to validate it,
so this particle can be uniquely determined. But we can't determine whether
to use PG1 or PG2. I don't see how UPA applies here.

In the second one, there are also 4 particles: one for the first sequence
(PS1), one for the first local element (PE1), and the same for the second
sequence and local element (PS2 and PE2). Now for "e" in the instance, we
can't uniquely determine which sequence or element particle to use, hence
it's a violation of UPA.

It seems that you are assuming that when a group is referenced by multiple
places, you'll create different trees of particles for each reference. Then
in the first case, you'll get two different element particles as the result
of group reference. But this is not what the spec says. "the particle is
the particle of ..." is what's mentioned in spec, not "the particle is a
copy of the particle of ...".

Any further clarification is appreciated.

Sandy Gao
Software Developer, IBM Canada
(1-905) 413-3255
Received on Wednesday, 24 October 2001 11:38:45 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:08:54 UTC