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

Re: xmL Schema : can a complexType element contain other complextype elements ??

From: <Noah_Mendelsohn@lotus.com>
Date: Tue, 6 Feb 2001 16:19:09 -0500
To: anand awasthi <anand-awasthi@usa.net>
Cc: xerces-j-dev@xml.apache.org, xmlschema-dev@w3.org
Message-ID: <OF657F0D0D.CF204B1B-ON852569EB.00758B4C@lotus.com>
The correct terminology would be that (1) a complex type can have a 
content model, which can indicate sequences of elements, choices of 
elements, etc., just as for DTD element types (2) some of the elements 
named in that content model can themselves be of one or another complex 
type, or simple type (3) if any of those elements have local declarations, 
then in the XML transfer syntax, the type declarations are lexically 
nested, and in that sense can appear to be contained.

llustration of points (1) and (2):

<complexType name='ct'>
        <!-- here comes a content model -->
                <!-- ...with elements that have types -->
                <element ref="A"/>
                <element ref="B"/>

<element name="A" type="CT2"/>
<element name="B" type="CT3"/>

...and point (3):

<complexType name='ct'>
        <!-- here comes a content model -->
                <!-- A has anonymous complex type: it looks
                     like it's nested (but in the
                 schema components, we just say
                 it's scoped) -->
                <element name="A">
                <element ref="B"/>

Hope this helps.

Noah Mendelsohn                                    Voice: 1-617-693-4036
Lotus Development Corp.                            Fax: 1-617-693-8676
One Rogers Street
Cambridge, MA 02142

anand awasthi <anand-awasthi@usa.net>
Sent by: xmlschema-dev-request@w3.org
02/06/2001 03:53 PM

        To:     zvon@list.zvon.org, xerces-j-dev@xml.apache.org, xmlschema-dev@w3.org
        cc:     (bcc: Noah Mendelsohn/CAM/Lotus)
        Subject:        xmL Schema : can a complexType element contain other complextype elements 


I want to define a schema with a complexType element containing other
complextype elements ??

can  i do this ??

i saw entire schema spec but they dont talk about it ....

Get free email and a permanent address at http://www.netaddress.com/?N=1
Received on Tuesday, 6 February 2001 16:30:59 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:14:49 UTC