W3C home > Mailing lists > Public > xmlschema-dev@w3.org > August 2002

Several same elements

From: Cyrill Zadra <czadra@bluewin.ch>
Date: Sat, 17 Aug 2002 17:24:54 -0400 (EDT)
Message-ID: <3D5EBF28.2080207@bluewin.ch>
To: xmlschema-dev@w3.org




Hi everybody!

Is it possible to have an xml struktur like below, or do you have any 
better ideas to solve such a structure?

<chapter id=""><!-- chapter name -->
    <chapter id=" "><!-- chapter name --></chapter>
    <chapter id=" "></chapter>
    <chapter id=" ">
        <chapter id=" "></chapter>
    </chapter>
</chapter>

If it would be possible how could i describe this in xml-schema? The way 
I first thought its actually not THE solution. I'm looking for an short 
and simple possibility to solve this problem.

<xsd:element name="chapter" type="chapterone"/>

<xsd:complexType name="chapterone">
    <xsd:sequence>
       <xsd:element name="chapter" type="chaptertwo"/>
	 <xsd:attribute name="id" type="idcheck"/>
    </xsd:sequence>
</xsd:complexType>

<xsd:complexType name="chaptertwo">
    <xsd:sequence>
       <xsd:element name="chapter" type="xsd:string"/>
    </xsd:sequence>
    <xsd:attribute name="id" type="idcheck"/>
</xsd:complexType>

Many thanks in advance.

Cyrill
^
Received on Monday, 19 August 2002 05:50:16 GMT

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