AxKit offers a variety of configuration options for associating
documents with its various language processors. Chapter 4 covers each
in detail. In Example 3-5, you create an
file in the same directory as your XML
documents. It defines a default style for AxKit to use when
processing documents in this directory.
Example 3-5. A simple .htaccess file
<AxStyleName "#default"> AxAddProcessor text/xsl stylesheets/cryptozoo.xsl </AxStyleName>
Pay attention to the arguments passed to the
directive. The first is the MIME type that AxKit examines to decide
which language processor modules to use, and the second is the
DocumentRoot-relative path to the stylesheet that will be passed to
that language processor to transform your XML documents. If you want
to use your XPathScript stylesheet rather than the XSLT, you would
stylesheets/cryptozoo.xps instead. This processor
definition is wrapped in an
block. This directive block, in turn, combines the processor
definitions it contains into a single “named
style” that a StyleChooser or other plug-in can select
at runtime. By giving this style the special name
#default, you are configuring AxKit to use this
style as a fallback if no other style is explicitly selected.
Figure 3-1. cryptozoo.xml ...