Re: Group : Model content and occurence specifications

Hi Bruno,

>  <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 ?

Yes, this is true.

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

You can do that but the idea is that instead of putting the occurence
constraints on the group declaration you should put it on the group
reference which makes more sense to me. So, in your case you would
declare the group as:

 <xs:group name="blocs.mix">
   <xs:choice>
        <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>

and then you add your occurence constraints when you later reference the
group:

...
<xs:group ref="blocs.mix" maxOccurs="unbounded"/>
...

Cheers,
/Eddie

> 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 20:03:26 UTC