Event Wrapper Potential Pitfalls

96 Copyright © 2010 Open Geospatial Consortium, Inc.

9.1.3 Resolve Content Given By Reference

The GML model allow values of feature properties to be given by a reference a URL in an xlink:href property rather than inline of the XML instance. The idea is that a system that receives such an XML instance would automatically resolve the reference to get the value and insert it into the inline content. An Event Service should automatically retrieve event properties given by reference if they are queried in the filter statements of a subscription. This can happen on demand. Problems can occur if the value cannot be resolved e.g. if wrong connection timeouts have been chosen or if the value itself is complex and has properties given by reference. Such deep reference structures can slow down an Event Service. The effects and possible performance issues of using event properties given by reference in event filtering should be investigated in more detail. When using xlink references encoded according to the GML specification, data providers that create event instances should be aware that applications receiving the events may not preserve the namespace-prefix binding for the XPath expression used in the reference. Consider the following example: xlink:href=http:www.aixm.aeroschema5.1dnotamexample elementdnotam:Event[gml:identifier=aPreviousId] It shows an xlink with a URI reference that the GML standard OGC 07-036 calls an element scheme based XPointer . The absolute URI http:www.aixm.aeroschema5.1dnotamexample is followed by the fragment identifier and then the XPointer. Although this behavior is not recommended by the W3C, an application that receives an event e.g. an XML router application could change the prefixes in the attributes and elements of an XML instance but not in the content of them. In the above example, the dnotam and gml prefix would then no longer bind to the correct namespaces. A service could no longer resolve the correct element from the given URI. Therefore, it is more safe to use an xpointer scheme based XPointer see OGC 07-036 – the example would then look like this: xlink:href=http:www.aixm.aeroschema5.1dnotamexample xmlnsdnotam=http:www.aixm.aeroschema5.1dnotam xmlnsgml= http:www.opengis.netgml3.2 xpointerdnotam:Event[gml:identifier=aPreviousId] Here, the namespace-prefix binding is preserved in the reference itself.

9.1.4 Reference System Transformation

When a filter statement is created to be used in subscriptions, it often includes filter operand values. In simple applications, the reference system of these operands e.g. a Copyright © 2010 Open Geospatial Consortium, Inc. 97 geometry, a time or some thematic property is the same as the one that will later be filtered upon. In other words, the filter operations can easily be performed. It is also possible to ignore the reference systems completely and to assume that they are the same. An example of an according filter statement would be “air temperature is below 10” and of an appropriate event “observation air temperature is 8.7 °C”. However, in an Event Architecture this may not always be the case. Here, an Event Service can offer functionality to automatically transform the values of the filter operands and those of the incoming events to a compatible reference system so that the filter operation can be executed. The Sensor Event Service OGC Discussion Paper 08-133 defines support for unit conversion. It does not define a generic mechanism to solve the issue. Further work to define such a mechanism would be beneficial, especially with respect to the heterogeneity of events and event sources in a cross-domain Event Architecture.

9.2 Filter Processing Languages

9.2.1 Filter Encoding

The OGC Filter Encoding Specification FES supports filtering of generic XML instances. This is achieved via XPath expressions that are used to point to attributes or elements in the XML. These properties provide the values that a filter operates upon. FES supports a wide range of filter functionality temporal, spatial and thematic filters. It also supports additional functions which can be vendor specific or defined in standards. Applications need to take care that the namespace-prefix binding used for XPath expressions of a filter statement are preserved – this is explained in more detail in the following section.

9.2.2 XPath

The XML Path Language XPath 4 supports filtering of XML instance documents. It provides simple comparison functions but also logical and temporal operations 5 . So far no spatial operations are supported. In addition, operations do not take into account the possible meaning of a complex XML element – like a gml:TimePeriod element contained in the XML instance. Applications need to take care that the namespace-prefix binding used in an XPath expression are preserved and not destroyed by changing the namespace prefixes of XML instances. This can result in the expression no longer being able to identify the correct XML attributes and elements in other words: the event properties. 4 http:www.w3.orgTRxpath20 5 http:www.w3.orgTRxpath-functions