# Another possible problem in the definition of particle derivation.

From: Achille Fokoue Nkoutche/Zurich/IBM <AFO@zurich.ibm.com>
Date: Wed, 15 Aug 2001 14:45:38 +0200

Message-ID: <OF30A142F4.36AB9C47-ONC1256AA9.002F83D4@LocalDomain>
```
Hi,

I would like to have your point on view regarding the interpretation of
particle derivation definition (Part 1 Section 3.9.6).
Consider the following example where we have two particles R and B :
B=
<xsd:sequence>
<xsd:element name="foo" minOccurs="1" maxOccurs="1" />
<xsd:any minOccurs="4" maxOccurs="8" />
</xsd:sequence>

R=
<xsd:sequence>
<xsd:element name="foo" minOccurs="1" maxOccurs="1" />
<xsd:sequence id="01">
<xsd:element name="e1" minOccurs="2" maxOccurs="2" />
<xsd:element name="e2" minOccurs="2" maxOccurs="2" />
</xsd:sequence>
</xsd:sequence>

The intent of R is to restrict B by using <sequence id="01"> which is a
valid restriction of <any> defined in B.
Unfortunately, <sequence id="01"> is a pointless group. Therefore it is
removed before the definition of particle restriction can be applied. Thus,
R is equivalent to
<xsd:sequence>
<xsd:element name="foo" minOccurs="1" maxOccurs="1" />
<xsd:element name="e1" minOccurs="2" maxOccurs="2" />
<xsd:element name="e2" minOccurs="2" maxOccurs="2" />
</xsd:sequence>

After the removal of the pointless <sequence id="01">, R is no more a
restriction of B. Is it exactly what the spec wants tools to enforce? Or
should we allow R to be a valid restriction of B? How can I achieve what I
want to do without violating any schema constraint?