Yanick Champoux > Apache2-TomKit-0.01_7 > Apache2::TomKit

Download:
Apache2-TomKit-0.01_7.tar.gz

Dependencies

Annotate this POD

Module Version: 0.01_7   Source  

NAME ^

Apache2::TomKit - Perl Module used to Transform Content

SYNOPSIS ^

  <Files *\.xml>
    PerlFixupHandler Apache2::TomKit

    PerlSetVar AxAddProcessorDef "text/xsl=>base.xsl"
    PerlSetVar AxAddProcessorDef "text/xsl=>html.xsl"

    PerlSetVar AxAddProcessorMap "text/xsl=>Apache2::TomKit::Processor::LibXSLT"

    PerlSetVar AxContentProvider My::Content::Provider
  </Files>

DESCRIPTION ^

TomKit is a perl handler which is working similar as the famous AxKit for mod_perl 1.x. It is designed as an PerlFixupHandler which inserts an OutputFilter if needed to transform XML-Content.

Although designed primarily to transform XML-Content it can be used to create any arbitary output like e.g. PNG, ... . The big advantage is the easy to configure caching behaviour.

TOMKIT DIRECTIVES ^

TomKit is configured by setting configuration variables using PerlSetVar like shown in the synopsis.

AxAddProcessorDef

Configure the processor definition file used by the processor. The format of the looks like the following:

  ${typeMape}=>${relative_path_from_document-root_2_definition}

You can use add more than one processor. They are restored in a processor chain and run next to each other.

You don't necessarily have to set the processor definition in the configuration. TomKit has the possibility to read the processor definitions directly from the processed file. This looks like the following:

  <?xml version="1.0" ?>
  <?xml-stylesheet href="base.xsl" type="text/xsl"?>
  <?xml-stylesheet href="html.xsl" type="text/xsl"?>
  <!-- THE START OF THE XML-FILE -->

  <!-- .... -->

  <!-- THE END OF THE XML-FILE -->

Please note all relative paths are prefixed with the document-root if AxNoCompilance is set to 0. If AxNoCompilance is set to 1 all paths are relative to the root path!

AxAddProcessorMap

Configure the processor used to transform the input-source. The format looks like the following:

  ${typeMape}=>${Name::Of::The::Processor}

AxContentProvider

Configure the content provider which provides the content to the transformer chain as its name indicates. If you don't configure a AxContentProvider there are 2 possibilities:

AxNoCompilance 0|1

This turns off AxKit-Compilance which is not given out-of-the box. Chdir to document-root is possible automagically because of threading issues. Please note that running with no AxKit-Compilance may be faster and can be achieved by evaluating the special parameter "_TOMKIT_DocumentRoot" which is passed to XSLT-Processors.

AxEnableCGICache 0|1

Setting this flag to true the cgi-parameters passed are also taken into consideration when the cache-key is generated.

AxCacheDir /path/to/cache

You can configure the path where TomKit restores the cached results. If you don't set any the default location is created using 'File::Spec->tmpdir() . "/axkit"'

AxDebugLevel 1-n

You set the debug-level verbosity of TomKit to debug your XSLTs the default level is 0 where only errors are logged

SEE ALSO ^

Apache2, Apache2::TomKit::IProvider

AUTHOR ^

Tom Schindl, <tom.schindl@bestsolution.at>

SUVERSION AND BUG-TRACKING ^

The latest version of the application can be found on my companies publicsvn-Server: http://publicsvn.bestsolution.at/repos

Bugtracking is done using mantisbt which can be found at here: http://phpot.bestsolution.at/mantis/main_page.php

COPYRIGHT AND LICENSE ^

Copyright (C) 2005 by Tom Schindl and BestSolution Systemhaus GmbH

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.

syntax highlighting: