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: Fri, 2 Nov 2001 18:03:55 -0500
To: www-xml-schema-comments@w3.org
Message-ID: <OFACAD9B93.F67F0BB3-ON85256AF8.007DEC7D@torolab.ibm.com>
Hi all,

One more question about UPA: in the definition of overlapping in appendix

"They are both element declaration particles one of which is in the other's
Ěsubstitution groupĚ."

Shouldn't it be something like:

"They are both element declaration particles one of which has the same name
and target namespace as an element declaration in the other's substitution

Consider the following declarations:

<element name="e1"/>
<element name="e2" substitutionGroup="e1"/>

  <element ref="e1"/>
  <element name="e2" form="qualified"/>

In <choice> "e2" is not in the substitution group of "e1" (because "e2" is
locally declared). But the above still violates UPA, because for an element
"e2", we don't know which particle to use for validation.

Sandy Gao
Software Developer, IBM Canada
(1-905) 413-3255

                    c.uk (Henry S.       To:     Sandy Gao/Toronto/IBM@IBMCA                                  
                    Thompson)            cc:     www-xml-schema-comments@w3.org                               
                                         Subject:     Re: clarification on Unique Particle Attribution        
                    11:18 AM                                                                                  
                    Please respond                                                                            
                    to ht                                                                                     

sandygao@ca.ibm.com writes:

> >From constraint "Unique Particle Attribution" [1] and appendix H [2], I
> couldn't figure out whether the following content model (<choice>)
> UPA constraint:
> <group name="grp">
>   <sequence>
>     <element name="e"/>
>   </sequence>
> </group>
> <choice>
>   <group ref="grp"/>
>   <group ref="grp" maxOccurs="3"/>
> </choice>
> In [1], it mentions "particle ... can be uniquely determined". But it's
> clear to me whether such "particle" refers only to "non-group particle"
> generic "particle". In the above example, there are two (different) group
> particles, but they refer to the same non-group particle. When we see an
> element "e" in the instance, we can uniquely determine the non-group
> particle for validation, but not a unique group particle.

The UPA applies to components, not representations, so particles _are_
the right thing to worry about.

But the above is still in violation, because it corresponds to the
same component that

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

corresponds to.

For the purposes of UPA, the sequences are themselves irrelevant, so
we get

     <element name="e"/>
     <element name="e" maxOccurs="3"/>

which clearly violates the UPA.

> [1] http://www.w3.org/TR/xmlschema-1/#cos-nonambig

> [2] http://www.w3.org/TR/xmlschema-1/#non-ambig

  Henry S. Thompson, HCRC Language Technology Group, University of
          W3C Fellow 1999--2001, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
               Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
                          URL: http://www.ltg.ed.ac.uk/~ht/
Received on Friday, 2 November 2001 18:05:47 UTC

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