Apache-XBEL

 view release on metacpan or  search on metacpan

lib/Apache/XBEL.pm  view on Meta::CPAN

package Apache::XBEL;
use strict;

# $Id: XBEL.pm,v 1.11 2004/03/01 21:25:11 asc Exp $

=head1 NAME

Apache::XBEL - mod_perl handler to transform XBEL into exciting
and foofy HTML documents.

=head1 SYNOPSIS

 <Location />
  SetHandler  perl-script
  PerlHandler Apache::XBEL

  PerlSetVar  XbelPath     /path/to/yer-xbel-file.xbel
  PerlSetVar  XslPath      /path/to/apache-xbel.xsl
  PerlSetVar  CacheDir     /path/to/yer-cache-dir

  # If set to "On", output-escaping will be disabled
  # for title and description nodes in the XSL stylesheet

  PerlSetVar DisableEscaping   On

 </Location> 

=head1 DESCRIPTION

Apache::XBEL is an Apache mod_perl handler that uses XSLT to
transform XML Bookmarks Exchange Language (XBEL) files into
exciting and foofy dynamic HTML documents. 

Documents are rendered as collapsible outlines and individual
nodes may be viewed and bookmarked as unique pages, so you don't
have to click through a gazillion nested leaves to find what
you're looking for.

Once individual nodes/pages have been rendered, they are cached
to reduce the load on the server. Cache files are updated
whenever any of the widgets involved in the transformation are
modified.

=head1 OPTIONS

=head2 XbelPath

I<required>

The path to the XBEL file you are transforming.

=head2 XslPath

I<required>

The path to the XSL file used to do the transforming.

=head2 CacheDir

I<required>

The path to a directory where the mod_perl interpreter can
write cache files.

=head2 DisableEscaping

If set to "On" (case-insenstive) output-escaping will be
disabled for title and description nodes in the XSL
stylesheet.

=head2 HtmlLang

Set this as the value of /html[@xml:lang]

=cut

$Apache::XBEL::VERSION = '1.3';

use Apache;
use Apache::Constants qw(:common :response);
use Apache::File;
use Apache::Log;
use Apache::URI;

use Digest::MD5 qw(md5_hex);

use File::Basename;
use File::Copy;
use File::Spec;

use Memoize;

use XML::LibXML;
use XML::LibXSLT;

my $xml_parser;
my $xsl_parser;
my $xsl_stylesheet;
my $xsl_transformer;



( run in 1.732 second using v1.01-cache-2.11-cpan-302cb4679cc )