<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:include schemaLocation="client.xsd"/>
<xsd:element name="searchrequest" type="search"/>
<xsd:complexType name="search">
  <xsd:sequence>
    <xsd:element name="destination" type="client" minOccurs="1" 
      maxOccurs="1"/>
    <xsd:element name="source" type="client" minOccurs="1" maxOccurs="1"/>
    <xsd:element name="ttl" default="4" minOccurs="1" maxOccurs="1">
      <xsd:simpleType>
        <xsd:restriction base="xsd:nonNegativeInteger">
          <xsd:max-inclusive value="255"/>
        </xsd:restriction>
      </xsd:simpleType>
    </xsd:element>
    <xsd:element name="searchfields" minOccurs="1" maxOccurs="1">
      <xsd:complexType>
        <xsd:sequence>
          <xsd:element name="value" type="xsd:string" minOccurs="1" 
            maxOccurs="unbounded">
            <xsd:attribute name="field" type="xsd:string" use="required"/>
          </xsd:element>
        </xsd:sequence>
        <xsd:attribute name="operation" use="optional" default="and">
          <xsd:simpleType>
            <xsd:restriction base="xsd:string">
              <xsd:enumeration value="and"/>
              <xsd:enumeration value="or"/>
            </xsd:restriction>
          </xsd:simpleType>
        </xsd:attribute>
      </xsd:complexType>
    </xsd:element>
    <xsd:element name="requestid" type="xsd:nonNegativeInteger" minOccurs="1" 
      maxOccurs="1"/>
    <xsd:element name="relay" type="client" minOccurs="0" maxOccurs="8"/>
  </xsd:sequence>
</xsd:complexType>
</xsd:schema>
