httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Burch <>
Subject [users@httpd] mod_proxy_xml and multi-namespace xml files?
Date Fri, 09 Mar 2012 23:12:02 GMT
Hi All

For a demo, I find myself needing to re-write some URLs in an atompub 
service document that's being proxied. I thought that mod_proxy_xml might 
be a good bet for this, but I'm having some issues.

Firstly, I took the mod_proxy_xml source code, and needed to edit it to 
add support for atompub, as it's not directly configurable. I defined the namespace, then largely copied the XHTML 
definition to work for it, without initially any elt's defined. Initially, 
I've only defined the main namespace, and not 
any of the others contained in my atompub document. Finally, I used a 
simple mod_filter set to pass the atompub mimetype to mod_proxy_xml, and 
used a XMLNSUseNamespace line to bind the app namespace to mod_proxy_xml

The problem is that the additional namespaces seem to be getting partly 
lost in the proxy process. For the following sample document:

   <?xml version="1.0" encoding="utf-8"?>
   <service xmlns=""
      <example:test />
        <example:link href="http://localhost:8080/somewhere" />

The proxied form (with no re-writing enabled for atom, just processing it 
as-is through mod_proxy_xml) is:

   <?xml version="1.0" encoding="utf-8"?>
   <service xmlns="">
         <example:link href="http://localhost:8080/somewhere"></example:link>

As we can seem, the namespace definitions for atom: and example: have got 
lost. In my case, I will want to change URLs in some namespaces, but not 
all, and I may not know all the different namespaces that may be used.

Does anyone know what the trick is for not getting these additional 
namespaces lost? Is there an extra definition I need to add somewhere to 
have all of them preserved? Or is mod_proxy_xml limited to just handling 
documents with a single namespace?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message