Server Side XSL/XML Module For Apache? 8
anubis__ asks: "It appears that Microsoft has an XSL ISAPI filter available for IIS. This enables you to, among other things, serve up a different XSL stylesheet depending on the client device. Something like this will become invaluable with the growing mobile phone/PDA browser market. Is there a module available (or in progress) for Apache that does something similiar with XML? I know it can be done with SSI and PHP."
Two options (Score:2)
The first, and simplest, is mod_xslt [userworld.com]. This is a very simple module that uses Sablotron [gingerall.com] for XSLT processing. How it works is by first breaking down the request at the file extension, so if you request foo.html it breaks it down into "foo" and "html". Then it looks for "foo.xml" in the same directory. It reads foo.xml for the doctype (basically looking for the name of the top level element). Say the top level element is <article>, then it goes and processes foo.xml with the stylesheet article_html.xsl. Notice that you can have different extensions actually requesting the same file processed in different ways.
That however is limiting, and doesn't scale too well (both in terms of site development and performance).
Your other option is AxKit [axkit.org]. This is an Apache module that is built using mod_perl to make it easier to build, and provide a built in perl interpreter for scripting (AxKit is more than just a simple transformation module, its a full app server framework based around XML). AxKit provides more than just XSLT, it does XSP (eXtensible Server Pages, a technology in co-development with the Cocoon project), and some Perl based templating languages such as XPathScript and Template Toolkit. It supports some aggressive caching, which makes it run at about 60-80% of a raw Apache installation, and it supports automatic GZipping of output (for capable browsers).
There's also Cocoon, but you asked about Apache modules, which cocoon really isn't (unless you count connecting to a servlet engine with mod_jserv as an apache module).
Cocoon? (Score:1)
AxKit! (Score:2)
Re:Two options (Score:1)
Re:Cocoon? - more than XSLT! (Score:2)
I'm working on a cocoon-based production project right now. It's fast, it's flexible, it promotes high-level reuse. Get some!
Neutron
Sablotron (Score:1)
enjoy!
-larsw-
AxKit (Score:1)
Xalan (Score:1)