- From: Swayam Vemuri -X \(swvemuri - WIPRO at Cisco\) <swvemuri@cisco.com>
- Date: Sat, 10 Mar 2007 16:09:37 +0530
- To: "Michael Kay" <mike@saxonica.com>
- Cc: <xmlschema-dev@w3.org>
- Message-ID: <CD0ED6DCA2BDE145942ACA8F57E42298024236E0@xmb-blr-414.apac.cisco.com>
Hi Michael, On second thoughts does XML Schema 1.0 does not support any form of conditional processing of xsd at all OR Is it that support is not there only for my flavor of problem. If it supports conditional processing in any other flavour, Can you please let me know how I can adopt that solution for my present Issue. May be if I don't put my simpleType as enumerated will it help ? Thanks Swayam ________________________________ From: Michael Kay [mailto:mike@saxonica.com] Sent: Saturday, March 10, 2007 3:37 PM To: Swayam Vemuri -X (swvemuri - WIPRO at Cisco) Subject: RE: conditional processing of xsd I'd suggest that you post XML Schema queries to the xmlschema-dev list at www.w3.org. This looks like a classic example of a "co-occurrence constraint" - that is, where the grammar is conditional based on the actual values. It's a well-known limitation of XML Schema 1.0 that it can't handle that, I'm afraid. Michael Kay http://www.saxonica.com/ ________________________________ From: Swayam Vemuri -X (swvemuri - WIPRO at Cisco) [mailto:swvemuri@cisco.com] Sent: 10 March 2007 01:51 To: mike@saxonica.com Subject: conditional processing of xsd Hi Michael, Sorry for contacting you this. But it will be of great help to me if you help me in solving the below Issue for me. Iam just struck with this and not able to proceed. It might not take much of time for An expert like you. Pl help me in trouble shooting this. Issue 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 you 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 10:39:58 UTC