Question on "ref" attribute

When I write a XML schema as this that follow:

<schema xmlns="http://www.w3.org/1999/XMLSchema"
        targetNamespace="http://www.somewhere.org/BookCatalogue"
        xmlns:cat="http://www.somewhere.org/BookCatalogue">
    <element name="BookCatalogue">
        <type>
             <element name="Book" minOccurs="0" maxOccurs="*">
                  <type>
                      <group ref="BookElements"/>
                      <attribute name="Category" minOccurs="1">
                          <datatype source="string">
                              <enumeration value="autobiography"/>
                              <enumeration value="non-fiction"/>
                              <enumeration value="fiction"/>
                          </datatype>
                      </attribute> 
                      <attribute name="InStock" type="boolean" 
default="false"/>
                      <attribute name="Reviewer" type="string" 
default=""/>
                  </type>
             </element>
        </type>
    </element>
    <group name="BookElements" order="seq">
        <element name="Title" type="string"/>
        <element name="Author" type="string"/>
        <element name="Date" type="string"/>
        <element name="ISBN" type="string"/>
        <element name="Publisher" type="string"/>
    </group>
</schema>


the group's "ref" attribute must always refer to a group that is 
child (top level) of schema ?

Received on Sunday, 14 May 2000 10:12:06 UTC