首页 >函数列表 >xslt_setopt

xslt_setopt

xslt_setopt

(PHP 4 >= 4.3.0)

xslt_setoptSet options on a given XSLT processor

说明

mixed xslt_setopt ( resource $processor , int $newmask )

xslt_setopt() sets the options specified by newmask on the given processor.

参数

processor

The XSLT processor link identifier, created with xslt_create().

newmask

newmask is a bitmask constructed with the following constants:

  • XSLT_SABOPT_PARSE_PUBLIC_ENTITIES - Tell the processor to parse public entities. By default this has been turned off.

  • XSLT_SABOPT_DISABLE_ADDING_META - Do not add the meta tag "Content-Type" for HTML output. The default is set during the compilation of the processor.

  • XSLT_SABOPT_DISABLE_STRIPPING - Suppress the whitespace stripping (on data files only).

  • XSLT_SABOPT_IGNORE_DOC_NOT_FOUND - Consider unresolved documents (the document() function) non-lethal.

返回值

Returns the number of previous mask is possible, TRUE otherwise, FALSE in case of an error.

范例

Example #1 xslt_setopt() Example

<?php

$xh 
xslt_create();

// Tell Sablotron to process public entities
xslt_setopt($xhXSLT_SABOPT_PARSE_PUBLIC_ENTITIES);

// Let's also ask him to suppress whitespace stripping
xslt_setopt($xhxslt_getopt($xh) | XSLT_SABOPT_DISABLE_STRIPPING);

?>

参见


  • 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 交通频道