Network Measurements Working Group -- home page


NM-WG Schemas

Last updated: May 8, 2006

Base schemas:

Specific schemas:


nmachbw

# ##############################################################
#
# File: 	nmachbw.rnc - Specialized schema for the achievable
#                             bandwidth characteristic
# Version: 	$Id: nmachbw.rnc,v 1.6 2006/02/09 05:32:51 zurawski Exp $
# Purpose: 	Describes specific elements to be used in the
#               representation and handling of generic achievable
#               bandwidth measurements.
# Reference:	http://books.xmlschemata.org/relaxng/page2.html
#
# ##############################################################


# ##############################################################
# Namespace definitions
# ##############################################################
namespace nmwg = "http://ggf.org/ns/nmwg/base/2.0/"
namespace bandwidth = "http://ggf.org/ns/nmwg/characteristics/bandwidth/acheiveable/2.0/"


# ##############################################################
# Include additional functionality from other files
# ##############################################################
 include "nmtopo.rnc"
 include "nmbase.rnc" {
	Metadata |= BandwidthMetadata
	Data |= BandwidthData	
} 


# ##############################################################
# Metadata is the 'data' that describes physical measurements.
# Metadata can be something such as a physical address, or
# a geographical location; any form of static, re-usable
# designation.  It is important to note that the subject
# namespace and parameters namespace MUST match (or the parameters
# can be a generic NMWG) or bad things will occur.
#
# Example:
#
# 
#                metadataIdRef="OPTIONAL_REFERENCE_ID"
#                xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">
#
#   <!-- TBD OPTIONAL SUBJECT -->
#
#   <!-- TBD OPTIONAL PARAMETERS -->
#
#   <!-- TBD OPTIONAL EVENTTYPE -->
#
#   <!-- TBD OPTIONAL KEY -->
#
#   <!-- ANY OPTIONAL (MULTIPLE) ELEMENT IN ANY NAMESPACE -->
#
# 
#
# ##############################################################
	
BandwidthMetadata = 
 element nmwg:metadata {
		Identifier &
		MetadataIdentifierRef? &
		BandwidthMetadataContent
   	}
  	
BandwidthMetadataBlock = 
	BandwidthSubject? &
	(
		BandwidthParameters |
		Parameters
	)?	
	
BandwidthMetadataContent = 
	(
		BandwidthMetadataBlock |
		FilterMetadataBlock		
	) &	
	EventType? &
	Key?	


# ##############################################################
# Redefined bandwidth subject allows only an endPointPair, and
# the two id attributes.
#
# Example:
#
# 
#               metadataIdRef="OPTIONAL_REFERENCE_ID"
#               xmlns:nmwg="http://ggf.org/ns/nmwg/characteristics/bandwidth/acheiveable/2.0/">
#
#   
#
#     
#                   port="OPTIONAL_PORT"/>
#
#     
#                   port="OPTIONAL_PORT"/>
#
#   
#
# 
#
# ##############################################################

BandwidthSubject =
 element bandwidth:subject {
		Identifier &
		MetadataIdentifierRef? &			
		EndpointPair
	}


# ##############################################################
# This is simply the regular method of doing parameters with an
# enumeration to limit what 'names' are accepted and an outer
# bandwidth: namespace for the parameters.
#
# Example:
#
# 
#                   xmlns:nmwg="http://ggf.org/ns/nmwg/characteristics/bandwidth/acheiveable/2.0/">
#
#   
#                   xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">
#
#     <!-- ANY TEXT, (IF YOU DID NOT USE THE VALUE ATTRIBUTE) -->
#
#   
#
#   <!-- MORE PARAMETERS -->
#
# 
#
# ##############################################################

BandwidthParameters =
 element bandwidth:parameters {
		Identifier &	
		BandwidthParameter+
	}
	
BandwidthParameter = 
 element nmwg:parameter {
      		attribute name { "valueUnits" | "numBytes" | "numBytesUnits" } &
		(
      			attribute value { text } |
			text
		)
	}


# ##############################################################
# The data block is complex, and has the potential to contain
# many things.  The data block can be used to return a metadata
# block from a request, commonTime or datum elements, keys,
# or something that we have perhaps not defined as of yet.
#
# Example:
#
# 
#            metadataIdRef="OPTIONAL_REFERENCE_ID"
#            xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">
#
#   <!-- OPTIONAL (MULTIPLE) METADATA -->
#
#   	<!-- OR -->
#
#   <!-- TBD OPTIONAL (MULTIPLE) COMMON TIME ELEMENTS AND
#        OPTIONAL (MULTIPLE) DATUM ELEMENTS-->
#
#   	<!-- OR -->
#
#   <!-- TBD OPTIONAL (MULTIPLE) DATUM ELEMENTS -->
#
#   	<!-- OR -->
#
#   <!-- OPTIONAL (MULTIPLE) KEY ELEMENTS -->
#
#   	<!-- OR -->
#
#   <!-- ANY OPTIONAL (MULTIPLE) ELEMENT IN ANY NAMESPACE -->
#
# 
#
# ##############################################################
   
BandwidthData =
 element nmwg:data {
		Identifier &
		MetadataIdentifierRef? &
		(
			(
				Metadata* |
				BandwidthMetadata*
			) |
			(
				BandwidthCommonTime+ & 
				BandwidthDatum*
			) |
			BandwidthDatum* |
			Key*
		)
   	}


# ##############################################################
# CommonTime is used a a shortcut able to 'factor out' a frequently
# occurring time range that a bunch of datum (or other) elements
# might share, thus reducing complexity of XML representation.
# CommonTime is similar to the other NMWG time stamps (from
# nmtime.rnc) in its potential time representations.
#
# Example:
#
# 
#                  duration="OPTIONAL_DURATION"
#                  inclusive="OPTIONAL_INCLUSIVE_FLAG"
#                  xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">
#
#   <!-- TBD OPTIONAL START TIME ELEMENT (USE END TIME OR DURATION) -->
#
#   <!-- TBD OPTIONAL END TIME ELEMENT (ONLY WITH START TIME) -->
#
#   <!-- TBD OPTIONAL TIME VALUE ELEMENT (USE IF NO VALUE ATTRIBUTE) -->
#
#   <!-- TBD OPTIONAL (MULTIPLE) DATUM ELEMENTS -->
#
#   <!-- ANY OPTIONAL (MULTIPLE) ELEMENT IN ANY NAMESPACE -->
# 
#
# ##############################################################

BandwidthCommonTime = 
 element nmwg:commonTime {
		Type &
      		(
         		TimeStamp |
	 		(
				StartTime & 
            			(
					EndTime | 
					Duration 
				)
         		)
      		) &
		BandwidthDatum*
   	} 

# ##############################################################
# These are the basic elements we would expect to see in the
# specific bandwidth datum.
#
# Example:
#
# 
#              valueUnits="OPTIONAL_VALUE_UNITS"
#              numBytes="OPTIONAL_NUM_BYTES"
#              numBytesUnits="OPTIONAL_NUM_BYTES_UNITS"
#              timeType="OPTIONAL_TIME_TYPE"
#              timeValue="OPTIONAL_TIME_VALUE"
#              xmlns:nmwg="http://ggf.org/ns/nmwg/characteristics/bandwidth/acheiveable/2.0/">
#
#   <!-- TIME ELEMENT (IF ATTRIBUTES NOT USED) -->
#
# 
#
# ##############################################################

BandwidthDatum =
 element bandwidth:datum {
      		attribute value { xsd:float } &
      		attribute valueUnits { xsd:string }? &	
      		attribute numBytes { xsd:int }? &
      		attribute numBytesUnits { xsd:string }? &
      		(
         		(
            			attribute timeType { xsd:string } & 
            			attribute timeValue { xsd:string }
         		) |
         		Time
      		)?              	 
   	}

nmbase

# ##############################################################
#
# File: 	nmbase.rnc - Main schema definition
# Version: 	$Id: nmbase.rnc,v 1.18 2006/02/09 05:32:51 zurawski Exp $
# Purpose: 	This is the main relax schema file, it defines
# 		the general makeup of an NMWG structured message.
# Reference:	http://books.xmlschemata.org/relaxng/page2.html
#
# ##############################################################


# ##############################################################
# Namespace definitions
# ##############################################################
namespace nmwg = "http://ggf.org/ns/nmwg/base/2.0/"


# ##############################################################
# Include additional functionality from other files
# ##############################################################
 include "nmtime.rnc"


# ##############################################################
# Every suitable NMWG document should begin with either a
# 'store' or 'message' element, in the appropriate namespace.
# Patterns are defined for the content of each element.
#
# Example (using message):
#
# 
#               messageIdRef="OPTIONAL_REFERENCE_ID"
#               type="REQUIRED_TYPE"
#               xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">
#
#   <!-- TBD OPTIONAL PARAMETERS -->
#
#   <!-- TBD OPTIONAL (MULTIPLE) METADATA -->
#
#   <!-- TBD OPTIONAL (MULTIPLE) DATA -->
#
# 
#
# ##############################################################

start =
 element nmwg:message { MessageContent } |
 element nmwg:store { StoreContent }

MessageContent =
	Identifier? & 
	MessageIdentifierRef? &
	Type &
	Parameters? &			
	(
		Metadata |  
		Data
	)+
	
	
StoreContent = 
	Identifier? & 
	MessageIdentifierRef? &
	Type &
	Parameters? &			
	(
		Metadata |  
		Data
	)+	


# ##############################################################
# Metadata is the 'data' that describes physical measurements.
# Metadata can be something such as a physical address, or
# a geographical location; any form of static, re-usable
# designation.  It is important to note that the subject
# namespace and parameters namespace MUST match (or the parameters
# can be a generic NMWG) or bad things will occur.
#
# Example:
#
# 
#                metadataIdRef="OPTIONAL_REFERENCE_ID"
#                xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">
#
#   <!-- TBD OPTIONAL SUBJECT -->
#
#   <!-- TBD OPTIONAL PARAMETERS -->
#
#   <!-- TBD OPTIONAL EVENTTYPE -->
#
#   <!-- TBD OPTIONAL KEY -->
#
#   <!-- ANY OPTIONAL (MULTIPLE) ELEMENT IN ANY NAMESPACE -->
#
# 
#
# ##############################################################
	
Metadata = 
 element nmwg:metadata {
		(
			Identifier &
			MetadataIdentifierRef? &
			MetadataContent
		),
		anyElement*
   	}
  	
	
MetadataBlock =
	Subject? &
	Parameters?	
	
MetadataContent = 
	(
		MetadataBlock |
		FilterMetadataBlock		
	) &	
	EventType? &
	Key?	


# ##############################################################
# Subject identifies an endPoint (or points), perhaps the name of
# a service, or some other form of physical location.  For the
# purpose of the general case we make no assumptions on potential
# elements and allow all elements, in any namespace.  Verification
# can be handled in subsequent schema files.
#
# Example:
#
# 
#               metadataIdRef="OPTIONAL_REFERENCE_ID"
#               xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">
#
#   <!-- ANY ELEMENT IN ANY NAMESPACE -->
#
# 
#
# ##############################################################

Subject = 
 element nmwg:subject { SubjectContent }

SubjectContent = 
	(
   		Identifier &
		MetadataIdentifierRef?	
  	),
	anyElement*
	

# ##############################################################
# Parameters and Parameter elements can be used in a number of
# ways: in the message to signify items such as time stamp or
# authorization, in metadata or data to specify filters or
# special cases for the information.  A 'parameters' block
# has an id, and encloses one to many 'parameter' elements.
# These elements have a required 'name', and may contain
# an attribute, element, or text value (only one please,
# software using this should consider complex elements, then
# text, and finally the value attribute; exceptions should
# be thrown on duplicates).
#
# Example:
#
# 
#                  xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">
#
#   
#                   xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">
#
#     <!-- ANY TEXT, OR ANY ELEMENT ANY NAMESPACE (IF YOU DID NOT
#          USE THE VALUE ATTRIBUTE) -->
#
#   
#
#   <!-- MORE PARAMETERS -->
#
# 
#
# The namespaces can of course be different.
#
# ##############################################################

Parameters = 
 element nmwg:parameters { ParametersContent }
   
ParametersContent =    
	Identifier &
	Parameter+
   
Parameter = 
 element nmwg:parameter {
      		attribute name { xsd:string } &
		(
      			attribute value { xsd:string } |
			anyElement |
      			text
		)
	}   


# ##############################################################
# Event type is a simple text element used to describe the
# characteristic or event of the data.
#
# Example:
#
# 
#
#   <!-- TEXT -->
#
# 
#
# ##############################################################

EventType = 
 element nmwg:eventType { xsd:string }

   
# ##############################################################
# The key is used to return a 'pointer' or otherwise special chunk
# of identifying information in response to a request.  For now
# this information is enclosed only within a parameters block.
# The optional ID can be used to track past searches.
#
# Example:
#
# 
#           xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">
#
#   <!-- OPTIONAL PARAMETERS -->
#
# 
#
# ##############################################################
   
Key = 
 element nmwg:key {
		Identifier? &
		(
			Parameters |
			FilterParameters				
		)
	}	
	
	   
# ##############################################################
# The data block is complex, and has the potential to contain
# many things.  The data block can be used to return a metadata
# block from a request, commonTime or datum elements, keys,
# or something that we have perhaps not defined as of yet.
#
# Example:
#
# 
#            metadataIdRef="OPTIONAL_REFERENCE_ID"
#            xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">
#
#   <!-- OPTIONAL (MULTIPLE) METADATA -->
#
#   	<!-- OR -->
#
#   <!-- TBD OPTIONAL (MULTIPLE) COMMON TIME ELEMENTS AND
#        OPTIONAL (MULTIPLE) DATUM ELEMENTS-->
#
#   	<!-- OR -->
#
#   <!-- TBD OPTIONAL (MULTIPLE) DATUM ELEMENTS -->
#
#   	<!-- OR -->
#
#   <!-- OPTIONAL (MULTIPLE) KEY ELEMENTS -->
#
#   	<!-- OR -->
#
#   <!-- ANY OPTIONAL (MULTIPLE) ELEMENT IN ANY NAMESPACE -->
#
# 
#
# ##############################################################
   
Data =
 element nmwg:data {
		(
			Identifier &
			MetadataIdentifierRef? &
			(
				Metadata* |
				(
					commonTime+ & 
					Datum*
				) |
				Datum* |
				Key*
			)
		),
		anyElement*
   	}


# ##############################################################
# CommonTime is used a a shortcut able to 'factor out' a frequently
# occurring time range that a bunch of datum (or other) elements
# might share, thus reducing complexity of XML representation.
# CommonTime is similar to the other NMWG time stamps (from
# nmtime.rnc) in its potential time representations.
#
# Example:
#
# 
#                  duration="OPTIONAL_DURATION"
#                  inclusive="OPTIONAL_INCLUSIVE_FLAG"
#                  xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">
#
#   <!-- TBD OPTIONAL START TIME ELEMENT (USE END TIME OR DURATION) -->
#
#   <!-- TBD OPTIONAL END TIME ELEMENT (ONLY WITH START TIME) -->
#
#   <!-- TBD OPTIONAL TIME VALUE ELEMENT (USE IF NO VALUE ATTRIBUTE) -->
#
#   <!-- TBD OPTIONAL (MULTIPLE) DATUM ELEMENTS -->
#
#   <!-- ANY OPTIONAL (MULTIPLE) ELEMENT IN ANY NAMESPACE -->
# 
#
# ##############################################################

commonTime = 
 element nmwg:commonTime {
		(
			Type &
      			(
         			TimeStamp |
	 			(
					StartTime & 
            				(
						EndTime | 
						Duration 
					)
         			)
      			) &
			Datum*
		),
		anyElement*
   	} 


# ##############################################################
# The datum is meant to be generic in this case, because specific
# namespace declarations should be used to better define what
# format that datum should have.
#
# Example:
#
# 
#             xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">
#
#   <!-- ANY ELEMENT IN ANY NAMESPACE OR ANY TEXT -->
#
# 
#
# ##############################################################

Datum = 
 element nmwg:datum {
      		anyThing  
   	}
	
	

	
# ##############################################################
# Common elements defined as named patterns, as they are re-used
# several times.
# ##############################################################
		
Identifier =
    	attribute id { xsd:string }

MetadataIdentifierRef =
    	attribute metadataIdRef { xsd:string }

MessageIdentifierRef =
    	attribute messageIdRef { xsd:string }
    
Type = 
	attribute type { xsd:string }    


# ##############################################################
# This sequence allows any element, attribute, or text (regardless
# of name, or namespace) into the document when invoked.
# ##############################################################

anyElement = 
 element * {
		anyThing 
	}

anyAttribute = 
	attribute * { 
		text 
	}

anyThing = 
	( 
		anyElement | 
		anyAttribute | 
		text 
	)*
	
	
# ##############################################################
# This sequence allows any element, attribute, or text (only in the
# NMWG namespace) into the document when invoked.
# ##############################################################
	
	
anyNMWGElement = 
 element nmwg:* {
		anyNMWGThing 
	}

anyNMWGAttribute = 
	attribute * { 
		text 
	}

anyNMWGThing = 
	( 
		anyNMWGElement | 
		anyNMWGAttribute | 
		text 
	)*	



nmdelayrtt

# ##############################################################
#
# File: 	nmdelay.rnc - Specialized schema for delay
#                             measurements
# Version: 	$Id: nmdelayrtt.rnc,v 1.8 2006/02/09 05:32:51 zurawski Exp $
# Purpose: 	Describes specific elements to be used in the
#               representation and handling of delay oriented
#               measurements.
# Reference:	http://books.xmlschemata.org/relaxng/page2.html
#
# ##############################################################


# ##############################################################
# Namespace definitions
# ##############################################################
namespace nmwg = "http://ggf.org/ns/nmwg/base/2.0/"
namespace nmdrt = "http://ggf.org/ns/nmwg/characteristic/delay/roundTrip/2.0/"


# ##############################################################
# Include additional functionality from other files
# ##############################################################
 include "nmtopo.rnc"
 include "nmbase.rnc" {
	Metadata |= DelayMetadata
	Data |= DelayData	
} 


# ##############################################################
# Metadata is the 'data' that describes physical measurements.
# Metadata can be something such as a physical address, or
# a geographical location; any form of static, re-usable
# designation.  It is important to note that the subject
# namespace and parameters namespace MUST match (or the parameters
# can be a generic NMWG) or bad things will occur.
#
# Example:
#
# 
#                metadataIdRef="OPTIONAL_REFERENCE_ID"
#                xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">
#
#   <!-- TBD OPTIONAL SUBJECT -->
#
#   <!-- TBD OPTIONAL PARAMETERS -->
#
#   <!-- TBD OPTIONAL EVENTTYPE -->
#
#   <!-- TBD OPTIONAL KEY -->
#
#   <!-- ANY OPTIONAL (MULTIPLE) ELEMENT IN ANY NAMESPACE -->
#
# 
#
# ##############################################################
	
DelayMetadata = 
 element nmwg:metadata {
		Identifier &
		MetadataIdentifierRef? &
		DelayMetadataContent
   	}
  	
DelayMetadataBlock = 
	DelaySubject? &
	(
		DelayParameters |
		Parameters
	)?	
	
DelayMetadataContent = 
	(
		DelayMetadataBlock |
		FilterMetadataBlock		
	) &	
	EventType? &
	Key?	

# ##############################################################
# Redefined delay subject allows only an endPointPair, and the
# two id attributes.
#
# Example:
#
# 
#               metadataIdRef="OPTIONAL_REFERENCE_ID"
#               xmlns:nmwg="http://ggf.org/ns/nmwg/characteristic/delay/roundTrip/2.0/">
#
#   
#
#     
#                   port="OPTIONAL_PORT"/>
#
#     
#                   port="OPTIONAL_PORT"/>
#
#   
#
# 
#
# ##############################################################

DelaySubject =
 element nmdrt:subject {
		Identifier &
		MetadataIdentifierRef? &			
		EndpointPair
	}


# ##############################################################
# This is simply the regular method of doing parameters with an
# enumeration to limit what 'names' are accepted and an outer
# nmdrt: namespace for the parameters.
#
# Example:
#
# 
#                   xmlns:nmwg="http://ggf.org/ns/nmwg/characteristic/delay/roundTrip/2.0/">
#
#   
#                   xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">
#
#     <!-- ANY TEXT, (IF YOU DID NOT USE THE VALUE ATTRIBUTE) -->
#
#   
#
#   <!-- MORE PARAMETERS -->
#
# 
#
# ##############################################################

DelayParameters =
 element nmdrt:parameters {
		Identifier &	
		DelayParameter+
	}
	
DelayParameter = 
 element nmwg:parameter {
      		attribute name { "packetType" | "packetSize" | "numPackets" | 
                                 "packetSpacing" | "packetGap" | "protocolID" | 
                                 "typeOfService" | "differentiatedServicesCodePoint" | 
				 "flowLabel" | "lossThreshold" | "valueUnits" | 
				 "numBytes" | "numBytesUnits"  } &
		(
      			attribute value { text } |
			text
		)
	}


# ##############################################################
# The data block is complex, and has the potential to contain
# many things.  The data block can be used to return a metadata
# block from a request, commonTime or datum elements, keys,
# or something that we have perhaps not defined as of yet.
#
# Example:
#
# 
#            metadataIdRef="OPTIONAL_REFERENCE_ID"
#            xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">
#
#   <!-- OPTIONAL (MULTIPLE) METADATA -->
#
#   	<!-- OR -->
#
#   <!-- TBD OPTIONAL (MULTIPLE) COMMON TIME ELEMENTS AND
#        OPTIONAL (MULTIPLE) DATUM ELEMENTS-->
#
#   	<!-- OR -->
#
#   <!-- TBD OPTIONAL (MULTIPLE) DATUM ELEMENTS -->
#
#   	<!-- OR -->
#
#   <!-- OPTIONAL (MULTIPLE) KEY ELEMENTS -->
#
#   	<!-- OR -->
#
#   <!-- ANY OPTIONAL (MULTIPLE) ELEMENT IN ANY NAMESPACE -->
#
# 
#
# ##############################################################
   
DelayData =
 element nmwg:data {
		Identifier &
		MetadataIdentifierRef? &
		(
			(
				Metadata* |
				DelayMetadata*
			) |
			(
				DelayCommonTime+ & 
				DelayDatum*
			) |
			DelayDatum* |
			Key*
		)
   	}


# ##############################################################
# CommonTime is used a a shortcut able to 'factor out' a frequently
# occurring time range that a bunch of datum (or other) elements
# might share, thus reducing complexity of XML representation.
# CommonTime is similar to the other NMWG time stamps (from
# nmtime.rnc) in its potential time representations.
#
# Example:
#
# 
#                  duration="OPTIONAL_DURATION"
#                  inclusive="OPTIONAL_INCLUSIVE_FLAG"
#                  xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">
#
#   <!-- TBD OPTIONAL START TIME ELEMENT (USE END TIME OR DURATION) -->
#
#   <!-- TBD OPTIONAL END TIME ELEMENT (ONLY WITH START TIME) -->
#
#   <!-- TBD OPTIONAL TIME VALUE ELEMENT (USE IF NO VALUE ATTRIBUTE) -->
#
#   <!-- TBD OPTIONAL (MULTIPLE) DATUM ELEMENTS -->
#
#   <!-- ANY OPTIONAL (MULTIPLE) ELEMENT IN ANY NAMESPACE -->
# 
#
# ##############################################################

DelayCommonTime = 
 element nmwg:commonTime {
		Type &
      		(
         		TimeStamp |
	 		(
				StartTime & 
            			(
					EndTime | 
					Duration 
				)
         		)
      		) &
		DelayDatum*
   	} 

# ##############################################################
# These are the basic elements we would expect to see in the
# specific delay datum.
#
# Example:
#
# 
#              valueUnits="OPTIONAL_VALUE_UNITS"
#              numBytes="OPTIONAL_NUM_BYTES"
#              numBytesUnits="OPTIONAL_NUM_BYTES_UNITS"
#              timeType="OPTIONAL_TIME_TYPE"
#              timeValue="OPTIONAL_TIME_VALUE"
#              xmlns:nmwg="http://ggf.org/ns/nmwg/characteristic/delay/roundTrip/2.0/">
#
#   <!-- TIME ELEMENT (IF ATTRIBUTES NOT USED) -->
#
# 
#
# ##############################################################

DelayDatum =
 element nmdrt:datum {
      		attribute value { xsd:float } &
      		attribute valueUnits { xsd:string }? &	
      		attribute numBytes { xsd:int }? &
      		attribute numBytesUnits { xsd:string }? &
      		(
         		(
            			attribute timeType { xsd:string } & 
            			attribute timeValue { xsd:string }
         		) |
         		Time
      		)?              	 
   	}


nmtime

# ##############################################################
#
# File: 	nmtime.rnc - NMWG Time definitions
# Version: 	$Id: nmtime.rnc,v 1.6 2006/02/09 05:32:51 zurawski Exp $
# Purpose: 	This describes a general time format for
#               representing measurements.  It is far from complete,
#               and may be best represented by other methods.
# Reference:	http://books.xmlschemata.org/relaxng/page2.html
#
# ##############################################################


# ##############################################################
# Namespace definitions
# ##############################################################
namespace nmtm = "http://ggf.org/ns/nmwg/time/2.0/"


# ##############################################################
# Regular time is attached to a specific datum instance, it is
# essentially the the same as before, but cannot have anything
# 'inside' of it.  The type can be simple like UNIX, etc. or it
# could be something like timeRange, or timeInterval.  If this is
# the case we would then see the two extra time designators for
# the start and end (or duration)
#
# Example:
#
# 
#            duration="OPTIONAL_DURATION"
#            inclusive="OPTIONAL_INCLUSIVE_FLAG"
#            xmlns:nmtm="http://ggf.org/ns/nmwg/time/2.0/">
#
#   <!-- TBD OPTIONAL START TIME ELEMENT (USE END TIME OR DURATION) -->
#
#   <!-- TBD OPTIONAL END TIME ELEMENT (ONLY WITH START TIME) -->
#
#   <!-- TBD OPTIONAL TIME VALUE ELEMENT (USE IF NO VALUE ATTRIBUTE) -->
#
# 
#
# ##############################################################

Time = 
 element nmtm:time {
		attribute type { xsd:string } &
		(
       			TimeStamp |
         		(
				StartTime & 
            			( 
					EndTime | 
					Duration
				)
         		)
      		)
   	} 

TimeStamp =    
   	attribute value { xsd:string } |
 element nmtm:value { xsd:string }

Duration =
   	attribute duration { xsd:string }

TimeContent = 
	attribute type { token } &
	attribute inclusive { token }? &
	TimeStamp	

StartTime = 
 element nmtm:start { TimeContent }
   
EndTime = 
 element nmtm:end { TimeContent }

nmtopo

# ##############################################################
#
# File: 	nmtopo.rnc - Schema to describe topological
#                            features to be used in subject
#                            elements.
# Version: 	$Id: nmtopo.rnc,v 1.12 2006/02/13 06:18:29 zurawski Exp $
# Purpose: 	This file lays out some major network topologies
#               used in measurement.
# Reference:	http://books.xmlschemata.org/relaxng/page2.html
#
# ##############################################################


# ##############################################################
# Namespace definitions
# ##############################################################
namespace nmwgtopo = "http://ggf.org/ns/nmwg/topology/2.0/"


# ##############################################################
# Covers the basic point to point measurement situation.  The two
# points are a source and destination; may contain information
# such as hostname or ip address, and port number when applicable.
#
# Example:
#
# 
#
#   
#                 port="OPTIONAL_PORT"/>
#
#   
#                 port="OPTIONAL_PORT"/>
#
# 
#
# ##############################################################

EndpointPair = 
 element nmwgtopo:endPointPair { EndpointPairContent }

EndpointPairContent =
 element nmwgtopo:src { EndpointContent } &
 element nmwgtopo:dst { EndpointContent }


# ##############################################################
# Similar to above, from one point only.
#
# Example:
#
# 
#               port="OPTIONAL_PORT"/>
#
# ##############################################################

Endpoint = 
 element nmwgtopo:endPoint { EndpointContent }

EndpointContent = 
	(
   		attribute value { xsd:string } |
		text
   	) &
	attribute type { xsd:string } &
   	attribute port { xsd:int }?


# ##############################################################
# When looking at network utilization numbers (from a router or
# related software) there is a different set of applicable
# information
#
# Example:
#
# 
#
#    TEXT 
#
#    TEXT 
#
#    TEXT 
#
#    TEXT 
#
#    TEXT 
#
#    TEXT 
#
#    TEXT 
#
#    TEXT 
#
#    TEXT 
#
#    TEXT 
#
#    TEXT 
#
#    TEXT 
#
# 
#
# ##############################################################

Interface = element nmwgtopo:interface { InterfaceContent }

InterfaceContent = 
 element nmwgtopo:ipAddress { Address }? &
 element nmwgtopo:hostName { xsd:string }? &
 element nmwgtopo:ifName { xsd:string }? &
 element nmwgtopo:ifDescription { xsd:string }? &
 element nmwgtopo:ifAddress { Address }? &
 element nmwgtopo:ifHostName { xsd:string }? &
 element nmwgtopo:ifIndex { xsd:string }? &
 element nmwgtopo:type { xsd:string }? &
 element nmwgtopo:direction { xsd:string }? &
 element nmwgtopo:authRealm { xsd:string }? &
 element nmwgtopo:classOfService { xsd:string }? &
 element nmwgtopo:capacity { xsd:string }?

Address = 
	(
   		attribute value { xsd:string } |
		text
   	) &
   	attribute type { xsd:string }

ping

# ##############################################################
#
# File: 	ping.rnc - Specialized schema for the ping
#                          tool
# Version: 	$Id: ping.rnc,v 1.10 2006/02/09 05:32:51 zurawski Exp $
# Purpose: 	Describes specific elements to be used in the
#               representation and handling of ping
#               measurements.
# Reference:	http://books.xmlschemata.org/relaxng/page2.html
#
# ##############################################################


# ##############################################################
# Namespace definitions
# ##############################################################
namespace nmwg = "http://ggf.org/ns/nmwg/base/2.0/"
namespace ping = "http://ggf.org/ns/nmwg/tools/ping/2.0/"


# ##############################################################
# Include additional functionality from other files
# ##############################################################
 include "nmtopo.rnc"
 include "nmbase.rnc" {
	Metadata |= PingMetadata
	Data |= PingData	
} 



# ##############################################################
# Metadata is the 'data' that describes physical measurements.
# Metadata can be something such as a physical address, or
# a geographical location; any form of static, re-usable
# designation.  It is important to note that the subject
# namespace and parameters namespace MUST match (or the parameters
# can be a generic NMWG) or bad things will occur.
#
# Example:
#
# 
#                metadataIdRef="OPTIONAL_REFERENCE_ID"
#                xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">
#
#   <!-- TBD OPTIONAL SUBJECT -->
#
#   <!-- TBD OPTIONAL PARAMETERS -->
#
#   <!-- TBD OPTIONAL EVENTTYPE -->
#
#   <!-- TBD OPTIONAL KEY -->
#
#   <!-- ANY OPTIONAL (MULTIPLE) ELEMENT IN ANY NAMESPACE -->
#
# 
#
# ##############################################################
	
PingMetadata = 
 element nmwg:metadata {
		Identifier &
		MetadataIdentifierRef? &
		PingMetadataContent
   	}
  	
PingMetadataBlock = 
	PingSubject? &
	(
		PingParameters |
		Parameters
	)?	
	
PingMetadataContent = 
	(
		PingMetadataBlock |
		FilterMetadataBlock		
	) &	
	EventType? &
	Key?	


# ##############################################################
# Redefined ping subject allows only an endPointPair, and the
# two id attributes.
#
# Example:
#
# 
#               metadataIdRef="OPTIONAL_REFERENCE_ID"
#               xmlns:nmwg="http://ggf.org/ns/nmwg/tools/ping/2.0/">
#
#   
#
#     
#                   port="OPTIONAL_PORT"/>
#
#     
#                   port="OPTIONAL_PORT"/>
#
#   
#
# 
#
# ##############################################################

PingSubject =
 element ping:subject {
		Identifier &
		MetadataIdentifierRef? &			
		EndpointPair
	}


# ##############################################################
# This is simply the regular method of doing parameters with an
# enumeration to limit what 'names' are accepted and an outer
# ping: namespace for the parameters.
#
# Example:
#
# 
#                   xmlns:nmwg="http://ggf.org/ns/nmwg/tools/ping/2.0/">
#
#   
#                   xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">
#
#     <!-- ANY TEXT, (IF YOU DID NOT USE THE VALUE ATTRIBUTE) -->
#
#   
#
#   <!-- MORE PARAMETERS -->
#
# 
#
# ##############################################################

PingParameters =
 element ping:parameters {
		Identifier &	
		PingParameter+
	}
	
PingParameter = 
 element nmwg:parameter {
      		attribute name { "count" | "interval" | "deadline" | 
                                 "packetSize" | "ttl" | "arguments" |   
                                 "valueUnits" | "numBytes" | 
                                 "numBytesUnits" } &
		(
      			attribute value { text } |
			text
		)
	}


# ##############################################################
# The data block is complex, and has the potential to contain
# many things.  The data block can be used to return a metadata
# block from a request, commonTime or datum elements, keys,
# or something that we have perhaps not defined as of yet.
#
# Example:
#
# 
#            metadataIdRef="OPTIONAL_REFERENCE_ID"
#            xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">
#
#   <!-- OPTIONAL (MULTIPLE) METADATA -->
#
#   	<!-- OR -->
#
#   <!-- TBD OPTIONAL (MULTIPLE) COMMON TIME ELEMENTS AND
#        OPTIONAL (MULTIPLE) DATUM ELEMENTS-->
#
#   	<!-- OR -->
#
#   <!-- TBD OPTIONAL (MULTIPLE) DATUM ELEMENTS -->
#
#   	<!-- OR -->
#
#   <!-- OPTIONAL (MULTIPLE) KEY ELEMENTS -->
#
#   	<!-- OR -->
#
#   <!-- ANY OPTIONAL (MULTIPLE) ELEMENT IN ANY NAMESPACE -->
#
# 
#
# ##############################################################
   
PingData =
 element nmwg:data {
		Identifier &
		MetadataIdentifierRef? &
		(
			(
				Metadata* |
				PingMetadata*
			) |
			(
				PingCommonTime+ & 
				PingDatum*
			) |
			PingDatum* |
			Key*
		)
   	}


# ##############################################################
# CommonTime is used a a shortcut able to 'factor out' a frequently
# occurring time range that a bunch of datum (or other) elements
# might share, thus reducing complexity of XML representation.
# CommonTime is similar to the other NMWG time stamps (from
# nmtime.rnc) in its potential time representations.
#
# Example:
#
# 
#                  duration="OPTIONAL_DURATION"
#                  inclusive="OPTIONAL_INCLUSIVE_FLAG"
#                  xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">
#
#   <!-- TBD OPTIONAL START TIME ELEMENT (USE END TIME OR DURATION) -->
#
#   <!-- TBD OPTIONAL END TIME ELEMENT (ONLY WITH START TIME) -->
#
#   <!-- TBD OPTIONAL TIME VALUE ELEMENT (USE IF NO VALUE ATTRIBUTE) -->
#
#   <!-- TBD OPTIONAL (MULTIPLE) DATUM ELEMENTS -->
#
#   <!-- ANY OPTIONAL (MULTIPLE) ELEMENT IN ANY NAMESPACE -->
# 
#
# ##############################################################

PingCommonTime = 
 element nmwg:commonTime {
		Type &
      		(
         		TimeStamp |
	 		(
				StartTime & 
            			(
					EndTime | 
					Duration 
				)
         		)
      		) &
		PingDatum*
   	} 


# ##############################################################
# These are the basic elements we would expect to see in the
# specific ping datum.
#
# Example:
#
# 
#              valueUnits="OPTIONAL_VALUE_UNITS"
#              numBytes="OPTIONAL_NUM_BYTES"
#              numBytesUnits="OPTIONAL_NUM_BYTES_UNITS"
#              seqNum="OPTIONAL_SEQ_NUM"
#              ttl="OPTIONAL_TTL"
#              timeType="OPTIONAL_TIME_TYPE"
#              timeValue="OPTIONAL_TIME_VALUE"
#              xmlns:nmwg="http://ggf.org/ns/nmwg/tools/ping/2.0/">
#
#   <!-- TIME ELEMENT (IF ATTRIBUTES NOT USED) -->
#
# 
#
# ##############################################################

PingDatum =
 element ping:datum {
      		attribute value { xsd:float } &
      		attribute valueUnits { xsd:string }? &	
      		attribute numBytes { xsd:int }? &
      		attribute numBytesUnits { xsd:string }? &
		attribute seqNum { xsd:int }? &
      		attribute ttl { xsd:int }? &
      		(
         		(
            			attribute timeType { xsd:string } & 
            			attribute timeValue { xsd:string }
         		) |
         		Time
      		)?              	 
   	}

traceroute

# ##############################################################
#
# File: 	traceroute.rnc - Specialized schema for the
#				 traceroute tool
# Version: 	$Id: traceroute.rnc,v 1.10 2006/02/09 05:32:51 zurawski Exp $
# Purpose: 	Describes specific elements to be used in the
#               representation and handling of traceroute
#               measurements.
# Reference:	http://books.xmlschemata.org/relaxng/page2.html
#
# ##############################################################


# ##############################################################
# Namespace definitions
# ##############################################################
namespace nmwg = "http://ggf.org/ns/nmwg/base/2.0/"
namespace traceroute = "http://ggf.org/ns/nmwg/tools/traceroute/2.0/"


# ##############################################################
# Include additional functionality from other files
# ##############################################################
 include "nmtopo.rnc"
 include "nmbase.rnc" {
	Metadata |= TracerouteMetadata
	Data |= TracerouteData	
} 



# ##############################################################
# Metadata is the 'data' that describes physical measurements.
# Metadata can be something such as a physical address, or
# a geographical location; any form of static, re-usable
# designation.  It is important to note that the subject
# namespace and parameters namespace MUST match (or the parameters
# can be a generic NMWG) or bad things will occur.
#
# Example:
#
# 
#                metadataIdRef="OPTIONAL_REFERENCE_ID"
#                xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">
#
#   <!-- TBD OPTIONAL SUBJECT -->
#
#   <!-- TBD OPTIONAL PARAMETERS -->
#
#   <!-- TBD OPTIONAL EVENTTYPE -->
#
#   <!-- TBD OPTIONAL KEY -->
#
#   <!-- ANY OPTIONAL (MULTIPLE) ELEMENT IN ANY NAMESPACE -->
#
# 
#
# ##############################################################
	
TracerouteMetadata = 
 element nmwg:metadata {
		Identifier &
		MetadataIdentifierRef? &
		TracerouteMetadataContent
   	}
  	
TracerouteMetadataBlock = 
	TracerouteSubject? &
	(
		TracerouteParameters |
		Parameters
	)?	
	
TracerouteMetadataContent = 
	(
		TracerouteMetadataBlock |
		FilterMetadataBlock		
	) &	
	EventType? &
	Key?	

# ##############################################################
# Redefined ping subject allows only an endPointPair, and the
# two id attributes.
#
# Example:
#
# 
#               metadataIdRef="OPTIONAL_REFERENCE_ID"
#               xmlns:nmwg="http://ggf.org/ns/nmwg/tools/traceroute/2.0/">
#
#   
#
#     
#                   port="OPTIONAL_PORT"/>
#
#     
#                   port="OPTIONAL_PORT"/>
#
#   
#
# 
#
# ##############################################################

TracerouteSubject =
 element traceroute:subject {
		Identifier &
		MetadataIdentifierRef? &			
		EndpointPair
	}


# ##############################################################
# This is simply the regular method of doing parameters with an
# enumeration to limit what 'names' are accepted and an outer
# ping: namespace for the parameters.
#
# Example:
#
# 
#                   xmlns:nmwg="http://ggf.org/ns/nmwg/tools/traceroute/2.0/">
#
#   
#                   xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">
#
#     <!-- ANY TEXT, (IF YOU DID NOT USE THE VALUE ATTRIBUTE) -->
#
#   
#
#   <!-- MORE PARAMETERS -->
#
# 
#
# ##############################################################

TracerouteParameters =
 element traceroute:parameters {
		Identifier &	
		TracerouteParameter+
	}
	
TracerouteParameter = 
 element nmwg:parameter {
      		attribute name { "firstTtl" | "maxTtl" | "waitTime" | 
                                 "pause" | "packetSize" | "arguments" |       
				 "valueUnits" | "numBytes" | 
                                 "numBytesUnits" } &
		(
      			attribute value { text } |
			text
		)
	}


# ##############################################################
# The data block is complex, and has the potential to contain
# many things.  The data block can be used to return a metadata
# block from a request, commonTime or datum elements, keys,
# or something that we have perhaps not defined as of yet.
#
# Example:
#
# 
#            metadataIdRef="OPTIONAL_REFERENCE_ID"
#            xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">
#
#   <!-- OPTIONAL (MULTIPLE) METADATA -->
#
#   	<!-- OR -->
#
#   <!-- TBD OPTIONAL (MULTIPLE) COMMON TIME ELEMENTS AND
#        OPTIONAL (MULTIPLE) DATUM ELEMENTS-->
#
#   	<!-- OR -->
#
#   <!-- TBD OPTIONAL (MULTIPLE) DATUM ELEMENTS -->
#
#   	<!-- OR -->
#
#   <!-- OPTIONAL (MULTIPLE) KEY ELEMENTS -->
#
#   	<!-- OR -->
#
#   <!-- ANY OPTIONAL (MULTIPLE) ELEMENT IN ANY NAMESPACE -->
#
# 
#
# ##############################################################
   
TracerouteData =
 element nmwg:data {
		Identifier &
		MetadataIdentifierRef? &
		(
			(
				Metadata* |
				TracerouteMetadata*
			) |
			(
				TracerouteCommonTime+ & 
				TracerouteDatum*
			) |
			TracerouteDatum* |
			Key*
		)
   	}


# ##############################################################
# CommonTime is used a a shortcut able to 'factor out' a frequently
# occurring time range that a bunch of datum (or other) elements
# might share, thus reducing complexity of XML representation.
# CommonTime is similar to the other NMWG time stamps (from
# nmtime.rnc) in its potential time representations.
#
# Example:
#
# 
#                  duration="OPTIONAL_DURATION"
#                  inclusive="OPTIONAL_INCLUSIVE_FLAG"
#                  xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">
#
#   <!-- TBD OPTIONAL START TIME ELEMENT (USE END TIME OR DURATION) -->
#
#   <!-- TBD OPTIONAL END TIME ELEMENT (ONLY WITH START TIME) -->
#
#   <!-- TBD OPTIONAL TIME VALUE ELEMENT (USE IF NO VALUE ATTRIBUTE) -->
#
#   <!-- TBD OPTIONAL (MULTIPLE) DATUM ELEMENTS -->
#
#   <!-- ANY OPTIONAL (MULTIPLE) ELEMENT IN ANY NAMESPACE -->
# 
#
# ##############################################################

TracerouteCommonTime = 
 element nmwg:commonTime {
		Type &
      		(
         		TimeStamp |
	 		(
				StartTime & 
            			(
					EndTime | 
					Duration 
				)
         		)
      		) &
		TracerouteDatum*
   	} 

# ##############################################################
# These are the basic elements we would expect to see in the
# specific traceroute datum.
#
# Example:
#
# 
#              valueUnits="OPTIONAL_VALUE_UNITS"
#              numBytes="OPTIONAL_NUM_BYTES"
#              numBytesUnits="OPTIONAL_NUM_BYTES_UNITS"
#              ttl="OPTIONAL_TTL"
#              queryNum="OPTIONAL_QUERY_NUM"
#              hop="OPTIONAL_HOP"
#              timeType="OPTIONAL_TIME_TYPE"
#              timeValue="OPTIONAL_TIME_VALUE"
#              xmlns:nmwg="http://ggf.org/ns/nmwg/tools/traceroute/2.0/">
#
#   <!-- TIME ELEMENT (IF ATTRIBUTES NOT USED) -->
#
# 
#
# ##############################################################

TracerouteDatum =
 element traceroute:datum {
      		attribute value { xsd:float } &
      		attribute valueUnits { xsd:string }? &	
      		attribute numBytes { xsd:int }? &
      		attribute numBytesUnits { xsd:string }? &	
      		attribute ttl { xsd:int }? &
      		attribute queryNum { xsd:int }? &
      		attribute hop { xsd:string }? & 
      		(
         		(
            			attribute timeType { xsd:string } & 
            			attribute timeValue { xsd:string }
         		) |
         		Time
      		)?              	 
   	}

utilization

# ##############################################################
#
# File: 	utilization.rnc - Specialized schema for the
#                                 measure of interface utilization
# Version: 	$Id: utilization.rnc,v 1.12 2006/02/09 05:32:51 zurawski Exp $
# Purpose: 	Describes specific elements to be used in the
#               representation and handling of interface
#               utilization
# Reference:	http://books.xmlschemata.org/relaxng/page2.html
#
# ##############################################################


# ##############################################################
# Namespace definitions
# ##############################################################
namespace nmwg = "http://ggf.org/ns/nmwg/base/2.0/"
namespace utilization = "http://ggf.org/ns/nmwg/characteristic/utilization/2.0/"


# ##############################################################
# Include additional functionality from other files
# ##############################################################

 include "nmtopo.rnc"
 include "nmbase.rnc" {
	Metadata |= UtilizationMetadata
	Data |= UtilizationData	
} 


# ##############################################################
# Metadata is the 'data' that describes physical measurements.
# Metadata can be something such as a physical address, or
# a geographical location; any form of static, re-usable
# designation.  It is important to note that the subject
# namespace and parameters namespace MUST match (or the parameters
# can be a generic NMWG) or bad things will occur.
#
# Example:
#
# 
#                metadataIdRef="OPTIONAL_REFERENCE_ID"
#                xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">
#
#   <!-- TBD OPTIONAL SUBJECT -->
#
#   <!-- TBD OPTIONAL PARAMETERS -->
#
#   <!-- TBD OPTIONAL EVENTTYPE -->
#
#   <!-- TBD OPTIONAL KEY -->
#
#   <!-- ANY OPTIONAL (MULTIPLE) ELEMENT IN ANY NAMESPACE -->
#
# 
#
# ##############################################################
	
UtilizationMetadata = 
 element nmwg:metadata {
		Identifier &
		MetadataIdentifierRef? &
		UtilizationMetadataContent
   	}
  	
UtilizationMetadataBlock = 
	UtilizationSubject? &
	(
		UtilizationParameters |
		Parameters
	)?
	
UtilizationMetadataContent = 
	(
		UtilizationMetadataBlock |
		FilterMetadataBlock		
	) &	
	EventType? &
	Key?	


# ##############################################################
# Redefined utilization subject allows only an interface, and
# the two id attributes.
#
# Example:
#
# 
#               metadataIdRef="OPTIONAL_REFERENCE_ID"
#               xmlns:nmwg="http://ggf.org/ns/nmwg/tools/utilization/2.0/">
#
#   
#
#      TEXT 
#
#      TEXT 
#
#      TEXT 
#
#      TEXT 
#
#      TEXT 
#
#      TEXT 
#
#      TEXT 
#
#      TEXT 
#
#      TEXT 
#
#      TEXT 
#
#      TEXT 
#
#      TEXT 
#
#   
#
# 
#
# ##############################################################

UtilizationSubject =
 element utilization:subject {
		Identifier &
		MetadataIdentifierRef? &			
		Interface
	}


# ##############################################################
# This is simply the regular method of doing parameters with an
# enumeration to limit what 'names' are accepted and an outer
# utilization: namespace for the parameters.
#
# Example:
#
# 
#                   xmlns:nmwg="http://ggf.org/ns/nmwg/tools/utilization/2.0/">
#
#   
#                   xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">
#
#     <!-- ANY TEXT, (IF YOU DID NOT USE THE VALUE ATTRIBUTE) -->
#
#   
#
#   <!-- MORE PARAMETERS -->
#
# 
#
# ##############################################################

UtilizationParameters =
 element utilization:parameters {
		Identifier &	
		UtilizationParameter+
	}
	
UtilizationParameter = 
 element nmwg:parameter {
      		attribute name { "interval" | "valueUnits" } &
		(
      			attribute value { text } |
			text
		)
	}


# ##############################################################
# The data block is complex, and has the potential to contain
# many things.  The data block can be used to return a metadata
# block from a request, commonTime or datum elements, keys,
# or something that we have perhaps not defined as of yet.
#
# Example:
#
# 
#            metadataIdRef="OPTIONAL_REFERENCE_ID"
#            xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">
#
#   <!-- OPTIONAL (MULTIPLE) METADATA -->
#
#   	<!-- OR -->
#
#   <!-- TBD OPTIONAL (MULTIPLE) COMMON TIME ELEMENTS AND
#        OPTIONAL (MULTIPLE) DATUM ELEMENTS-->
#
#   	<!-- OR -->
#
#   <!-- TBD OPTIONAL (MULTIPLE) DATUM ELEMENTS -->
#
#   	<!-- OR -->
#
#   <!-- OPTIONAL (MULTIPLE) KEY ELEMENTS -->
#
#   	<!-- OR -->
#
#   <!-- ANY OPTIONAL (MULTIPLE) ELEMENT IN ANY NAMESPACE -->
#
# 
#
# ##############################################################
   
UtilizationData =
 element nmwg:data {
		Identifier &
		MetadataIdentifierRef? &
		(
			(
				Metadata* |
				UtilizationMetadata*
			) |
			(
				UtilizationCommonTime+ & 
				UtilizationDatum*
			) |
			UtilizationDatum* |
			Key*
		)
   	}


# ##############################################################
# CommonTime is used a a shortcut able to 'factor out' a frequently
# occurring time range that a bunch of datum (or other) elements
# might share, thus reducing complexity of XML representation.
# CommonTime is similar to the other NMWG time stamps (from
# nmtime.rnc) in its potential time representations.
#
# Example:
#
# 
#                  duration="OPTIONAL_DURATION"
#                  inclusive="OPTIONAL_INCLUSIVE_FLAG"
#                  xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/">
#
#   <!-- TBD OPTIONAL START TIME ELEMENT (USE END TIME OR DURATION) -->
#
#   <!-- TBD OPTIONAL END TIME ELEMENT (ONLY WITH START TIME) -->
#
#   <!-- TBD OPTIONAL TIME VALUE ELEMENT (USE IF NO VALUE ATTRIBUTE) -->
#
#   <!-- TBD OPTIONAL (MULTIPLE) DATUM ELEMENTS -->
#
#   <!-- ANY OPTIONAL (MULTIPLE) ELEMENT IN ANY NAMESPACE -->
# 
#
# ##############################################################

UtilizationCommonTime = 
 element nmwg:commonTime {
		Type &
      		(
         		TimeStamp |
	 		(
				StartTime & 
            			(
					EndTime | 
					Duration 
				)
         		)
      		) &
		UtilizationDatum*
   	} 


# ##############################################################
# These are the basic elements we would expect to see in the
# specific iperf datum.
#
# Example:
#
# 
#                    valueUnits="OPTIONAL_VALUE_UNITS"
#                    timeType="OPTIONAL_TIME_TYPE"
#                    timeValue="OPTIONAL_TIME_VALUE"
#                    xmlns:nmwg="http://ggf.org/ns/nmwg/tools/utilization/2.0/">
#
#   <!-- TIME ELEMENT (IF ATTRIBUTES NOT USED) -->
#
# 
#
# ##############################################################

UtilizationDatum =
 element utilization:datum {
      		attribute value { xsd:float } &
      		attribute valueUnits { xsd:string }? &	
      		(
         		(
            			attribute timeType { xsd:string } & 
            			attribute timeValue { xsd:string }
         		) |
         		Time
      		)?              	 
   	}