- From: <ovisvana@netzero.net>
- Date: Tue, 25 Apr 2006 11:55:06 GMT
- To: xmlschema-dev@w3.org
- Message-Id: <20060425.045601.23328.1031826@webmail16.lax.untd.com>
Hi, Just see if the schema below is what you were looking for. <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> <xs:element name="root"> <xs:complexType> <xs:sequence> <xs:element name="scene"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element name="a" type="atype"/> <xs:element name="b" type="btype"/> </xs:choice> </xs:complexType> </xs:element> <xs:element name="library"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element name="a" type="acomp"/> <xs:element name="b" type="bcomp"> </xs:element> </xs:choice> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:complexType name="acomp"> <xs:all> </xs:all> <xs:attribute name="foo" use="required" type="xs:integer" /> <xs:attribute name="bar" use="required" type="xs:string" /> </xs:complexType> <xs:complexType name="bcomp"> <xs:all> </xs:all> <xs:attribute name="jim" use="required" type="xs:string" /> <xs:attribute name="jam" use="required" type="xs:string" /> </xs:complexType> <xs:complexType name="atype"> <xs:all> <xs:element name="a" type="atype" minOccurs="0"/> <xs:element name="b" type="btype" minOccurs="0"/> </xs:all> <xs:attribute name="foo" use="required" type="xs:integer" /> <xs:attribute name="bar" use="required" type="xs:string" /> <xs:attributeGroup ref="scene-attributes" /> </xs:complexType> <xs:complexType name="btype"> <xs:all> <xs:element name="a" type="atype" minOccurs="0"/> <xs:element name="b" type="btype" minOccurs="0"/> </xs:all> <xs:attribute name="jim" use="required" type="xs:string" /> <xs:attribute name="jam" use="required" type="xs:string" /> <xs:attributeGroup ref="scene-attributes" /> </xs:complexType> <xs:attributeGroup name="scene-attributes"> <xs:attribute name="s" type="xs:string" fixed="yum" /> </xs:attributeGroup> </xs:schema> cheers, v.omprakash http://www.bonanzasoft.com _____________________________________________________________________ Call Anyone, Anytime, Anywhere in the World - FREE! Free Internet calling from NetZero Voice Visit http://www.netzerovoice.com today!
Received on Tuesday, 25 April 2006 18:57:57 UTC