<?xml version="1.0" encoding="UTF-8"?>
<!--DOCTYPE schema PUBLIC "-//W3C/DTD XML Schema Version 1.0//EN"
                        "http://www.w3.org/TR/2000/WD-xmlschema-1-20000225/structures.dtd"-->
<!DOCTYPE schema [
<!ENTITY app-types SYSTEM "src/examples/oes/schema/app-types.ent">
<!ENTITY global-codes SYSTEM "src/examples/oes/schema/global-codes.ent">
]>

<!-- Schema for Order Entry System Product Catalog -->
<xsd:schema xmlns:xsd="http://www.w3.org/1999/XMLSchema"
            targetNamespace="http://castor.exolab.org/OES"
            version="0.1">
&app-types;
&global-codes;

  <!-- Product -->
  <xsd:element name="Product">
    <xsd:type content="elemOnly" order="seq">

      <xsd:element name="short" type="short" minOccurs="1" maxOccurs="1" />
      <xsd:element name="description" type="description" minOccurs="1" maxOccurs="1" />

      <!-- ProductPrice -->
      <xsd:element name="Price">
        <xsd:type content="elemOnly" order="seq">

          <xsd:element name="msrp" type="double" minOccurs="1" maxOccurs="1" />
          <xsd:element name="cost" type="double" minOccurs="0" maxOccurs="1" />

          <xsd:element name="unit" type="double" minOccurs="0" />

          <!-- ProductPrice.Discount -->
          <xsd:element name="Discount">
            <xsd:type content="elemOnly" order="seq">

              <xsd:element name="minimum" type="integer" minOccurs="1" maxOccurs="1" />
              <xsd:element name="discount" type="integer" minOccurs="1" maxOccurs="1" />
              <xsd:element name="effectiveFrom" type="timeInstant" minOccurs="0" maxOccurs="1" />
              <xsd:element name="effectiveTo" type="timeInstant" minOccurs="0" maxOccurs="1" />

            </xsd:type>
          </xsd:element>
          <!-- /Discount -->

          <xsd:attribute name="id" type="long" minOccurs="1" />
          <xsd:attribute name="currency" type="currencyCode" minOccurs="1" />

        </xsd:type>
      </xsd:element>
      <!-- /ProductPrice -->

      <!-- The SKU is an ID attribute -->
      <xsd:attribute name="sku" type="sku" minOccurs="1" />
      <xsd:attribute name="category" type="categoryRef" minOccurs="1" />

    </xsd:type>
  </xsd:element>
  <!-- /Product -->


  <!-- Category -->
  <xsd:element name="Category">
    <xsd:type content="elemOnly" order="seq">

      <xsd:element name="short" type="short" minOccurs="1" maxOccurs="1" />
      <xsd:element name="description" type="description" minOccurs="1" maxOccurs="1" />

      <xsd:attribute name="id" type="categoryId" minOccurs="1" />

    </xsd:type>
  </xsd:element>
  <!-- /Category -->

</xsd:schema>










