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

Re: Nested Schema

From: Martin Gudgin <marting@develop.com>
Date: Wed, 13 Feb 2002 16:57:29 -0000
Message-ID: <000d01c1b651$8a9e2230$977ba8c0@greyarea>
To: <xmlschema-dev@w3.org>, "Sameek Ghosh" <sameekghosh@vispark.com>
You need something along these lines;

<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' >
  <xs:element name='Menu' >
    <xs:complexType>
      <xs:sequence>
        <xs:element name='File' type='xs:string' />
        <xs:element name='Edit' type='xs:string' />
        <xs:element ref='Menu' minOccurs='0' /> <!-- note ref and
minOccurs -->
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

Regards

Martin

----- Original Message -----
From: "Sameek Ghosh" <sameekghosh@vispark.com>
To: <xmlschema-dev@w3.org>
Sent: Wednesday, February 13, 2002 5:45 AM
Subject: Nested Schema


> Hi,
>
> Want to get some info on nested Schema.
>
> Want something like this
>
> <xs:element name="Menu">
>      <xs:complexType>
>        <xs:sequence>
>
>          <element name="File" type="xs:string"/>
>          <element name="Edit" type="xs:string"/>
>          <element name="Menu" type="xs:Menu"/> //***See this***//
>
>        </xs:sequence>
>      </xs:complexType>
> </xs:element>
>
>
> Warm Regards
>
> Sameek
Received on Friday, 15 February 2002 13:50:05 GMT

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