mod_publisher is an output filter based on SAX parsing with libxml2. Basic installation and setup is similar to mod_accessibility or mod_proxy_html, although its SAX2 parsing (for namespace support) requires a more recent libxml2 version than the other modules.
The basic prerequisite is libxml2. Most operating systems ship with this installed as standard, but you may have to upgrade to a more recent version from xmlsoft.org. mod_publisher is developed and tested against libxml2 2.6.15. You will of course also need mod_publisher.so in your apache's modules directory.
LoadFile /path/to/libxml2.so LoadModule publisher_module modules/mod_publisher.so
Windows doesn't ship libxml2 as standard, nor does it include all the prerequisites for libxml2. You can download binaries for these from Igor Zlatkovic's site:
LoadFile /path/to/zlib.dll LoadFile /path/to/iconv.dll LoadFile /path/to/libxml2.dll LoadModule publisher_module modules/mod_publisher.so
To activate the processor, simply insert the markup-publisher output filter - e.g. for httpd 2.0
<Location /whatever/> AddOutputFilter markup-publisher .html .xhtml .xml .svg .wml </Location>
For httpd 2.1 or 2.2 you have the finer control offered by mod_filter. For example:
FilterProvider publish markup-publisher Content-Type $text/html FilterProvider publish markup-publisher Content-Type /(xml|svg)$/ <Location /whatever/> FilterChain =publish </Location>
As soon as you have installed it, you can configure it for your needs. See the configuration guide for details.
mod_publisher may be used to supersede a number of other modules: for example,
mod_xmlns cannot be used with mod_publisher, as they both export the same API for namespace modules. The other content filtering modules can coexist happily with it, but are redundant if mod_publisher is in use. It is recommended that you don't use it together with another parsing filter, as parsing the output twice doubles the processing overhead.