首页 >函数列表 >xslt_create

xslt_create

xslt_create

(PHP 4 >= 4.0.3)

xslt_createCreate a new XSLT processor

说明

resource xslt_create ( void )

Create and return a new XSLT processor resource for manipulation by the other XSLT functions.

返回值

Returns an XSLT processor link identifier on success, or FALSE on error.

范例

Example #1 xslt_create() example

<?php
function xml2html($xmldata$xsl)
{
    

    

    
$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;
}
?>

参见


  • xslt_backend_info
  • xslt_backend_name
  • xslt_backend_version
  • xslt_create
  • xslt_errno
  • xslt_error
  • xslt_free
  • xslt_getopt
  • xslt_process
  • xslt_setopt
  • 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
  • PHP MySQL HTML CSS JavaScript MSSQL AJAX .NET JSP Linux Mac ASP 服务器 SQL jQuery C# C++ java Android IOS oracle MongoDB SQLite wamp 交通频道