W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2003

Generic Question

From: Shirish Kulkarni <shirish_kul@yahoo.com>
Date: Tue, 4 Mar 2003 02:34:42 -0800 (PST)
Message-ID: <20030304103442.21522.qmail@web41106.mail.yahoo.com>
To: xmlschema-dev@w3.org


I am facing the following problem while building a
data model. 

I would like to have an element to have a type, which
is a choices between number of types. 

a.xml => 

b.xml => 

In my schema I have 
c.xsd => 
<complexType name="Type1"> 
  <xsd:element name="Sub1" type="xsd:string"/>
  <xsd:element name="Sub2" type="xsd:string"/>
  <xsd:element name="Sub3" type="xsd:string"/>

<complexType name="Type2"> 
  <xsd:element name="Sub4" type="xsd:string"/>
  <xsd:element name="Sub5" type="xsd:string"/>

I would like to have Node to be of Type1 OR Type2. As
you can see, there is no overlap between Type1 and

Is it feasible ? How ( can we have choice keyword for
Type ) ? 

With best regards,

Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
Received on Tuesday, 4 March 2003 05:35:14 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:09 UTC