It Programmer development Essentials-all kinds of resources download list, history of the most IT resources, personal collection summary. shiporder_1.xsd File:
<?xml version= "1.0" encoding= "UTF-8"?>
<xs:schema xmlns:xs= "Http://www.w3.org/2001/XMLSchema"
Targetnamespace= "Http://www.itstar.cn/shiporder_1"
elementformdefault= "qualified" >
<xs:element name= "Shiporder" >
<xs:complexType>
<xs:sequence>
<xs:element name= "Orderperson" type= "xs:string"/>
<xs:element name= "ShipTo" >
<xs:complexType>
<xs:sequence>
< xs:element name= "name" type= "xs:string"/>
<xs:element name= "Address" type= "xs:string"/>
<xs:element name= "City" type= "xs:string"/>
<xs:element name= "Country" type= "xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name= "Item" maxoccurs= "unbounded" >
<xs:complexType>
<xs:sequence>
<xs:element name= "title" Type= "Xs:string"/>
<xs:element name= "Note" type= "xs:string" minoccurs= "0"/>
<xs:element name= "Quantity" type= "Xs:positiveinteger" ></xs:element>
<xs:element name= "Price" type= "Xs:decimal"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name= "OrderID" type= "xs:string" use= "required"/>
</xs:complexType>
</xs:element>
</xs:schema>
shiporder_2.xsd File: (I don't know why this method cannot add the targetnamespace attribute)
<?xml version= "1.0" encoding= "UTF-8"?>
<xh:schema xmlns:xh= "Http://www.w3.org/2001/XMLSchema"
elementformdefault= "qualified" >
<!--simple element definition--
<xh:element name= "Orderperson" type= "xh:string"/>
<xh:element name= "name" type= "xh:string"/>
<xh:element name= "Address" type= "xh:string"/>
<xh:element name= "City" type= "xh:string"/>
<xh:element name= "Country" type= "xh:string"/>
<xh:element name= "title" Type= "Xh:string"/>
<xh:element name= "Note" type= "xh:string"/>
<xh:element name= "Quantity" type= "Xh:positiveinteger"/>
<xh:element name= "Price" type= "Xh:decimal"/>
<!--definition of properties--
<xh:attribute name= "OrderID" type= "xh:string"/>
<!--definition of composite elements--
<xh:element name= "ShipTo" >
<xh:complexType>
<xh:sequence>
<xh:element ref= "Name"/>
<xh:element ref= "Address"/>
<xh:element ref= "City"/>
<xh:element ref= "Country"/>
</xh:sequence>
</xh:complexType>
</xh:element>
<xh:element name= "Item" >
<xh:complexType>
<xh:sequence>
<xh:element ref= "title"/>
<xh:element ref= "Note" minoccurs= "0"/>
<xh:element ref= "Quantity"/>
<xh:element ref= "Price"/>
</xh:sequence>
</xh:complexType>
</xh:element>
<xh:element name= "Shiporder" >