<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://niem.gov/niem/external/ogc-swe-common/1.0.0/dhs-gmo/1.0.0"
xmlns:swec="http://niem.gov/niem/external/ogc-swe-common/1.0.0/dhs-gmo/1.0.0"
xmlns:xlink="http://niem.gov/niem/external/w3c-xlink/1.0/dhs-gmo/1.0.0"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:annotation>
<xs:documentation>Data components for core SensorML
Note that this schema defines a number of components that mirror types and elements already defined in
GML, in the schema documents basicTypes.xsd, measures.xsd and temporal.xsd
Sensor Model Language OGC 05-086 page 78
DHS Changes:
2006-09-28 Changed namespaces and schema locations
ns old http://niem.gov/niem/external/xlink/1.0.0/dhs-gmo/1.0.0
ns new http://niem.gov/niem/external/w3c-xlink/1.0/dhs-gmo/1.0.0
from ../../../../xlink/1.0.0/dhs-gmo/1.0.0/xlinks.xsd
to ../../../../w3c-xlink/1.0/dhs-gmo/1.0.0/xlinks.xsd
copyright notice
2006-09-22 Changed namespaces following NIEM conventions
1) targetNamespace http://niem.gov//niem/external/ogc-swe-common/1.0.0/dhs-gmo/1.0.0 changed tnsp to swec from swe to distinguish it from swe namespace defined by 05-087r4_Observations_and_measurements.pdf
2) xlink namespace http://niem.gov/niem/external/xlink/1.0.0/dhs-gmo/1.0.0
Copyright Notices:
Copyright © 2005 Open Geospatial Consortium, Inc. All Rights Reserved.
This OGC work (including software, documents, or other related items) is being provided by the copyright holders under the following license. By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions:
Permission to use, copy, and modify this software and its documentation, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications, that you make:
1. The full text of this NOTICE in a location viewable to users of the redistributed or derivative work.
2. Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, a short notice of the following form (hypertext is preferred, text is permitted) should be used within the body of any redistributed or derivative code: "Copyright © [$date-of-document] Open Geospatial Consortium, Inc. All Rights Reserved. http://www.opengeospatial.org/ogc/legal (Hypertext is preferred, but a textual representation is permitted.)
3. Notice of any changes or modifications to the OGC files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.)
THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders.
</xs:documentation>
</xs:annotation>
<!--========================-->
<!-- Includes and Imports -->
<!--========================-->
<!-- <xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="http://schemas.opengis.net/gml/3.1.0/xlink/xlinks.xsd"/> -->
<xs:import namespace="http://niem.gov/niem/external/w3c-xlink/1.0/dhs-gmo/1.0.0"
schemaLocation="../../../../w3c-xlink/1.0/dhs-gmo/1.0.0/xlinks.xsd"/>
<!--====================-->
<!-- Attribute Groups -->
<!--====================-->
<xs:attributeGroup name="AssociationAttributes">
<xs:attribute ref="xlink:href" use="optional"/>
</xs:attributeGroup>
<!--============================-->
<!-- Main Substitution Groups -->
<!--============================-->
<xs:element name="_DataGroup" type="swec:_GroupBaseType" abstract="true"/>
<xs:element name="_DataArray" type="swec:_ArrayBaseType" abstract="true"/>
<!--==========================-->
<!-- Simple Data Components -->
<!--==========================-->
<xs:element name="Boolean" type="swec:BooleanType">
<xs:annotation>
<xs:documentation>True or False, 0 or 1</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Count" type="swec:CountType">
<xs:annotation>
<xs:documentation>Integer number used for a counting value </xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CountRange" type="swec:CountRangeType">
<xs:annotation>
<xs:documentation>Integer pair used for specifying a count range</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Quantity" type="swec:QuantityType">
<xs:annotation>
<xs:documentation>Decimal number with optional unit and bounds</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="QuantityRange" type="swec:QuantityRangeType">
<xs:annotation>
<xs:documentation>Decimal pair for specifying a quantity range</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Category" type="swec:CategoryType">
<xs:annotation>
<xs:documentation>A simple token identifying a term or category (single spaces allowed);
definition attribute should provide dictionary entry useful for interpretation of the value
</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Discussion" type="swec:TextType">
<xs:annotation>
<xs:documentation>A descriptive text with an optional topic</xs:documentation>
</xs:annotation>
</xs:element>
<!--===========================-->
<!-- Time Elements -->
<!--===========================-->
<xs:element name="IsoDateTime" type="swec:IsoDateTimeType">
<xs:annotation>
<xs:documentation>Time instance given in ISO 8601 format (e.g. 2004-04-18T12:03:04.6Z)
or currentTime</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TimeQuantity" type="swec:TimeQuantityType">
<xs:annotation>
<xs:documentation>Time relative to a time origin</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Time" type="swec:TimeType">
<xs:annotation>
<xs:documentation>Time relative to a time origin</xs:documentation>
</xs:annotation>
</xs:element>
<!--===========================-->
<!-- Complex Data Components -->
<!--===========================-->
<xs:element name="DataGroup" substitutionGroup="swec:_DataGroup">
<xs:annotation>
<xs:documentation>Group of other data components</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:complexContent>
<xs:extension base="swec:_GroupBaseType">
<xs:sequence minOccurs="0">
<xs:element name="component" maxOccurs="unbounded">
<xs:complexType>
<xs:group ref="swec:AnyData" minOccurs="0"/>
<xs:attribute name="name" type="swec:qnameSimpleType" use="required"/>
<xs:attributeGroup ref="swec:AssociationAttributes"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="DataArray" substitutionGroup="swec:_DataArray">
<xs:annotation>
<xs:documentation>Array of other data components with a size</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:complexContent>
<xs:extension base="swec:_ArrayBaseType">
<xs:sequence minOccurs="0">
<xs:element name="component">
<xs:complexType>
<xs:group ref="swec:AnyData" minOccurs="0"/>
<xs:attribute name="name" type="swec:qnameSimpleType" use="optional"/>
<xs:attributeGroup ref="swec:AssociationAttributes"/>
</xs:complexType>
</xs:element>
<xs:element ref="swec:tupleValues" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="tupleValues">
<xs:annotation>
<xs:documentation>List of space separated tuples</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:list itemType="swec:tupleType"/>
</xs:simpleType>
</xs:element>
<xs:element name="Curve" substitutionGroup="swec:_DataArray">
<xs:annotation>
<xs:documentation>Curve describing variations of a parameter vs. another quantity
</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:complexContent>
<xs:extension base="swec:CurveType"/>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="ConditionalValue" type="swec:ConditionalValueType" substitutionGroup="swec:_DataGroup"/>
<xs:element name="NormalizedCurve" type="swec:NormalizedCurveType" substitutionGroup="swec:_DataGroup"/>
<xs:complexType name="CurveType">
<xs:complexContent>
<xs:extension base="swec:_ArrayBaseType">
<xs:sequence>
<xs:element name="definition">
<xs:complexType>
<xs:sequence>
<xs:element name="Coordinates">
<xs:complexType>
<xs:complexContent>
<xs:extension base="swec:_GroupBaseType">
<xs:sequence>
<xs:element name="axis" maxOccurs="unbounded">
<xs:complexType>
<xs:group ref="swec:AnyScalar"/>
<xs:attribute name="name" type="swec:qnameSimpleType" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element ref="swec:tupleValues"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="NormalizedCurveType">
<xs:complexContent>
<xs:extension base="swec:_GroupBaseType">
<xs:sequence>
<xs:element name="inputGain" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element ref="swec:Quantity"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="inputBias" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element ref="swec:Quantity"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="outputGain" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element ref="swec:Quantity"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="outputBias" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element ref="swec:Quantity"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="function">
<xs:complexType>
<xs:sequence>
<xs:element ref="swec:Curve"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ConditionalValueType">
<xs:complexContent>
<xs:extension base="swec:_GroupBaseType">
<xs:sequence>
<xs:element name="condition" maxOccurs="unbounded">
<xs:complexType>
<xs:choice minOccurs="0">
<xs:element ref="swec:Discussion"/>
<xs:group ref="swec:AnyData"/>
</xs:choice>
<xs:attribute name="name" type="swec:qnameSimpleType" use="required"/>
<xs:attributeGroup ref="swec:AssociationAttributes"/>
</xs:complexType>
</xs:element>
<xs:element name="value">
<xs:complexType>
<xs:group ref="swec:AnyData" minOccurs="0"/>
<xs:attributeGroup ref="swec:AssociationAttributes"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<!--================-->
<!-- Simple Types -->
<!--================-->
<!-- EmptyType allows Quantity, Count, etc to be nillable (i.e. have no value) -->
<!-- Consider using XML Schema's nillable="true" -->
<xs:simpleType name="emptyType">
<xs:restriction base="xs:string">
<xs:length value="0"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="booleanOrEmpty">
<xs:union memberTypes="xs:boolean swec:emptyType"/>
</xs:simpleType>
<xs:simpleType name="countOrEmpty">
<xs:union memberTypes="xs:integer swec:emptyType"/>
</xs:simpleType>
<xs:simpleType name="decimalOrEmpty">
<xs:union memberTypes="xs:double swec:emptyType"/>
<!--Need double to support scientific notation (ex: 10e3)</xs:documentation-->
</xs:simpleType>
<xs:simpleType name="iso8601">
<xs:union memberTypes="xs:date xs:time xs:dateTime swec:timeString swec:emptyType"/>
<!-- Implemented in GML using gml:TimePositionUnion or gml:TImePositionType -->
</xs:simpleType>
<xs:simpleType name="timeSimpleType">
<xs:union memberTypes="xs:date xs:time xs:dateTime swec:timeString xs:double swec:emptyType"/>
</xs:simpleType>
<xs:simpleType name="timeString">
<xs:restriction base="xs:string">
<xs:enumeration value="currentTime"/>
<xs:enumeration value="unknown"/>
</xs:restriction>
<!-- Implemented in GML using indeterminatePosition attribute on gml:TImePositionType -->
</xs:simpleType>
<xs:simpleType name="uomType">
<xs:restriction base="xs:anyURI"/>
</xs:simpleType>
<!-- consider using GML 3.2's UomIdentifier -->
<!-- this gives an (unambiguous) choice of the UCUM symbol or a URI -->
<xs:simpleType name="uomIdentifier">
<xs:union memberTypes="swec:uomSymbol swec:uomURI"/>
</xs:simpleType>
<xs:simpleType name="uomSymbol">
<xs:restriction base="xs:string">
<xs:pattern value="[^: \n\r\t]+"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="uomURI">
<xs:restriction base="xs:anyURI">
<xs:pattern value="([a-zA-Z][a-zA-Z0-9\-\+\.]*:|\.\./|\./|#).*"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="definitionType">
<xs:restriction base="xs:anyURI"/>
</xs:simpleType>
<xs:simpleType name="nameSimpleType">
<xs:restriction base="xs:token">
<xs:maxLength value="30"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="qnameSimpleType">
<xs:restriction base="xs:QName"/>
</xs:simpleType>
<xs:simpleType name="axisCodeSimpleType">
<xs:restriction base="xs:string">
<xs:enumeration value="X"/>
<xs:enumeration value="Y"/>
<xs:enumeration value="Z"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="timeReferenceSimpleType">
<xs:union memberTypes="xs:date xs:time xs:dateTime xs:anyURI"/>
</xs:simpleType>
<xs:simpleType name="tupleType">
<xs:restriction base="xs:string"/>
</xs:simpleType>
<xs:simpleType name="decimalList">
<xs:list itemType="xs:double"/>
<!-- this is a double, because decimal does not allow scientific notation -->
</xs:simpleType>
<xs:simpleType name="decimalPair">
<xs:restriction base="swec:decimalList">
<xs:length value="2"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="countList">
<xs:list itemType="xs:integer"/>
</xs:simpleType>
<xs:simpleType name="countPair">
<xs:restriction base="swec:countList">
<xs:length value="2"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="arraySizeSimpleType">
<xs:union memberTypes="xs:positiveInteger xs:IDREF"/>
</xs:simpleType>
<!--================-->
<!-- Scalar Types with additional metadata included as XML attributes -->
<!--================-->
<xs:complexType name="BooleanType">
<xs:simpleContent>
<xs:extension base="swec:booleanOrEmpty">
<xs:attribute name="id" type="xs:ID" use="optional"/>
<xs:attribute name="definition" type="swec:definitionType" use="optional"/>
<xs:attribute name="axisCode" type="swec:axisCodeSimpleType" use="optional"/>
<xs:attribute name="fixed" type="xs:boolean" use="optional" default="false"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="CountType">
<xs:simpleContent>
<xs:extension base="swec:countOrEmpty">
<xs:attribute name="id" type="xs:ID" use="optional"/>
<xs:attribute name="definition" type="swec:definitionType" use="optional"/>
<xs:attribute name="axisCode" type="swec:axisCodeSimpleType" use="optional"/>
<xs:attribute name="min" type="xs:integer" use="optional"/>
<xs:attribute name="max" type="xs:integer" use="optional"/>
<xs:attribute name="fixed" type="xs:boolean" use="optional" default="false"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="CountRangeType">
<xs:simpleContent>
<xs:extension base="swec:countPair">
<xs:attribute name="id" type="xs:ID" use="optional"/>
<xs:attribute name="definition" type="swec:definitionType" use="optional"/>
<xs:attribute name="axisCode" type="swec:axisCodeSimpleType" use="optional"/>
<xs:attribute name="fixed" type="xs:boolean" use="optional" default="false"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="QuantityType">
<xs:simpleContent>
<xs:extension base="swec:decimalOrEmpty">
<xs:attribute name="id" type="xs:ID" use="optional"/>
<xs:attribute name="definition" type="swec:definitionType" use="optional"/>
<xs:attribute name="uom" type="swec:uomType" use="optional"/>
<xs:attribute name="scale" type="xs:double" use="optional"/>
<xs:attribute name="axisCode" type="swec:axisCodeSimpleType" use="optional"/>
<xs:attribute name="min" type="xs:double" use="optional"/>
<xs:attribute name="max" type="xs:double" use="optional"/>
<xs:attribute name="fixed" type="xs:boolean" use="optional" default="false"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="QuantityRangeType">
<xs:simpleContent>
<xs:extension base="swec:decimalPair">
<xs:attribute name="id" type="xs:ID" use="optional"/>
<xs:attribute name="definition" type="swec:definitionType" use="optional"/>
<xs:attribute name="uom" type="swec:uomType" use="optional"/>
<xs:attribute name="scale" type="xs:double" use="optional"/>
<xs:attribute name="axisCode" type="swec:axisCodeSimpleType" use="optional"/>
<xs:attribute name="fixed" type="xs:boolean" use="optional" default="false"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="TextType">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="id" type="xs:ID" use="optional"/>
<xs:attribute name="topic" type="xs:token" use="optional"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="CategoryType">
<xs:simpleContent>
<xs:extension base="xs:token">
<xs:attribute name="id" type="xs:ID" use="optional"/>
<xs:attribute name="definition" type="swec:definitionType" use="optional"/>
<xs:attribute name="fixed" type="xs:boolean" use="optional" default="false"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<!--==========================-->
<!-- Time Types -->
<!--==========================-->
<xs:complexType name="IsoDateTimeType">
<xs:simpleContent>
<xs:extension base="swec:iso8601">
<xs:attribute name="id" type="xs:ID" use="optional"/>
<xs:attribute name="definition" type="swec:definitionType" use="optional" fixed="urn:ogc:data:time:iso8601"/>
<xs:attribute name="fixed" type="xs:boolean" use="optional" default="false"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="TimeQuantityType">
<xs:simpleContent>
<xs:extension base="swec:QuantityType">
<xs:attribute name="referenceTime" type="swec:timeReferenceSimpleType" use="optional"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="TimeType">
<xs:simpleContent>
<xs:extension base="swec:timeSimpleType">
<xs:attribute name="id" type="xs:ID" use="optional"/>
<xs:attribute name="definition" type="swec:definitionType" use="optional"/>
<xs:attribute name="referenceTime" type="swec:timeReferenceSimpleType" use="optional"/>
<xs:attribute name="localTime" type="swec:timeReferenceSimpleType" use="optional"/>
<xs:attribute name="uom" type="swec:uomType" use="optional"/>
<xs:attribute name="scale" type="xs:double" use="optional"/>
<xs:attribute name="fixed" type="xs:boolean" use="optional" default="false"/>
</xs:extension>
</xs:simpleContent>
<!-- Implemented in GML as gml:TimeType -->
</xs:complexType>
<!--==========================-->
<!-- Abstract Complex Types -->
<!--==========================-->
<xs:complexType name="_GroupBaseType" abstract="true">
<xs:attribute name="id" type="xs:ID" use="optional"/>
<xs:attribute name="definition" type="swec:definitionType" use="optional"/>
<xs:attribute name="fixed" type="xs:boolean" use="optional" default="false"/>
</xs:complexType>
<xs:complexType name="_ArrayBaseType" abstract="true">
<xs:complexContent>
<xs:extension base="swec:_GroupBaseType">
<xs:attribute name="arraySize" type="swec:arraySizeSimpleType" use="required"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<!--=================-->
<!-- Common Groups -->
<!--=================-->
<xs:group name="AnyScalar">
<xs:choice>
<xs:element ref="swec:Boolean"/>
<xs:group ref="swec:AnyNumerical"/>
<xs:element ref="swec:Category"/>
</xs:choice>
</xs:group>
<xs:group name="AnyNumerical">
<xs:choice>
<xs:element ref="swec:Count"/>
<xs:element ref="swec:Quantity"/>
<xs:group ref="swec:Time"/>
</xs:choice>
</xs:group>
<xs:group name="AnyData">
<xs:choice>
<xs:group ref="swec:AnyScalar"/>
<xs:element ref="swec:QuantityRange"/>
<xs:element ref="swec:CountRange"/>
<xs:element ref="swec:_DataGroup"/>
<xs:element ref="swec:_DataArray"/>
</xs:choice>
</xs:group>
<xs:group name="Time">
<xs:choice>
<xs:element ref="swec:IsoDateTime"/>
<xs:element ref="swec:TimeQuantity"/>
<xs:element ref="swec:Time"/>
</xs:choice>
</xs:group>
<xs:group name="Curves">
<xs:choice>
<xs:element ref="swec:Curve"/>
<xs:element ref="swec:NormalizedCurve"/>
</xs:choice>
</xs:group>
</xs:schema>
|