<?xml version="1.0" encoding="UTF-8"?>
<!-- Requests for statistics -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.ggf.org/namespaces/2004/09/gridNetworkMonitoring" xmlns:tns="http://www.ggf.org/namespaces/2004/09/gridNetworkMonitoring">
  <xs:complexType name="Statistics">
    <xs:annotation>
      <xs:documentation>These elements indicate a request for various statistical summaries of data</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element minOccurs="0" ref="tns:raw"/>
      <xs:element minOccurs="0" maxOccurs="unbounded" ref="tns:count"/>
      <xs:element minOccurs="0" maxOccurs="unbounded" ref="tns:min"/>
      <xs:element minOccurs="0" maxOccurs="unbounded" ref="tns:mean"/>
      <xs:element minOccurs="0" maxOccurs="unbounded" ref="tns:median"/>
      <xs:element minOccurs="0" maxOccurs="unbounded" ref="tns:max"/>
      <xs:element minOccurs="0" maxOccurs="unbounded" ref="tns:stddev"/>
      <xs:element minOccurs="0" maxOccurs="unbounded" ref="tns:percentile"/>
      <xs:element minOccurs="0" maxOccurs="unbounded" ref="tns:confidence"/>
    </xs:sequence>
    <xs:attribute name="interval">
      <xs:annotation>
        <xs:documentation>The interval provides a hint to the service as to the interval between measurements required if it is to make new measurements</xs:documentation>
      </xs:annotation>
      <xs:simpleType>
        <xs:union memberTypes="xs:token xs:double"/>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
  <xs:element name="raw">
    <xs:annotation>
      <xs:documentation>Request the raw data</xs:documentation>
    </xs:annotation>
    <xs:complexType/>
  </xs:element>
  <xs:element name="count">
    <xs:complexType>
      <xs:attributeGroup ref="tns:StatisticsAttributes"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="min">
    <xs:complexType>
      <xs:attributeGroup ref="tns:StatisticsAttributes"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="mean">
    <xs:complexType>
      <xs:attributeGroup ref="tns:StatisticsAttributes"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="median">
    <xs:complexType>
      <xs:attributeGroup ref="tns:StatisticsAttributes"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="max">
    <xs:complexType>
      <xs:attributeGroup ref="tns:StatisticsAttributes"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="stddev">
    <xs:complexType>
      <xs:attributeGroup ref="tns:StatisticsAttributes"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="percentile">
    <xs:complexType>
      <xs:attribute name="n" use="required" type="xs:double"/>
      <xs:attributeGroup ref="tns:StatisticsAttributes"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="confidence">
    <xs:complexType>
      <xs:attribute name="n" use="required" type="xs:double"/>
      <xs:attributeGroup ref="tns:StatisticsAttributes"/>
    </xs:complexType>
  </xs:element>
  <xs:attributeGroup name="StatisticsAttributes">
    <xs:attributeGroup ref="tns:Required"/>
  </xs:attributeGroup>
</xs:schema>

