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

[xmlschema-dev] Re: Nested Schema

From: Bob Schloss <rschloss@us.ibm.com>
Date: Wed, 13 Feb 2002 11:44:37 -0500
To: xmlschema-dev@w3.org
Message-ID: <OF3657CA55.54608BB9-ON85256B5F.005BE79F@pok.ibm.com>
Please read the Schema Primer http://www.w3.org/TR/xmlschema-0 .

Carefully look at the Purchase Order Schema in section 2.1 .

Your example below has 3 problems:
1) You need the prefix xs: before the tag name 'element' for the 3
     particles that are part of the sequence
2) the value of the type attribute on an element declaration
    should be a simpleType or a complexType.  You are referencing
    an element declaration.
3) If you were referencing a type that you defined in this same
    schema document, the reference would not use xs: as the prefix
    in the QName, it would use some prefix that you had associated
    with a namespace URI -- the same namespace URI which
    is declared as the targetNamespace in the schema element information
    item.

Bob

Sameek Ghosh <sameekghosh@vispark.com>@w3.org on 02/13/2002 12:45:37 AM

Sent by:    xmlschema-dev-request@w3.org


To:    xmlschema-dev@w3.org
cc:
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 Wednesday, 13 February 2002 11:47:01 GMT

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