⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 function.xslt-setopt.html

📁 php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head>  <title>Set options on a given xsl processor</title>  <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="ref.xslt.html">XSLT Functions</a></div> <div class="next" style="text-align: right; float: right;"><a href="internals2.html">PHP at the Core: A Hacker's Guide to the Zend Engine</a></div> <div class="up"><a href="ref.xslt.html">XSLT Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><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>  <div class="refsect1 description">  <h3 class="title">Description</h3>  <div class="methodsynopsis dc-description">   <span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span> <span class="methodname"><b><b>xslt_setopt</b></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> <div class="refsect1 parameters">  <h3 class="title">Parameters</h3>  <p class="para">   <dl>    <dt>     <span class="term"><i><tt class="parameter">processor</tt></i></span>     <dd>      <p class="para">       The XSLT processor link identifier, created with       <a href="function.xslt-create.html" class="function">xslt_create()</a>.      </p>     </dd>    </dt>    <dt>     <span class="term"><i><tt class="parameter">newmask</tt></i></span>     <dd>      <p class="para">       <i><tt class="parameter">newmask</tt></i> is a bitmask constructed with the       following constants:       <ul class="itemizedlist">        <li class="listitem">         <p class="para">          <b><tt>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>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>XSLT_SABOPT_DISABLE_STRIPPING</tt></b> - Suppress the          whitespace stripping (on data files only).         </p>        </li>        <li class="listitem">         <p class="para">          <b><tt>XSLT_SABOPT_IGNORE_DOC_NOT_FOUND</tt></b> - Consider          unresolved documents (the document() function) non-lethal.         </p>        </li>       </ul>      </p>     </dd>    </dt>   </dl>  </p> </div> <div class="refsect1 returnvalues">  <h3 class="title">Return Values</h3>  <p class="para">   Returns the number of previous mask is possible, <b><tt>TRUE</tt></b> otherwise,   <b><tt>FALSE</tt></b> in case of an error.  </p> </div> <div class="refsect1 examples">  <h3 class="title">Examples</h3>  <p class="para">   <div class="example">    <p><b>Example #1 <b>xslt_setopt()</b> Example</b></p>    <div class="example-contents"><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> </div>  <div class="refsect1 seealso">  <h3 class="title">See Also</h3>  <p class="para">   <ul class="simplelist">    <li class="member"><a href="function.xslt-getopt.html" class="function" rel="rdfs-seeAlso">xslt_getopt()</a></li>   </ul>  </p> </div></div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="ref.xslt.html">XSLT Functions</a></div> <div class="next" style="text-align: right; float: right;"><a href="internals2.html">PHP at the Core: A Hacker's Guide to the Zend Engine</a></div> <div class="up"><a href="ref.xslt.html">XSLT Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -