Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Apache Software

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."
This discussion has been archived. No new comments can be posted.

Server Side XSL/XML module for Apache?

Comments Filter:
  • As far as Apache modules go you have two options.

    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).

  • I would think that Cocoon [apache.org] would pretty much totally fit the bill here. It is a very strongly XSL-based content delivery engine that is being used by several major sites. I think Apache's projects are way beyond what anyone else is doing in all these areas. The XML [apache.org] project and the Jakarta [apache.org] project are both even more exciting to me than the HTTPD itself. Both are pushing technologies that have applications both with Apache HTTPD and with other servers on the market (IIS included). Before you get excited about anything else, do yourself a favor and check out what they have to offer. I think you will find powerful, real-world ready environments.
  • I have tried Cocoon, but AxKit [axkit.org] was much easier for me to set up. It requires mod_perl [apache.org] and Sablotron [gingerall.com].
  • Wow, I never realized AXKit does XSP. Very cool indeed. I will have to look into that, since I need a more lightweight solution in some hosting situations I'm working on now.
  • Cocoon does more than just XSLT. In fact, it's Xalan [apache.org] that does the XSLT stuff. Cocoon is a more general publishing framework that offers some very cool features, notably eXtensible Server Pages [apache.org]. Cocoon provides caching and connection-pooling services but uses Xalan for XSLT.

    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

  • There is a xslt ( xml -> xml translator with xsl ) on www.gingerall.com - an apache module, a php module, c++ api among others..

    enjoy!

    -larsw-
  • yep, it's called AxKit [axkit.org].
  • Hava a look at xalan [apache.org] Open source implemented in Java. Easy JSP, servlet integration. I use extensively the redirect package. XML source -> Generate Japanese HTML version and -> Generate English HTML version ME

Intel CPUs are not defective, they just act that way. -- Henry Spencer

Working...