Hi Avin, > How can I write the XML Schema definition for following data value: > value1: > <size> > <medium/> > </size> > > value2: > <size> > <value>15</value> > </size> It looks as though you want the <size> element to either hold an empty <medium>, <large>, or <small> element or hold a <value> element with an integer value. In that case, you need something along the lines of: <xs:element name="size"> <xs:complexType> <xs:choice> <xs:element name="large" type="empty" /> <xs:element name="medium" type="empty" /> <xs:element name="small" type="empty" /> <xs:element name="value" type="xs:integer" /> </xs:choice> </xs:complexType> </xs:element> <xs:complexType name="empty"> <xs:restriction /> </xs:complexType> Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/Received on Tuesday, 7 January 2003 06:47:41 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:35 GMT