- From: <sandygao@ca.ibm.com>
- Date: Wed, 24 Oct 2001 11:37:35 -0400
- To: www-xml-schema-comments@w3.org
Hi Henry, I don't think the following two <choice> declarations are the same, and result in the same content model. <group name="grp"> <sequence> <element name="e"/> </sequence> </group> <choice> <group ref="grp"/> <group ref="grp" maxOccurs="3"/> </choice> and <choice> <sequence> <element name="e"/> </sequence> <sequence max='3'> <element name="e"/> </sequence> </choice> 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. Thanks, Sandy Gao Software Developer, IBM Canada (1-905) 413-3255 sandygao@ca.ibm.com
Received on Wednesday, 24 October 2001 11:38:45 UTC