XSL in PHP5
Posted: Thu Jan 17, 2008 4:21 pm
How do you transform a multiple input documents to a single output html in PHP 5, using XSLT?
I know to do it pre PHP 5 with this:
But I've been googleing for 3 hours and can't find a single thing.
I know to do it pre PHP 5 with this:
Code: Select all
<?
$XML = implode('', file($XML_File));
$XSL = implode('', file($XSL_File));
$XML_Messages = $Messages->xml_all_messages();
$Processor = xslt_create();
xslt_set_encoding($Processor, 'UTF-8');
$Args = array('/_xml' => $XML,
"/_xml_messages" => $XML_Messages,
'/_xsl' => $XSL);
$HTML = xslt_process($Processor, 'arg:/_xml', 'arg:/_xsl', NULL, $Args);
xslt_free($Processor);
?>