Identifiers in GML Application Schema and SWE Service Model

Copyright © 2011 Open Geospatial Consortium. 77 Note: Providing explicit revision tags to SWES objects is not defined in this standard. A future revision or extension can define this functionality.

16.3.3 Identifiers in GML Application Schema and SWE Service Model

In a GML application schema, all object types have identity. If serialized to XML, the objects are identified using the gml:id attribute, which is mandatory for all subtypes of type AbstractGML. Services may impose additional constraints – for example, WFS requires that the gml:id is unique within a WFS instance, thus making the gml:id a LocalName where the implied namespace is the service itself. To identify a GML object outside the local scope XML instance document or WFS service, the gml:identifier element shall be used. NOTE GML mentions global uniqueness with respect to the gml:identifier property. However, uniqueness of an identifier can only be guaranteed in the scope of the system that is controlled by the authority responsible for assigning the identifier. The gml:identifier element is the XML encoding of an optional identifier property in AbstractGML of type ScopedName. Therefore, whenever non-local identity of a GML object is required, the identifier value needs to be accompanied by a codeSpace. The combination of identifier value and codeSpace make the identifier unique. In the SWE Service Model, an object type also has identity. However, unlike in GML a SWES object does not necessarily have an XML attribute that provides identity within an XML instance document see clause 24.2.4.1. In SWES, it is the responsibility of the service to assign these attributes to all elements that are referenced using xlink:href from other elements. Like in GML, SWES does not impose any further constraints on the uniqueness of the swes:id attribute. As the type of swes:id is xs:ID, it only needs to be unique within an XML document. Services that implement this standard may impose additional constraints. Furthermore - as explained in clause 16.3.1 - SWES objects have a property that is similar to the gml:identifier property but has some important differences: • Although in the UML model see Figure 29 the property is also of type ScopedName, in the XML Schema it is encoded as type xs:anyURI • SWES objects can therefore uniquely be identified via a single URI, NOT a combination of codeSpace and separate value • The optional identifier property of all SWES object types belongs to the AbstractSWES type and is therefore in the namespace of SWES, not GML

16.3.4 Referencing SWES objects