I had a similar requirement.
Yes - you would need to get AxKit to handle your perl CGI scripts somehow.
But I found the best and easiest way to do this was to put any such CGI scripts in an XpathScript file.
This gives you all the features of AxKit - and all the flexibility of Perl CGI.
And it often suggests another way of handling the process which is more specific to AxKit.
So - if your Perl is just applying XSL transformations - just get Axkit to do the XSL transformation.
(and then you can have the session variable as a parameter in your XSLT.)
Or - in XpathScript - just add any extra info you need to the XML for use by later stages,
or do anything else that XSLT does not handle as well as Perl can.
There is also a YpathScript module I have tried on a few things that uses XML::LibXML/XSLT rather than XML::Xpath.
(if you want to keep your Perl processing in XML::LibXML/XSLT - and not have to generate copies of XML::XPath documents).
It is faster - and works pretty well - although is probably not fully tested yet and so may have some bugs.
I hit a couple of problems - and so have temporarily switched to doing XML::LibXML stuff in an XPathScript processing step
by converting a document and calling a module that uses XML::LibXML.
[EMAIL PROTECTED] wrote:
Some pages of my site are driven by perl cgi scripts. To produce the final output of these script to the browser, I use XML::LibXML and XML::LibXSLT to transform some XML (which gets mangled together by the script) into xhtml via my main output.xsl stylesheet - this is the final stylesheet from my main AxKit transformation pipeline, which converts my site specific XML tags into valid XHTML.
I do the output this way to ensure that the perl scripts are producing output exactly the same as all the AxKit driven pages.
However, since implementing the BasicSession Stuff, I have noticed a slight problem. The stylesheet I am using, basicly draws all the page navigation and standard elements etc. One of the standard elements is a little bit of text which gets displayed in the top left corner of the page, which shows if you are currently loged in or not. It does this by checking a parameter which usually gets passed to the stylesheet via the Apache::AxKit::Plugin::AddXSLParams::BasicSession directive in the httpd.conf file.
It appears however that when applying the stylesheet to some xml via a perl script, this paramater is not made available to the stylesheet. My httpd.conf file looks a bit like this:
<filesMatch "\.(xsp|xml|rdf)$"> PerlModule AxKit AddHandler axkit .xml .xsp .rdf
...... standard (Axkit bits)
AxAddPlugin Apache::AxKit::Plugin::BasicSession AxAddPlugin Apache::AxKit::Plugin::AddXSLParams::BasicSession
...etc etc etc.. </filesMatch/>
So is this because I am only applying this axkit stuff to .xsp, .xml and .rdf files? ie. do I need to include .cgi in there too?
Or do I have to access this parameter directly from the perl script somehow?
-- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.10.3 - Release Date: 25/04/2005
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]