Mega Code Archive

 
Categories / XML Tutorial / XML Schema
 

An XML Schema Using Inline (or Local) Declarations

<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">          <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>