note 13847 added to function.xslt-transform.php
| From: | imirkin at php2 dot chek dot com | Date: | Thu, 05 Jul 2001 22:48:13 +0000 |
| Subject: | note 13847 added to function.xslt-transform.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-15023@lists.php.net to get a copy of this message | ||
The documentation is not very self explanatory for this function. After looking at the source code,
here is a sample way of passing string versions of xml and xsl files, and passing parameters, such
as ones passed through GET or POST:
xslt_transform('arg:/xsldata', 'arg:/xmldata', 'arg:/',
$HTTP_GET_VARS, array('xmldata' => $xml_data, 'xsldata' => $xsl_data),
$result);
echo $result;
Further, if you include a file like "html.xsl" in the xsl data, you will need to add an
extra array element like 'html.xsl' => $file_data so that the XSLT processor be able to
access it.
If you want to simply have the XSLT process read a file in, specify a regular URI for it like in the
other functions.
http://www.php.net/manual/en/function.xslt-transform.php