note 20374 deleted from function.xslt-create by cece
| From: | cece@php.net | Date: | Mon, 18 Aug 2003 21:56:04 +0000 |
| Subject: | note 20374 deleted from function.xslt-create by cece | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-54620@lists.php.net to get a copy of this message | ||
Note Submitter: knock@puertorock.cl
----
simple example :
function xml($xmldata,$xsl)
{
/* $xmldata -> you xml... =) */
/* $xsl -> xslt file */
$path = "include";
$arguments = array('/_xml' => $xmldata);
$xsltproc = xslt_create();
xslt_set_encoding ($xsltproc, "ISO-8859-1");
#xslt_set_encoding ($xsltproc, "us-ascii");
$html = xslt_process($xsltproc,'arg:/_xml',"$path/$xsl",NULL,$arguments);
if (!$html) die('XSLT processing error: '.xslt_error($xsltproc));
xslt_free($xsltproc);
echo $html;
return 0;
}
Knock_