Mega Code Archive

 
Categories / XML Tutorial / XML Schema
 

Russian Doll design nest the local element declaration within other schema component

<xsd:schema   xmlns:xsd="http://www.w3.org/2001/XMLSchema"   elementFormDefault="qualified"   targetNamespace="http://www.rntsoft.com/namespaces/pub"   xmlns="http://www.rntsoft.com/namespaces/pub"> <xsd:element name="publications">   <xsd:complexType>    <xsd:sequence>     <xsd:element name="book" maxOccurs="unbounded">      <xsd:complexType>       <xsd:sequence>       <xsd:element name="title" type="xsd:string"/>       <xsd:element name="author" type="xsd:string"/>       <xsd:element name="description" type="xsd:string"/>      </xsd:sequence>      <xsd:attribute name="isbn" type="xsd:string"/>      </xsd:complexType>     </xsd:element>    </xsd:sequence>   </xsd:complexType> </xsd:element> </xsd:schema>