home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 40 / IOPROG_40.ISO / SOFT / NETFrameworkSDK.exe / comsdk.cab / samples.exe / QuickStart / howto / samples / XMLSerialization / PurchaseOrder.xsd < prev    next >
Encoding:
Text File  |  2000-06-05  |  1.5 KB  |  49 lines

  1. <schema xmlns="http://www.w3.org/1999/XMLSchema"
  2.         xmlns:po="http://electrocommerce.org/po"
  3.         targetNamespace="http://electrocommerce.org/po">
  4.  
  5. <element name="purchaseOrder" type="po:PurchaseOrder"/>
  6.  
  7.  <element name="comment" type="string"/>
  8.  
  9.  <complexType name='Item'>
  10.     <element name="productName" type="string"/>
  11.     <element name="quantity">
  12.      <simpleType base="positive-integer">
  13.       <maxExclusive value="100"/>
  14.      </simpleType>
  15.     </element>
  16.     <element name="price"    type="decimal"/>
  17.     <element ref="po:comment"   minOccurs="0"/>
  18.     <element name="shipDate" type="date" minOccurs='0'/>
  19.     <attribute name="partNum" type="po:Sku"/>
  20.  </complexType>
  21.  
  22.  <complexType name="PurchaseOrder">
  23.   <element name="shipTo" type="po:Address"/>
  24.   <element name="billTo" type="po:Address"/>
  25.   <element ref="po:comment" minOccurs="0"/>
  26.   <element name="items">
  27.    <complexType>
  28.     <element name="item" minOccurs="0" maxOccurs="*" type='po:Item'/>
  29.    </complexType>
  30.   </element>
  31.   <attribute name="orderDate" type="date"/>
  32.  </complexType>
  33.  
  34.  <complexType name="Address">
  35.   <element name="name"   type="string"/>
  36.   <element name="street" type="string"/>
  37.   <element name="city"   type="string"/>
  38.   <element name="state"  type="string"/>
  39.   <element name="zip"    type="decimal"/>
  40.   <attribute name="country" type="NMTOKEN" fixed="US"/>
  41.  </complexType>
  42.  
  43.  
  44. <simpleType name="Sku" base="string">
  45.   <pattern value="/d{3}-[A-Z]{2}"/>
  46.  </simpleType>
  47.  
  48. </schema>
  49.