OGC 08-094r1 SWE Common Data Model
An object within an external document can also be referenced by including the full URI:
swe:field xlink:href
= http:www.my.comfields.xmlTEMP
Typically, “xlink” references will be specified as URLs or as URNs that can be easily resolved through registries. It is required that the property has either the “xlink:href”
attribute set or contain an inline value, even though this cannot be enforced by XML schema.
Requirement
http:www.opengis.netspecSWE2.0reqxsd-simple-componentsref-or-inline-value-present
Req 59. A property element supporting the “swe:AssociationAttributeGroup” shall
contain the value inline or populate the “xlink:href” attribute with a valid reference
but shall not be empty.
8.1.1.3 Extensibility Points
The SWE Common Data Model schemas define extensibility points that can be used to insert ad-hoc XML content that is not defined by this standard. This is done via optional
“extension” elements of type “xs:anyType” in the base abstract complex type “AbstractSWEType”. Since all object types defined in this standard derive from this base
type, extensions can be added anywhere in a SWE Common instance.
This mechanism allows for a “laxist” way of including extended content in XML instances as the extended content is by default ignored by the validator. However, it is
also possible to formally validate extended content by writing an XML schema for the extension and feeding it to the validator via the “xsi:schemaLocation” attribute in all
instances using the extension.
The recommended way of extending the XML schema of this standard is by defining new properties on existing objects by inserting them in an “extension” slot. Additionally this
should be done in a way that these new properties can be safely ignored by an implementation that is not compatible with a given extension. Defining new XML object
elements such as new data component objects rather than new properties will greatly reduce forward compatibility of implementations compliant to this standard with XML
instances containing extensions of this standard.
In any case, all extensions of the XML schema described in this standard shall be defined in a new namespace other than the namespaces used by this standard and its
dependencies in order to allow easy detection of extensions by implementations.
68
Copyright © 2011 Open Geospatial Consortium
SWE Common Data Model OGC 08-094r1
Requirement
http:www.opengis.netspecSWE2.0reqxsd-simple-componentsextension-namespace-unique
Req 60. All extensions of the XML schemas described in this standard shall be
defined in a new unique namespace.
Extensions are not allowed to change the meaning or behavior of elements and types defined by this standard in any way in this case, new classes or properties shall me
defined. This guarantees that implementations that have no knowledge of an extension can still properly use XML instances containing these extensions.
Requirement
http:www.opengis.netspecSWE2.0reqxsd-simple-componentsextension-coherent-with-core
Req 61. Extensions of this standard shall not redefine or change the meaning or
behavior of XML elements and types defined in this standard.
8.1.2 Base Abstract Complex Types
Several base abstract types are defined in the “basic_types.xsd” schema file. They are used as base substitution groups for all global XML elements defined in this standard.
Below are XML schema snippet for the “AbstractSWE”, “AbstractSWEIdentifiable” and “AbstractSWEValue” elements and corresponding complex types:
element name
= AbstractSWE
abstract =
true type
= swe:AbstractSWEType
complexType name
= AbstractSWEType
sequence element
name =
extension type
= anyType
minOccurs =
maxOccurs =
unbounded sequence
attribute name
= id
use =
optional complexType
The “AbstractSWE” complex type is the base for all derived complex types defined in this standard. It defines a first extension mechanism as an optional “extension” element
that allows for any extended element content in a namespace other than the SWE Common Data Model namespace. It also has an optional “id” attribute allowing
referencing the object that derives from it.
element name
= AbstractSWEIdentifiable
abstract =
true substitutionGroup
= swe:AbstractSWE
type =
swe:AbstractSWEIdentifiableType complexType
name =
AbstractSWEIdentifiableType complexContent
extension base
= swe:AbstractSWEType
sequence element
name =
identifier type
= anyURI
minOccurs =
element name
= label
type =
string minOccurs
= element
name =
description type
= string
minOccurs =
sequence extension
Copyright © 2011 Open Geospatial Consortium
69