 |
xslt_create (PHP 4 >= 4.0.3, PECL) xslt_create -- Crea un nuovo processore XSLT Descrizioneresource xslt_create ( void )
Crea e restituisce un nuovo processore XSLT risorsa per la modifica dalle
altre funzioni XSLT.
EsempiEsempio 1. Esempio di utilizzo di xslt_create()
<?php function xml2html($xmldata, $xsl) { /* $xmldata -> 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; } ?>
|
|
|  |