home *** CD-ROM | disk | FTP | other *** search
/ MacFormat UK 160 - Disc 2 / MF_UK_160_2.iso / pc / DiscContent / Trials / oxygen / samples / fo / Invoice / invoice.xsd < prev    next >
Encoding:
Extensible Markup Language  |  2005-07-21  |  2.6 KB  |  66 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
  3.     <xs:element name="invoice">
  4.         <xs:complexType>
  5.             <xs:sequence>
  6.                 <xs:element ref="payment-method"/>
  7.                 <xs:element ref="date"/>
  8.                 <xs:element ref="delivery"/>
  9.                 <xs:element ref="checked-by"/>
  10.                 <xs:element ref="customer"/>
  11.                 <xs:element ref="products"/>
  12.             </xs:sequence>
  13.             <xs:attribute name="currency" use="required">
  14.                 <xs:simpleType>
  15.                     <xs:restriction base="xs:string">
  16.                         <xs:enumeration value="EUR"/>
  17.                         <xs:enumeration value="USD"/>
  18.                         <xs:enumeration value="GBP"/>
  19.                     </xs:restriction>
  20.                 </xs:simpleType>
  21.             </xs:attribute>
  22.             <xs:attribute name="number" use="required" type="xs:integer"/>
  23.             <xs:attribute name="type" use="required">
  24.                 <xs:simpleType>
  25.                     <xs:restriction base="xs:string">
  26.                         <xs:enumeration value="quote"/>
  27.                         <xs:enumeration value="proforma"/>
  28.                         <xs:enumeration value="normal"/>
  29.                     </xs:restriction>
  30.                 </xs:simpleType>
  31.             </xs:attribute>
  32.         </xs:complexType>
  33.     </xs:element>
  34.     <xs:element name="payment-method" type="xs:string"/>
  35.     <xs:element name="date" type="xs:string"/>
  36.     <xs:element name="delivery" type="xs:NCName"/>
  37.     <xs:element name="checked-by" type="xs:string"/>
  38.     <xs:element name="customer">
  39.         <xs:complexType>
  40.             <xs:sequence>
  41.                 <xs:element maxOccurs="unbounded" ref="block"/>
  42.             </xs:sequence>
  43.         </xs:complexType>
  44.     </xs:element>
  45.     <xs:element name="block" type="xs:string"/>
  46.     <xs:element name="products">
  47.         <xs:complexType>
  48.             <xs:sequence>
  49.                 <xs:element maxOccurs="unbounded" ref="product"/>
  50.             </xs:sequence>
  51.         </xs:complexType>
  52.     </xs:element>
  53.     <xs:element name="product">
  54.         <xs:complexType>
  55.             <xs:sequence>
  56.                 <xs:element ref="quantity"/>
  57.                 <xs:element ref="description"/>
  58.                 <xs:element ref="unit-cost"/>
  59.             </xs:sequence>
  60.         </xs:complexType>
  61.     </xs:element>
  62.     <xs:element name="quantity" type="xs:integer"/>
  63.     <xs:element name="description" type="xs:string"/>
  64.     <xs:element name="unit-cost" type="xs:integer"/>
  65. </xs:schema>
  66.