E.1. Installing and Configuring AxKit

There are many configuration
options
that
allow you to customize your AxKit installation, but in this section
we aim to get you started as quickly and simply as possible. This
appendix assumes you already have mod_perl and Apache installed and
working. See Chapter 3 if this is not the case.
This section does not cover installing AxKit on Win32 systems, for
which there is an ActiveState package at ftp://theoryx5.uwinnipeg.ca/pub/other.

First download the latest version of AxKit, which you can get either
from your local CPAN archive or from the AxKit download directory at
http://attic.apache.org/projects/axkit.html/. Then type the
following:

If Perl's Makefile.PL warns
you about missing
modules, notably
XML::XPath, make a note of the missing modules and
install them from CPAN. AxKit will run without the missing modules,
but without XML::XPath it will be impossible to
run the examples in this appendix.[64]

[64]AxKit is very
flexible in how it lets you transform the XML on the server, and
there are many modules you can plug in to AxKit to allow you to do
these transformations. For this reason, the AxKit installation does
not mandate any particular modules to use. Instead, it will simply
suggest modules that might help when you install AxKit.

Now we need to add some simple options to the very end of our
httpd.conf file:

This configuration makes it look as though AxKit will deliver all of
your files, but don't worry: if it
doesn't detect XML at the URL you supply, it will
let httpd deliver the content. If
you're still concerned, put all but the first
configuration directive in a <Location>
section. Note that the first line, PerlModule
AxKit, must appear in httpd.conf
outside of any runtime configuration blocks. Otherwise, Apache cannot
see the AxKit configuration directives and you will get errors when
you try to start httpd.

Now, assuming you have XML::XPath installed (try
perl -MXML::XPath -e0 on the command line to
check), restart Apache. You are now ready to begin publishing
transformed XML with AxKit!