An XML Schema Using Inline (or Local) Declarations : Global Local « XML Schema « XML Tutorial






<xsd:schema
   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
   elementFormDefault="qualified"
   targetNamespace="http://www.java2s.com/namespaces/pub"
   xmlns="http://www.java2s.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>








3.96.Global Local
3.96.1.Global type versus Local type
3.96.2.An XML Schema Using Inline (or Local) Declarations
3.96.3.XML Schema Structures
3.96.4.Local and Global Declarations