Welcome to WebmasterWorld Guest from

Forum Moderators: httpwebwitch

Message Too Old, No Replies

Sabotron xslt_process



9:37 am on Mar 25, 2005 (gmt 0)

10+ Year Member


I'm trying to run the following:



$xsl = file_get_contents ('test.xsl') ;

$arguments = array( '/_xml' => $xml,'/_xsl' => $xsl);

$xp = xslt_create();
$res = xslt_process($xp, 'arg:/_xml', 'arg:/_xsl', NULL, $arguments);

echo $res;


..and it outputs the actual raw generated html to the browser. However, if I swap 'arg:/_xml, for the name of a 'test.xml', it works fine (so it's not the .xsl file at fault). But I need it to be the $xml fragment, as that will eventually be the results of a query.

I've tried many combinations, including inserting <?xml version="1.0" encoding="utf-8"?> at the top of the fragment but no success.

Can anybody see how to handle the fragment properly?



6:17 pm on Mar 26, 2005 (gmt 0)

10+ Year Member

I've solved it.

If anyone else is using Sablotron lots of links at the creator:

[gingerall.com ]


Featured Threads

Hot Threads This Week

Hot Threads This Month