W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > October to December 2002

IF-ELSE in XML Schema

From: Ankit <ankitc@ltp.soft.net>
Date: Tue, 19 Nov 2002 11:27:11 -0500
Message-Id: <5.1.0.14.1.20021119112708.02884e30@localhost>
To: W3C XML Schema Comments list <www-xml-schema-comments@w3.org>
hi,
Is it possible to have IF-ELSE functionality in XML SChema
In my SCHEMA I have to select a Enumeration based on the values from 
another enumeration

    <simpleType name="Attributes">
     <restriction base="string">
      <enumeration value="Flight Number"/>
      <enumeration value="Class"/>
      <enumeration value="Fare"/>
      <enumeration value="Equipment"/>
      <enumeration value="Origin"/>
      <enumeration vlue="Destination"/>
      <enumeration value="Departure Date"/>
      <enumeration value="Arrival Date"/>
      <enumeration value="Record Locator"/>
      <enumeration value="Reservation Number"/>
       </restriction>
       </simpleType>

    <complexType name="AttrVal">
           <sequence>
      <element name="attrName" type="tns:Attributes">
      </element>
      <element name="valueText" type="string" minOccurs="0">
      </element>
        </sequence>
      </complexType>

In AttrVal schema I want ' valueText ' to be an Enumeration

like

if(attrName=="Flight Number") then valueText="values from other enum"

Thanx in advance
ankit
Received on Tuesday, 19 November 2002 11:40:49 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:13:01 GMT