# ##############################################################
#
# 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
)?
}