Another possible problem in the definition of particle derivation.

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?

Thanks for your help.

Achille Fokoue.

PS. In July, I sent a note which explained another possible problem related
to the definition of particle derivation and suggested a way to fix it :
http://lists.w3.org/Archives/Public/www-xml-schema-comments/2001JulSep/0035.html

Received on Wednesday, 15 August 2001 08:46:17 UTC