Recursion in an XML Schema

I am working on a project that requires the ability for an XML document to
be able to have sections with subsections with subsections (etc).

I figure the easiest way to do this is to use recursion in the XML schema to
say something like:

<schema>
    <complexType name="SectionType">
        <sequence>
            <element name="section" type="SectionType">
            <annotation>
                <documentation>Recursive</documentation>
            </annotation>
        </element>
    </sequence>
    </complexType>
    <element name="section" type="SectionType"/>
</schema>

is this a valid method of using recursion inside a schema, and if not, how
can I go about doing it?
--Matthew Aguirre
maaguirr@vt.edu

Received on Thursday, 1 November 2001 04:44:41 UTC