XPathScript
===========

DESCRIPTION

This is the XML::XPathScript stylesheet framework, part of the AxKit
project at http://axkit.org/.

XPathScript is a stylesheet language similar in many ways to XSLT (in
concept, not in appearance), for transforming XML from one format to
another (possibly HTML, but XPathScript also shines for non-XML-like
output).

Like XSLT, XPathScript offers a dialect to mix verbatim portions of
documents and code. Also like XSLT, it leverages the powerful
``templates/apply-templates'' and ``cascading stylesheets'' design
patterns, that greatly simplify the design of stylesheets for
programmers. The availability of the XPath query language inside
stylesheets promotes the use of a purely document-dependent,
side-effect-free coding style. But unlike XSLT which uses its own
dedicated control language with an XML-compliant syntax, XPathScript
uses Perl which is terse and highly extendable.

The result of the merge is an extremely powerful tool for rendering
complex XML documents into other formats. Stylesheets written in
XPathScript are very easy to create, extend and reuse, even if they
manage hundreds of different XML tags.

INSTALLATION

To install this module type the following:

   perl Makefile.PL
   make
   make test
   make install

   
During installation, Makefile.PL will check if it should use XML::LibXML 
or XML::XPath as the default xml parser. if you want to force XPathScript to use 
one or the other, do

	perl Makefile.PL -parser=XML::LibXML
	or
	perl Makefile.PL -parser=XML::XPath


XPS comes with its AxKit language module. Not to clash with the 
Apache::AxKit::Language::XPathScript.pm bundled with AxKit, it is named
Apache::AxKit::Language::YPathScript.pm. To use this module under AxKit, 
add the following to your httpd.conf (the first two lines are probably 
already present):

	PerlModule AxKit
	AddHandler AxKit .xml
	AxAddStyleMap application/x-ypathscript Apache::AxKit::Language::YPathScript

And to your .htaccess something like:

	<AxStyleName "#default">
	   AxAddProcessor application/x-ypathscript your_stylesheet.xps
	</AxStyleName>
