<?xml version = "1.0" encoding = "UTF-8"?>
<!--Generated by XML Authority. Conforms to w3c http://www.w3.org/2000/10/XMLSchema-->
<schema xmlns = "http://www.w3.org/2000/10/XMLSchema"
	 targetNamespace = "http://www.ipdr.org/namespaces/ipdr"
	 xmlns:ipdr = "http://www.ipdr.org/namespaces/ipdr">
	<annotation>
		<documentation> This is the base type for the Service Consumer 
                      element. The service specific schema can extend
                      this by deriving from it.
      </documentation>
		<documentation> This is the base type for the SE (Service
          Element)element. The service specific schema can extend 
          this by deriving from it.
      </documentation>
		<documentation> This is the base type for the UE (Usage Entry)
                      element. The service specific schema can extend 
                      this by deriving from it.
      </documentation>
	</annotation>
	<element name = "IPDRDoc">
		<annotation>
			<documentation> The IPDRDoc element is the top-level container
            of a set of IPDRs. The document will also define the entity
            which recorded these IPDRs via the IPDRRec element.
        </documentation>
		</annotation>
		<complexType>
			<sequence>
				<element ref = "ipdr:IPDRRec"/>
				<element ref = "ipdr:IPDRRecList" minOccurs = "0"/>
				<element ref = "ipdr:IPDR" maxOccurs = "unbounded"/>
				<element ref = "ipdr:IPDRDoc.End" minOccurs = "0"/>
			</sequence>
			<attribute name = "seqNum" type = "integer"/>
			<attribute name = "version" type = "string"/>
			<attribute name = "startTime" type = "timeInstant"/>
			<attribute name = "info" type = "string"/>
		</complexType>
	</element>
	<element name = "IPDRDoc.End">
		<annotation>
			<documentation> The IPDRDoc.End element optionally marks the
            end of the IPDR block. It may contain some check
            information like a count of IPDRs.
        </documentation>
		</annotation>
		<complexType>
			<attribute name = "count" type = "integer"/>
			<attribute name = "endTime" type = "timeInstant"/>
		</complexType>
	</element>
	<element name = "IPDRRec">
		<annotation>
			<documentation> The IPDRRec element describes the entity that
            is responsible for creating (recording) the IPDRDoc.
        </documentation>
		</annotation>
		<complexType>
			<attribute name = "id" type = "ID"/>
			<attribute name = "startTime" type = "timeInstant"/>
			<attribute name = "info" type = "string"/>
		</complexType>
	</element>
	<element name = "IPDRRecRef">
		<annotation>
			<documentation> The IPDRRecRef element may be used to associate
            common references to the same IPDRRec element without 
            repeating its other usage attributes.
        </documentation>
		</annotation>
		<complexType>
			<attribute name = "ref" use = "required" type = "IDREF"/>
		</complexType>
	</element>
	<element name = "IPDRRecList">
		<annotation>
			<documentation> The IPDRRecList identifies contributing IPDR
              recording entities which were used in the construction
              of the current IPDR Document. A typical example use
              would be for an aggregator of IPDR documents to
              identify the set of initial recorders presenting 
              IPDRs.
          </documentation>
		</annotation>
		<complexType>
			<sequence>
				<element ref = "ipdr:IPDRRec" maxOccurs = "unbounded"/>
			</sequence>
		</complexType>
	</element>
	<element name = "IPDR">
		<annotation>
			<documentation> An IPDR describes an event between a Service
              Consumer (SC) and a Service Element (SE). The SC and SE 
              elements are contained beneath an entity called the
              Service Session (SS). Details of the event is contained 
              in the Usage Entry (UE) element. All IPDRs have a time 
              indicating when the event occurred.
          </documentation>
		</annotation>
		<complexType>
			<sequence>
				<choice minOccurs = "0">
					<element ref = "ipdr:IPDRRec"/>
					<element ref = "ipdr:IPDRRecRef"/>
				</choice>
				<choice>
					<element ref = "ipdr:SS"/>
					<element ref = "ipdr:SSRef"/>
				</choice>
				<element ref = "ipdr:UE"/>
				<element ref = "ipdr:BaseIPDR" minOccurs = "0"/>
			</sequence>
			<attribute name = "id" type = "ID"/>
			<attribute name = "time" use = "required" type = "timeInstant"/>
			<attribute name = "seqNum" type = "integer"/>
		</complexType>
	</element>
	<element name = "SS">
		<annotation>
			<documentation> The Service Session (SS) element groups the
              Service Consumer and Service Element information. This
              grouping allows an SC/SE pair to be associated with other 
              IPDRs via a single reference (the SSRef).
          </documentation>
		</annotation>
		<complexType>
			<sequence>
				<choice>
					<element ref = "ipdr:SC"/>
					<element ref = "ipdr:SCRef"/>
				</choice>
				<choice>
					<element ref = "ipdr:SE"/>
					<element ref = "ipdr:SERef"/>
				</choice>
			</sequence>
			<attribute name = "id" type = "ID"/>
			<attribute name = "service" type = "string"/>
		</complexType>
	</element>
	<complexType name = "SCType"
		 final = "restriction">
		<sequence/>
		<attribute name = "id" type = "ID"/>
	</complexType>
	<element name = "SC" type = "ipdr:SCType">
		<annotation>
			<documentation> This element describes the Service Consumer. 
      </documentation>
		</annotation>
	</element>
	<complexType name = "SEType"
		 final = "restriction">
		<sequence/>
		<attribute name = "id" type = "ID"/>
	</complexType>
	<element name = "SE" type = "ipdr:SEType">
		<annotation>
			<documentation> This element describes the Service Element. 
      </documentation>
		</annotation>
	</element>
	<complexType name = "UEType"
		 final = "restriction">
		<sequence/>
		<attribute name = "type" use = "default" value = "Start-Stop">
			<simpleType>
				<restriction base = "string">
					<enumeration value = "Start"/>
					<enumeration value = "Stop"/>
					<enumeration value = "Start-Stop"/>
					<enumeration value = "Interim"/>
				</restriction>
			</simpleType>
		</attribute>
	</complexType>
	<element name = "UE" type = "ipdr:UEType">
		<annotation>
			<documentation> This element describes the Usage Entry. 
      </documentation>
		</annotation>
	</element>
	<element name = "SSRef">
		<annotation>
			<documentation> The SSRef element may be used to associate common
                        references to the same pairing of a Service Consumer
                        and a Service Element.
        </documentation>
		</annotation>
		<complexType>
			<attribute name = "ref" use = "required" type = "IDREF"/>
		</complexType>
	</element>
	<element name = "SERef">
		<annotation>
			<documentation> The SERef element may be used to associate
            common references to the Service Element.
        </documentation>
		</annotation>
		<complexType>
			<attribute name = "ref" use = "required" type = "IDREF"/>
		</complexType>
	</element>
	<element name = "SCRef">
		<annotation>
			<documentation> The SCRef element may be used to associate 
            common references to the Service Consumer.
        </documentation>
		</annotation>
		<complexType>
			<attribute name = "ref" use = "required" type = "IDREF"/>
		</complexType>
	</element>
	<element name = "BaseIPDR">
		<annotation>
			<documentation> The BaseIPDR element allows reference to be 
            made to IPDRs which contributed to the construction of the 
            current IPDR element. 
        </documentation>
		</annotation>
		<complexType>
			<attribute name = "refs" use = "required" type = "IDREFS"/>
		</complexType>
	</element>
</schema>