Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


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

From: "Swayam Vemuri -X \(swvemuri - WIPRO at Cisco\)" <swvemuri@-----.--->
To: <xmlschema-dev@--.--->
Date: 3/10/2007 8:27:00 PM
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



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent