<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:yahoo:prods" xmlns="urn:yahoo:prods" elementFormDefault="qualified">
 <xs:element name="ResultSet">
  <xs:complexType>
   <xs:sequence>
    <xs:element name="Result" type="ResultType" minOccurs="0" maxOccurs="300"/>
   </xs:sequence>
   <xs:attribute name="totalResultsAvailable" type="xs:integer" use="required"/>
   <xs:attribute name="totalResultsReturned" type="xs:integer" use="required"/>
   <xs:attribute name="firstResultPosition" type="xs:integer" use="required"/>
   <xs:attribute name="spellSuggestion" type="xs:string" use="optional"/>
  </xs:complexType>   
 </xs:element>
 <xs:complexType name="ResultType">
  <xs:choice>
   <xs:element name="Catalog" type="CatalogType"/>
   <xs:element name="Offer" type="OfferType"/>
  </xs:choice>
 </xs:complexType> 
 <xs:complexType name="CatalogType">
  <xs:sequence>
   <xs:element name="Url" type="xs:string"/>
   <xs:element name="ProductName" type="xs:string"/>
   <xs:element name="PriceFrom" type="PriceType"/>
   <xs:element name="PriceTo" type="PriceType" minOccurs="0"/>
   <xs:element name="Thumbnail" type="ThumbnailType" minOccurs="0"/>
   <xs:element name="Description" type="xs:string" minOccurs="0"/>
   <xs:element name="Summary" type="xs:string" minOccurs="0"/>
   <xs:element name="UserRating" type="UserRatingType" minOccurs="0"/>
   <xs:element name="SpecificationList" type="SpecificationListType" minOccurs="0"/>
  </xs:sequence>
  <xs:attribute name="ID" type="xs:nonNegativeInteger" use="required"/>
 </xs:complexType>
 <xs:complexType name="OfferType">
  <xs:sequence>
   <xs:element name="Url" type="xs:string"/>
   <xs:element name="ProductName" type="xs:string"/>
   <xs:element name="Price" type="PriceType"/>
   <xs:element name="Thumbnail" type="ThumbnailType" minOccurs="0"/>
   <xs:element name="Summary" type="xs:string" minOccurs="0"/>
   <xs:element name="Merchant" type="MerchantType"/>
  </xs:sequence>
 </xs:complexType>
 <xs:complexType name="MerchantType">
  <xs:sequence>
   <xs:element name="Name" type="xs:string"/>
  </xs:sequence>
  <xs:attribute name="ID" type="xs:nonNegativeInteger" use="required"/>
 </xs:complexType>
 <xs:complexType name="UserRatingType">
  <xs:sequence>
   <xs:element name="MaxRating" type="RatingValueType"/>
   <xs:element name="NumRatings" type="xs:nonNegativeInteger"/>
   <xs:element name="AverageRating" type="RatingValueType"/>
   <xs:element name="RatingUrl" type="xs:string"/>
   <xs:element name="CreateRatingUrl" type="xs:string"/>
  </xs:sequence>
 </xs:complexType>
 <xs:simpleType name="RatingValueType">
  <xs:restriction base="xs:decimal">
   <xs:minInclusive value="0.0"/>
   <xs:maxInclusive value="5.0"/>
  </xs:restriction>
 </xs:simpleType>
 <xs:complexType name="SpecificationListType">
  <xs:sequence>
   <xs:element name="Specification" type="SpecificationType" minOccurs="0" maxOccurs="100"/> 
  </xs:sequence>
 </xs:complexType>
 <xs:complexType name="SpecificationType">
  <xs:sequence>
   <xs:element name="SpecificationLabel" type="xs:string"/>
   <xs:element name="SpecificationValue" type="xs:string"/>
  </xs:sequence>
 </xs:complexType>
 <xs:complexType name="ThumbnailType">
  <xs:sequence>
   <xs:element name="Url" type="xs:string"/>
   <xs:element name="Height" type="xs:nonNegativeInteger"/>
   <xs:element name="Width" type="xs:nonNegativeInteger"/>
  </xs:sequence>
 </xs:complexType>
 <xs:simpleType name="PriceType">
  <xs:restriction base="xs:decimal">
   <xs:minInclusive value="0.00"/>
  </xs:restriction>
 </xs:simpleType>
</xs:schema>
