<?xml version="1.0" encoding="ISO-8859-1"?>

<schema targetNamespace="http://crr.caiso.org/download/xml" 
        xmlns="http://www.w3.org/2001/XMLSchema"
        xmlns:CRRDownload="http://crr.caiso.org/download/xml"
        attributeFormDefault="qualified"
        elementFormDefault="qualified">

<!--
Element Name         | Allowed Nested Elements

ClearingPrices       | SourceSink
  SourceSink         | Name, TimeOfUse, ShadowPrice
    SourceSink       | n/a
    TimeOfUse        | n/a
    ShadowPrice      | n/a

-->

<element name="ClearingPrices">
  <complexType>
    <choice>
      <element name="SourceSinkClearingPrices" type="CRRDownload:sourcesinkDefType" minOccurs="0" maxOccurs="unbounded" />
    </choice>
  </complexType>
</element>

<complexType name="sourcesinkDefType">
  <sequence>
    <element name="SourceSink">
      <simpleType>
        <restriction base="string">
          <maxLength value="40"/>
        </restriction>
      </simpleType>
    </element>
    <element name="TimeOfUse">
      <simpleType>
        <restriction base="string">
          <maxLength value="40"/>
        </restriction>
      </simpleType>
    </element>
    <element name="ClearingPrice">
      <simpleType>
        <restriction base="decimal">
          <totalDigits value="12"/>
          <fractionDigits value="2"/>
        </restriction>
      </simpleType>
    </element>
  </sequence>
</complexType>


</schema>
