Re: Group redefinition and recursive content models.

Eric van der Vlist wrote:

> Just wondering how a recursive group such as:
>
>   <xs:group name="group">
>    <xs:sequence>
>      <xs:element name="foo">
>       <xs:complexType>
>         <xs:group ref="group" minOccurs="0"/>
>       </xs:complexType>
>      </xs:element>
>      <xs:element name="bar" type="xs:token"/>
>    </xs:sequence>
>   </xs:group>
>
> may be redefine without confusion between the <xs:group ref="group"/>
> meaning "extension", the <xs:group ref="group" minOccurs="0"/> meaning
> "bogus extension" the <xs:group ref="group" minOccurs="0"/> meaning
> "reference" ???

Jeez Eric, with a sentence like that I think you just qualified to be writing
specs yourself ;-)

Anyway, isn't this already covered in the spec:

"6 Within the [children], for each <group> the appropriate case among the
following must be true:
6.1 If it has a <group> among its contents at some level the ·actual value·
of whose ref [attribute] is the same as the ·actual value· of its own name
attribute plus target namespace, then all of the following must be true:
6.1.1 It must have exactly one such group.
..."

It seems that 6.1.1 prohibits a redefinition of your above example since it
would have to groups among its contents at some level where the ref attribute
is the same as its own name.

Cheers,
/Eddie

>
>
> Thanks
>
> Eric
>
> --
> Rendez-vous ą Paris pour le Forum XML.
>                     http://www.technoforum.fr/Pages/forumXML01/index.html
> ------------------------------------------------------------------------
> Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
> http://xsltunit.org      http://4xt.org           http://examplotron.org
> ------------------------------------------------------------------------

Received on Tuesday, 13 November 2001 17:41:51 UTC