Transforming XML with XSL
March 7, 2005 5:01 PM Subscribe
I need a new way of transforming XML with XSL. Till date I've used PHP's Sablotron, which I absolutely love and is simple to use, but my host keeps forgetting to enable and include it each time they recompile Apache, so I was wondering if someone here knows of a way to do the same with either Perl or JSP/Tomcat or even PHP as long as it is without Sablotron's xslt_create().
The PHP code I use is beautifully simple.
<?php
ob_start("ob_gzhandler");
$tivonp = xslt_create();
$result = xslt_process($tivonp, 'nowplaying.xml', 'nowplaying.xsl');
echo $result;
xslt_free($tivonp);
?>
I'm hoping there is a similar simple way to transform XML using XSL in other languages.
posted by riffola to computers & internet (10 answers total)
for example, i have
saxonaliased tojava -jar c:\Archive\Saxon\saxonb8-3\saxon8.jarand then the transform above would besaxon nowplaying.xml nowplaying.xsl > $result(in a command-line-ish syntax). you want the free saxon-b (not saxon-sa).personally, i use xsltproc. i think it comes from libxsl/gnome or something. it might also be available on your machine and is another stand-alone processor.
posted by andrew cooke at 5:14 PM on March 7, 2005