W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2001

Group : Model content and occurence specifications

From: Bruno Chatel <bcha@chadocs.com>
Date: Thu, 4 Oct 2001 15:26:25 +0200
Message-ID: <05b001c14cd8$2c11b750$0600a8c0@chafou>
To: <xmlschema-dev@w3.org>
Cc: <bcha@chadocs.com>
Hi,
I have a validation problem on my schema : maxOccurs attribute
is not allowed on this choice element :

 <xs:group name="blocs.mix">
   <xs:annotation>
       <xs:documentation>...</xs:documentation>
   </xs:annotation>
   <xs:choice maxOccurs="unbounded">
        <xs:group ref="index.class"/>
        <xs:group ref="encadrés.class"/>
        <xs:group ref="inters.class"/>
        <xs:group ref="blocs.class"/>
   </xs:choice>
  </xs:group>

It seems that the error is relative to the explanation
provided in the specification Part 1, end of 3.7.2
http://www.w3.org/TR/xmlschema-1/#declare-namedModelGroup

Is it true ?
I do not understand the reason why there is this limitation.

In order to modelize this, is it acceptable to write a un-useful
parent for choice element ?
Something like :

<xs:group name="blocs.mix">
   <xs:annotation>
       <xs:documentation>...</xs:documentation>
   </xs:annotation>
   <xs:choice>
        <xs:choice maxOccurs="unbounded">
            <xs:group ref="index.class"/>
            <xs:group ref="encadrés.class"/>
            <xs:group ref="inters.class"/>
            <xs:group ref="blocs.class"/>
       </xs:choice>
   </xs:choice>
 </xs:group>

Thanks in advance.

Regards,

-- bruno --
----------------------------------------
Bruno Chatel
Tel : (+33)[0] 4 96 11 14 57
Email : bcha@chadocs.com
----------------------------------------
Received on Thursday, 4 October 2001 09:23:07 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:24 GMT