XML Name-Value pairs Result set encodings

b OGC Filter Encoding, Version 1.1.0 [OGC 04-095] optional c Z39.50 Type-1 optional d SQL3_SimpleFeature optional

9.4 Result set encodings

9.4.1 XML

The default encoding for returning results is XML. The General Model clause describes the common Summary set fields and XML syntax to be supported by all Protocol Bindings see Subclause 6.3.

9.4.2 Name-Value pairs

Additional, the CORBA profile adds a Name-Value NV entry to the message format enumeration see Subclause 9.6. Specifying NV lets the server return results as name- value pairs. Name-value pairs are specified in the OMG CORBA 2.3 DynamicAny specification, but to be complete, the definition is repeated below and in the IDL. Usage of NameValuePair specification from OMG CORBA 2.3 DynamicAny aligns Catalogue Services CORBA Profile with revision 1.1 draft 3 of Simple Feature Access for CORBA. enum MessageFormat {XML, HTML, TXT, NV}; module DynamicAny { struct NameValuePair { string name; any value; }; typedef sequenceNameValuePair NameValuePairSeq; }; So if the server gives the results back as XML in the next example: ?xml version=1.0? DOCTYPE Metadata SYSTEM min.dtd Metadata TitleCountries of EuropeTitle AbstractThis dataset contains the countries of EuropeAbstract GeographicBoundingBox westBoundLongitude-24.17westBoundLongitude eastBoundLongitude40.71eastBoundLongitude northBoundLatitude71.26northBoundLatitude southBoundLatitude27.63southBoundLatitude GeographicBoundingBox Metadata Name-value pair results are as follows: 86 Copyright © 2007 Open Geospatial Consortium, Inc. All Rights Reserved. id: Metadata value: NameValuePair Seq id: Title value: Countries of Europe id: Abstract value: This dataset ... id: Geographic BoundingBox value: NameValuePair Seq id: westBound Longitude value: -24.17 Figure 27 — Name-value pair results The advantage is that pure CORBA environments do not have to parse the XML to get the results. They receive them in a suitable general structure. If the CORBA server is combined with another type of client, e.g. a Web client, then probably XML the default will be preferred. The any value member can contain any type: standard types as long, double, string, types as NameValuePair or NameValuePairSeq this gives the possibility to create recursive structures or user-defined types.

9.5 General model to CORBA protocol binding operations mapping