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

Selection of enumerated simpleType should offer sub-attributes based on selection

From: Swayam Vemuri -X \(swvemuri - WIPRO at Cisco\) <swvemuri@cisco.com>
Date: Sat, 10 Mar 2007 15:08:32 +0530
Message-ID: <CD0ED6DCA2BDE145942ACA8F57E42298024236D7@xmb-blr-414.apac.cisco.com>
To: <xmlschema-dev@w3.org>
Hi,

 

I have a requirement wherein, I have a enumerated
simpleType/complexType, like as shown below

 

<xs:simpleType name="HibernateCollectionElements">

            <xs:restriction base="xs:string">

                  <xs:enumeration value="Set"/>

                  <xs:enumeration value="Bag"/>

                  <xs:enumeration value="List"/>

            </xs:restriction>

</xs:simpleType>

 

Now based on the user selection(that is Set or Bag or List) ,

I need to present a set of attributes. This set of attributes is
different for different values given in enumerated value set.

 

That is if user selects Set, then he will be given attributes s1, s2 and
s3.

If user selects Bag, then he will be given attributes h1, h2  and so on.

 

Can any one please let me know how to have above logic in a xsd, with an
example.

I did search couple of books, but in vain.

 

Thanks and regards,

Swayam
Received on Saturday, 10 March 2007 09:38:50 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:12 UTC