[EMAIL PROTECTED] wrote:

Hello all,

I think this one may have come up before but I haven't found any clean resolution despite extensive googling and some conversations with AxKit and PHP veterans.

I'm using PHP 4.3.0, Apache 1.3.x, and AxKit/mod_perl.

I'm curious if anyone has managed to find an elegant solution for handling XSL transformations on XML output from a PHP script using AxKit, rather than whatever libraries might be available to do this transform as part of PHP. I'd rather, if possible, keep my PHP code restricted to the purpose of generating XML (leaving XSLT out of it to be handled by Apache) and I'd also rather not write the XML to a file if I can avoid it.

As it stands, I have a script which outputs well-formed XML and the XSL instruction for a .xsl stylesheet which resides on the server. If I save that XML as a test.xml file, AxKit happily transforms it upon a browser request for the test.xml. If I don't save it, Apache just throws the XML results of my script to the mercies of whatever transformation engine the client browser might have.

Any thoughts on this?

Unfortunately, Apache 1.3.x (which AxKit still requires) only allows one native content handler per request so you can't chain handlers together. Apache::Filter (by which one can chain together Perl content handlers classes like Mason->AxKit or Apache::ASP->AxKit) only operates at the mod_perl level so the AxKit's Apache::Filter Provider class is also of no real help.


Your choices are: to wait for AxKit to work under Apache/mod_perl 2.0 or, if you're the adveturous type, to write a custom AxKit Language module that calls out php as a binary [1] and forwards the data to the next processor in the chain (the XSLT stylesheet in your case). The former is likely a couple of months off... as for the later.. well, being able to give folks that want it access to PHP as an AxKit Language module seems like a really interesting feature in any case (assuming it can be done sanely).

-kip

[1] http://www.php.net/features.commandline


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to