- From: <sandygao@ca.ibm.com>
- Date: Fri, 2 Nov 2001 18:03:55 -0500
- To: www-xml-schema-comments@w3.org
Hi all,
One more question about UPA: in the definition of overlapping in appendix
H:
"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
group."
Consider the following declarations:
<element name="e1"/>
<element name="e2" substitutionGroup="e1"/>
<choice>
<element ref="e1"/>
<element name="e2" form="qualified"/>
</choice>
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.
Thanks,
Sandy Gao
Software Developer, IBM Canada
(1-905) 413-3255
sandygao@ca.ibm.com
ht@cogsci.ed.a
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
10/24/2001
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>)
violates
> 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
not
> clear to me whether such "particle" refers only to "non-group particle"
or
> 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
<choice>
<sequence>
<element name="e"/>
</sequence>
<sequence max='3'>
<element name="e"/>
</sequence>
</choice>
corresponds to.
For the purposes of UPA, the sequences are themselves irrelevant, so
we get
<choice>
<element name="e"/>
<element name="e" maxOccurs="3"/>
</choice>
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
ht
--
Henry S. Thompson, HCRC Language Technology Group, University of
Edinburgh
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