W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > July to September 2001

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
To: www-xml-schema-comments@w3.org, xmlschema-dev@w3.org
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?

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:12:51 GMT