b-cube / semantics-preprocessing

initial text preprocessors for the triplestore and feature classification
Other
2 stars 3 forks source link

How to handle esri_* (custom methods/namespaces) in the OGC xpath building #15

Closed roomthily closed 9 years ago

roomthily commented 9 years ago

Currently the namespacing is being handled as:

/{http://www.opengis.net/%(lower)s}

where lower is just the service type (wms, wfs, sos, etc) and assumes some knowledge of the OGC structure (please continue to assume this knowledge here). But ESRI and (I think) GeoNetwork have extended these services to support their own platforms and we get:

esri_wms:GetStyles

which is not currently being handled in the *Extractor code (things that build the fully qualified xpaths).

roomthily commented 9 years ago

Other custom namespaces: mapserver and sld

roomthily commented 9 years ago

With something like this:

x = parser.xml.xpath('/default:WMS_Capabilities/default:Capability/default:Request/*[namespace-uri() != "http://www.opengis.net/wms"]', namespaces=parser._namespaces)

So let's revise the whole thing to run known wxs namespaced methods (with defined parameters in the config json) and unknown namespaced methods (no parameters but maybe format elements).

roomthily commented 9 years ago

See https://github.com/b-cube/semantics-preprocessing/commit/f68ff2c9d95fc1d9a23666d7b4ac9163939a560b