Page 1 of 1

XSL in PHP5

Posted: Thu Jan 17, 2008 4:21 pm
by B.E
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:

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);
?>
But I've been googleing for 3 hours and can't find a single thing.

Posted: Fri Jan 18, 2008 2:47 am
by JamesM
XSLT makes my brain bleed. I used to use it for my documentation (DocBook) - not any more!