<?xml version="1.0"?>
<definitions name="product"
    targetNamespace="urn:product"
    xmlns:tns="urn:product"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns="http://schemas.xmlsoap.org/wsdl/">
  <types>
    <xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
        targetNamespace="urn:product">
      <simpleType name="non-empty-string">
        <restriction base="xsd:string">
          <minLength value="1"/>
        </restriction>
      </simpleType>

      <complexType name="Product">
        <all>
          <element name="name" type="xsd:string"/>
          <element ref="tns:Rating"/>
        </all>
      </complexType>

      <complexType name="Comment">
        <simpleContent>
          <extension base="xsd:string">
            <attribute name="msgid" type="xsd:string" use="required"/>
          </extension>
        </simpleContent>
      </complexType>

      <attribute name="version" type="tns:non-empty-string"/>

      <attribute default="Y" name="yesno">
        <simpleType>
          <restriction base="xsd:string">
            <enumeration value="Y"/>
            <enumeration value="N"/>
          </restriction>
        </simpleType>
      </attribute>

      <element name="Rating">
        <simpleType>
          <restriction base="xsd:string">
            <enumeration value="+1"/>
            <enumeration value="0"/>
            <enumeration value="-1"/>
          </restriction>
        </simpleType>
      </element>

      <element name="Product-Bag">
        <complexType>
          <sequence>
            <element name="bag" type="tns:Product" minOccurs="0" maxOccurs="unbounded"/>
            <element ref="tns:Rating" minOccurs="0" maxOccurs="unbounded"/>
            <element ref="tns:Product-Bag"/>
            <element name="comment_1" minOccurs="0" maxOccurs="unbounded">
              <complexType>
                <simpleContent>
                  <extension base="xsd:string">
                    <attribute name="msgid" type="xsd:string" use="required"/>
                  </extension>
                </simpleContent>
              </complexType>
            </element>
            <element name="comment-2" type="tns:Comment" minOccurs="0" maxOccurs="unbounded"/>
          </sequence>
          <attribute ref="tns:version"/>
          <attribute ref="tns:yesno"/>
        </complexType>
      </element>

      <element name="Creator" minOccurs="0" maxOccurs="unbounded">
        <complexType>
          <simpleContent>
            <extension base="xsd:string">
              <attribute name="Role" type="xs:string" use="required"/>
            </extension>
          </simpleContent>
        </complexType>
      </element>
    </xsd:schema>
  </types>
</definitions>
