downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Our source is open

The syntax highlighted source is automatically generated by PHP from the plaintext script. If you're interested in what's behind the several functions we used, you can always take a look at the source of the following files:

Of course, if you want to see the source of this page, we have it available. You can also browse the SVN repository for this website on svn.php.net.

Source of: /manual/en/function.xslt-setopt.php

<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once
dirname(__FILE__) ."/toc/ref.xslt.inc";
$setup = array (
 
'home' =>
  array (
   
0 => 'index.php',
   
1 => 'PHP Manual',
  ),
 
'head' =>
  array (
   
0 => 'UTF-8',
   
1 => 'en',
  ),
 
'this' =>
  array (
   
0 => 'function.xslt-setopt.php',
   
1 => 'xslt_setopt',
  ),
 
'up' =>
  array (
   
0 => 'ref.xslt.php',
   
1 => 'XSLT (PHP4) Functions',
  ),
 
'prev' =>
  array (
   
0 => 'function.xslt-set-scheme-handlers.php',
   
1 => 'xslt_set_scheme_handlers',
  ),
 
'next' =>
  array (
   
0 => 'internals2.php',
   
1 => 'PHP at the Core: A Hacker\'s Guide to the Zend Engine',
  ),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);

manual_header();
?>
<div id="function.xslt-setopt" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">xslt_setopt</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.3.0)</p><p class="refpurpose"><span class="refname">xslt_setopt</span> &mdash; <span class="dc-title">Set options on a given xsl processor</span></p>

 </div>
 
 <a name="function.xslt-setopt.description"></a><div class="refsect1 description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type"><a href="language.pseudo-types.php#language.types.mixed" class="type mixed">mixed</a></span> <span class="methodname"><b>xslt_setopt</b></span>
    ( <span class="methodparam"><span class="type">resource</span> <tt class="parameter">$processor</tt></span>
   , <span class="methodparam"><span class="type">int</span> <tt class="parameter">$newmask</tt></span>
   )</div>

  <p class="para rdfs-comment">
   <b>xslt_setopt()</b> sets the options specified by
   <i><tt class="parameter">newmask</tt></i>
 on the given <i><tt class="parameter">processor</tt></i>
.
  </p>
 </div>


 <a name="function.xslt-setopt.parameters"></a><div class="refsect1 parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   </p><dl>

    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">processor</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       The XSLT processor link identifier, created with
       <a href="function.xslt-create.php" class="function">xslt_create()</a>.
      </p>
     </dd>

   
    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">newmask</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       <i><tt class="parameter">newmask</tt></i>
 is a bitmask constructed with the
       following constants:
       </p><ul class="itemizedlist">
        <li class="listitem">
         <p class="para">
          <b><tt class="constant">XSLT_SABOPT_PARSE_PUBLIC_ENTITIES</tt></b> - Tell the
          processor to parse public entities. By default this has been turned
          off.
         </p>
        </li>
        <li class="listitem">
         <p class="para">
          <b><tt class="constant">XSLT_SABOPT_DISABLE_ADDING_META</tt></b> - Do not add
          the meta tag &quot;Content-Type&quot; for HTML output. The default is set
          during the compilation of the processor.
         </p>
        </li>
        <li class="listitem">
         <p class="para">
          <b><tt class="constant">XSLT_SABOPT_DISABLE_STRIPPING</tt></b> - Suppress the
          whitespace stripping (on data files only).
         </p>
        </li>
        <li class="listitem">
         <p class="para">
          <b><tt class="constant">XSLT_SABOPT_IGNORE_DOC_NOT_FOUND</tt></b> - Consider
          unresolved documents (the document() function) non-lethal.
         </p>
        </li>
       </ul><p>
      </p>
     </dd>

   
   </dl>
<p>
  </p>
 </div>


 <a name="function.xslt-setopt.returnvalues"></a><div class="refsect1 returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns the number of previous mask is possible, <b><tt class="constant">TRUE</tt></b> otherwise,
   <b><tt class="constant">FALSE</tt></b> in case of an error.
  </p>
 </div>


 <a name="function.xslt-setopt.examples"></a><div class="refsect1 examples">
  <h3 class="title">Examples</h3>
  <p class="para">
   </p><div class="example">
    <p><b>Example #1 <b>xslt_setopt()</b> Example</b></p>
    <div class="example-contents programlisting">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /><br />$xh&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">xslt_create</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">//&nbsp;Tell&nbsp;Sablotron&nbsp;to&nbsp;process&nbsp;public&nbsp;entities<br /></span><span style="color: #0000BB">xslt_setopt</span><span style="color: #007700">(</span><span style="color: #0000BB">$xh</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">XSLT_SABOPT_PARSE_PUBLIC_ENTITIES</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//&nbsp;Let's&nbsp;also&nbsp;ask&nbsp;him&nbsp;to&nbsp;suppress&nbsp;whitespace&nbsp;stripping<br /></span><span style="color: #0000BB">xslt_setopt</span><span style="color: #007700">(</span><span style="color: #0000BB">$xh</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">xslt_getopt</span><span style="color: #007700">(</span><span style="color: #0000BB">$xh</span><span style="color: #007700">)&nbsp;|&nbsp;</span><span style="color: #0000BB">XSLT_SABOPT_DISABLE_STRIPPING</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div><p>
  </p>
 </div>

 
 <a name="function.xslt-setopt.seealso"></a><div class="refsect1 seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   </p><ul class="simplelist">
    <li class="member"><a href="function.xslt-getopt.php" class="function" rel="rdfs-seeAlso">xslt_getopt()</a> - Get options on a given xsl processor</li>
   </ul><p>
  </p>
 </div>


</div><?php manual_footer(); ?>
 
show source | credits | sitemap | contact | advertising | mirror sites