[Inteproxy-devel] inteproxy now requires lxml
bh at intevation.de
Wed Feb 7 20:05:18 CET 2007
The fix for issue #260 (POST requests for OWSProxy) required an XML parsers
that would report namespaces with the prefixes used in the XML document.
Unfortunately, the parsers that come with the python standard library cannot
do this, so a third-party module had to be used. The one I used is lxml
which is a python binding to libxml and libxslt.
Some background on why this is necessary:
When the client uses the POST method to send requests to the OWSProxy the
username and password have to be added as attributes to the XML structure in
the body of the http request. To do that properly the InteProxy has to parse
the XML, insert the new attributes and write out the XML again. The
namespaces have to be preserved while doing this. In particular all
namespaces have to be reported and they have to use the same prefixes.
Normally with XML namespaces that wouldn't be necessary, but the GetFeature
request contains XML like this:
That is, there's a namespace http://www.deegree.org/app with prefix "app:"
that is not used for attribute or element names, but only for attribute
values and the text content. The standard python xml parsers do not report
the prefix of the namespaces and some like ElementTree do not even report the
namespaces that are not used for attribute or element names.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://lists.wald.intevation.org/pipermail/inteproxy-devel/attachments/20070207/27ed6644/attachment.pgp
More information about the Inteproxy-devel