xslt_create
(PHP 4 >= 4.0.3)
xslt_create — Создает новый XSLT-процессор
Описание
resource xslt_create
( void
)
Создает новый XSLT-процессор, используемый другими XSLT функциями, и возвращает его ресурс.
Возвращаемые значения
Возвращает ресурс XSLT процессора или FALSE
в случае ошибки.
Примеры
Пример #1 Пример использования xslt_create()
<?php
function xml2html($xmldata, $xsl)
{
/* $xmldata -> ваш XML */
/* $xsl -> XSLT файл */
$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 обработке: '. xslt_error($xsltproc));
}
xslt_free($xsltproc);
return $html;
}
?>
[an error occurred while processing the directive]
- xslt_backend_info
- xslt_backend_name
- xslt_backend_version
- xslt_create
- xslt_errno
- xslt_error
- xslt_free
- xslt_getopt
- xslt_process
- xslt_set_base
- xslt_set_encoding
- xslt_set_error_handler
- xslt_set_log
- xslt_set_object
- xslt_set_sax_handler
- xslt_set_sax_handlers
- xslt_set_scheme_handler
- xslt_set_scheme_handlers
- xslt_setopt
Коментарии
Hardly can I find this. But, those required dll is not included in the package and no link for download.
It's a pitty that no discussion about this within php.net
Note to Win32 Users: In order to enable this module on a Windows environment, you must copy several files from the DLL folder of the PHP/Win32 binary package to the SYSTEM32 folder of your windows machine. (Ex: C:\WINNT\SYSTEM32 or C:\WINDOWS\SYSTEM32). For PHP <= 4.2.0 copy sablot.dll and expat.dll to your SYSTEM32 folder. For PHP >= 4.2.1 copy sablot.dll, expat.dll and iconv.dll to your SYSTEM32 folder.