From b0f713fe3daa4bfbee2170f76270294bf5ea6cbe Mon Sep 17 00:00:00 2001 From: "Heilig (Cece) Szabolcs" Date: Mon, 18 Aug 2003 21:54:12 +0000 Subject: [PATCH] added example and see also git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@138208 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/xslt/functions/xslt-create.xml | 33 +++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/reference/xslt/functions/xslt-create.xml b/reference/xslt/functions/xslt-create.xml index d928a6ac8e..783ca8e814 100644 --- a/reference/xslt/functions/xslt-create.xml +++ b/reference/xslt/functions/xslt-create.xml @@ -1,5 +1,5 @@ - + @@ -16,6 +16,37 @@ Create and return a new XSLT processor resource for manipulation by the other XSLT functions. + + + + <function>xslt_create</function> example + + your xml */ + /* $xsl -> xslt file */ + + $path = 'include'; + $arguments = array('/_xml' => $xmldata); + $xsltproc = xslt_create(); + xslt_set_encoding($xsltproc, 'ISO-8859-1'); + $html = +xslt_process($xsltproc,'arg:/_xml',"$path/$xsl",NULL,$arguments); + + if (empty($html)) { + die('XSLT processing error: '.xslt_error($xsltproc)); + } + xslt_free($xsltproc); + return $html; +} +?> +]]> + + + + See also xslt_free. +