downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  

<XSLT FunctionsPHP at the Core: A Hacker's Guide to the Zend Engine>
Last updated: Thu, 26 Jun 2008

xslt_setopt

(PHP 4 >= 4.3.0)

xslt_setopt — Set options on a given xsl processor

Description

mixed xslt_setopt ( resource $processor , int $newmask )

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

Parameters

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.

Return Values

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

Examples

Example #1 xslt_setopt() Example

<?php

$xh
= xslt_create();

// Tell Sablotron to process public entities
xslt_setopt($xh, XSLT_SABOPT_PARSE_PUBLIC_ENTITIES);

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

?>

See Also



add a noteadd a note User Contributed Notes
Set options on a given xsl processor
There are no user contributed notes for this page.




<XSLT FunctionsPHP at the Core: A Hacker's Guide to the Zend Engine>
Last updated: Thu, 26 Jun 2008
show source | credits | sitemap | contact | advertising | mirror sites
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://phpbuilder.com/
Last updated: Tue Nov 1 20:20:59 2005 EST
Columns / Articles | Tips / Quickies | News | News Linking and RSS Feeds | Shared Code Library
Mail Archives | Support / Discussion Forums | Get Started! Links | Contribute! | Docs