Hello all,
I am not used to dev list... I found out that I was missing some library. Apache2::Request is mandatory to get things running.

Let say I got a Schema to preserve movie data named vdo-schema.xml, I have this data file vdo-data.xml & this vdo.xsl. The corresponding configuration may look like this or am I wrong?

<Location /roottomywebsite>
        PerlFixupHandler Apache2::TomKit
        PerlSetVar AxAddProcessorDef "text/xsl=>vdo.xsl"
PerlSetVar AxAddProcessorMap "text/xsl=>Apache2::TomKit::Processor::LibXSLT"
</Location>

I am gathering information so I may write a simple installation guide.

Thanks to all your help,
Marc

Scott Penrose wrote:

On 27/06/2005, at 16:39, Tom Schindl wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Marc,

(I'm also cc'ing the dev list that more people can get help from your
question and hopefully my answer)

no TomKit is not an PerlResponseHandler it works in 2 Phases:
a) Fixup
(b) PerlResponse)
c) OutputFilter

An example configuration can be found at: t/conf/extra.conf.in but it
looks something like this:

- -----------------------8<-----------------------
<Location /xslt/base.xml>
~    PerlFixupHandler Apache2::TomKit
~    PerlSetVar AxAddProcessorDef "text/xsl=>xslt/base.xsl"
~    PerlSetVar AxAddProcessorMap
"text/xsl=>Apache2::TomKit::Processor::LibXSLT"
</Location>


This example:

PerlFixupHandler Apache2::TomKit
PerlSetVar AxAddProcessorDef "text/xsl=>test.xsl"
PerlSetVar AxAddProcessorMap "text/ xsl=>Apache2::TomKit::Processor::LibXSLT"
AddType application/x-httpd-php .php .phtml .php3
AddType application/x-httpd-php-source .phps

Will execute a PHP example and then put it through TomKit XSL processing (which I am sure can be done otherways, but for me the integration of the perl and php is key).

Interesting note though that the above AxAddProcessorDef does not work for me, it always fails to process with that XSL, however adding:

  echo "<?xml-stylesheet type=\"text/xsl\" href=\"test.xsl\"?>\n";

to the top of my PHP script to use embedded XSL works fine (and it does do it server side, not browser side - I have fallen for that one before !) :-)

I am currently writing a content handler for generating XML from vCalendars which I already have working on AxKit 1. This new version however will probably be written as a pure Apache2 module, not TomKit/ AxKit related at all - thus the magic and power of Apache 2 - It means that my module can be used for direct XML download or integrated with cocoon or with TomKit/AxKit2 etc.

For my vote - it seems the way Tom has put this together has the makings of the right way, but as Tom said, it has lots to go yet.

Good luck Marc

Scott

Reply via email to