[GeoSciML] GML namespace collision-- ISO vs OGC

Simon.Cox at csiro.au Simon.Cox at csiro.au
Wed Jul 24 21:18:46 EDT 2013


Yes indeed.
There are a few entangled pieces of history here:


1.     GML 2.* --> 3.2.0 all used the same namespace. This was before the OGC namespace and versioning policy was established.

2.     GML 3.1 --> 3.2.1 was not backwards compatible, in particular because GML 3.2.1 did establish a new namespace. This was before the OGC namespace and versioning policy was established. If the policy had been followed GML 3.2.1 would have been GML 4.0. It's a real shame it isn't.

3.     GML 3.2.0 was never officially released, so should be expunged from all systems. But it was used in the ISO Metadata Profile of CS/W, which unfortunately means it still lurks around. But it should not be used in any new system. The fact that it uses the same XML namespace as GML 3.1 is a particular trap.
However, namespace prefixes are not canonical. So even though all the schema repos use gml:, this prefix is bound to a different namespace URI at least when comparing GML 3.1 and GML 3.2.1. So if your XML/XSLT processor is truly XML namespace aware, there should be no clash as gml: is replaced with a different namespace URI for each schema that is loaded.

Simon

From: GeoSciML [mailto:geosciml-bounces at lists.opengeospatial.org] On Behalf Of Steve Richard
Sent: Thursday, 25 July 2013 9:07 AM
To: A mailing list for GeoSciML (geosciml at lists.opengeospatial.org); David Danko; dokno (dokno at kms.dk); Hills, Scott J.; Marie Lambois ign; Marie-lise Vautier ign; Markus Seifert; Michael Ostling (michael.ostling at metagis.se); Nicolas Lesage; Shawn Silkensen; Ted Habermann (thabermann at hdfgroup.org); wwwaro
Subject: [GeoSciML] GML namespace collision-- ISO vs OGC

I've run into an interesting problem working on XSLT's to transform ISO metadata, and I suppose I'm not the first to have to deal with it... We use gml:TimePeriod, defined in temporal.xsd.

In the OGC repository at http://schemas.opengis.net/gml/3.1.1/base/temporal.xsd :
"<schema targetNamespace="http://www.opengis.net/gml" xmlns:gml="http://www.opengis.net/gml" version="3.1.1.2">
            <annotation>
                        <appinfo source="urn:opengis:specification:gml:schema-xsd:temporal:3.1.1"/>"


In the ISO repository at http://www.isotc211.org/2005/gml/temporal.xsd we have:
<schema targetNamespace="http://www.opengis.net/gml" xmlns:gml="http://www.opengis.net/gml" version="3.2.0">
            <annotation>
                        <appinfo source="urn:ogc:specification:gml:schema-xsd:temporal:3.2.0">temporal.xsd</appinfo>

Same namespace URI, different versions

The OGC repository at http://schemas.opengis.net/gml/3.2.1/temporal.xsd has:
<schema targetNamespace="http://www.opengis.net/gml/3.2" xmlns:gml="http://www.opengis.net/gml/3.2" version="3.2.1.2">
            <annotation>
                        <appinfo source="urn:x-ogc:specification:gml:schema-xsd:temporal:3.2.1">temporal.xsd</appinfo>

Different namespace, same major.minor version.
The XML schema as far as gml:TimePeriod appears to be identical.

Big problem when transforming a metadata doc that comes in thinking "I'm using gml 3.2, so the namespace should be http://www.opengis.net/gml/3.2" and has such a namespace declaration, but the XSLT is using ISO namespace http://www.opengis.net/gml, also (according to what's in the normative schema) v3.2, which is what the ISO schemas end up using because buried somewhere in there, they use the schema at http://www.isotc211.org/2005/gml/temporal.xsd.
Interesting, annoying, requires a kludge to work around...

steve

Stephen M Richard
Arizona Geological Survey
416 W. congress #100
Tucson, AZ
AZGS: 520-770-3500
Office: 520-209-4127
FAX: 520-770-3505

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengeospatial.org/pipermail/geosciml/attachments/20130725/fe7a5124/attachment-0001.html>


More information about the GeoSciML mailing list