O'Reilly logo

XML Publishing with AxKit by Kip Hampton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Basic Server Configuration

As you will learn in later chapters, AxKit offers quite a number of runtime configuration options that allow fine-grained control over every phase of the XML processing and delivery cycle. Getting a basic working configuration requires very little effort, however. In fact, AxKit ships with a sample configuration file that can be included into Apache’s main server configuration (or used as a road map for adding the configuration directives manually, if you decide to go that way instead).

Copy the example.conf file in the AxKit distribution’s examples directory into Apache’s conf directory, renaming it axkit.conf. Then, add the following to the bottom of your httpd.conf file:

# AxKit Setup
Include conf/axkit.conf

You now need to edit the new axkit.conf file to match the XML processing libraries that you installed earlier by uncommenting the AxAddStyleMap directives that correspond to tools you chose. For example, if you installed libxslt and XML::LibXSLT, you would uncomment the AxAddStyleMap directive that loads AxKit’s interface to LibXSLT. Example 2-1 helps to clarify this.

Example 2-1. Sample axkit.conf fragment

# Load the AxKit core. PerlModule AxKit # Associates Axkit with a few common XML file extensions AddHandler axkit .xml .xsp .dkb .rdf # Uncomment to add XSLT support via XML::LibXSLT # AxAddStyleMap text/xsl Apache::AxKit::Language::LibXSLT # Uncomment to add XSLT support via Sablotron # AxAddStyleMap text/xsl Apache::AxKit::Language::Sablot # Uncomment ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required