function.xslt-process.html

来自「php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容」· HTML 代码 · 共 300 行 · 第 1/2 页

HTML
300
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head>  <title>Perform an XSLT transformation</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="function.xslt-getopt.html">xslt_getopt</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.xslt-set-base.html">xslt_set_base</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-process" class="refentry"> <div class="refnamediv">  <h1 class="refname">xslt_process</h1>  <p class="verinfo">(PHP 4 &gt;= 4.0.3)</p><p class="refpurpose"><span class="refname">xslt_process</span> &mdash; <span class="dc-title">Perform an XSLT transformation</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_process</b></b></span>    ( <span class="methodparam"><span class="type">resource</span> <tt class="parameter">$xh</tt></span>   , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$xmlcontainer</tt></span>   , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$xslcontainer</tt></span>   [, <span class="methodparam"><span class="type">string</span> <tt class="parameter">$resultcontainer</tt></span>   [, <span class="methodparam"><span class="type">array</span> <tt class="parameter">$arguments</tt></span>   [, <span class="methodparam"><span class="type">array</span> <tt class="parameter">$parameters</tt></span>  ]]] )</div>  <p class="para rdfs-comment">   The <b>xslt_process()</b> function is the crux of the XSLT   extension.  It allows you to perform an XSLT transformation using   almost any type of input source - the containers.  This is accomplished   through the use of argument buffers -- a concept taken from the Sablotron   XSLT processor (currently the only XSLT processor this extension supports).   The input containers default to a filename &#039;containing&#039; the document to be   processed.   </p> </div> <div class="refsect1 parameters">  <h3 class="title">Parameters</h3>  <p class="para">   <dl>    <dt>     <span class="term"><i><tt class="parameter">xh</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">xmlcontainer</tt></i></span>     <dd>      <p class="para">       Path to XML file or placeholder for the XML argument.      </p>     </dd>    </dt>    <dt>     <span class="term"><i><tt class="parameter">xslcontainer</tt></i></span>     <dd>      <p class="para">       Path to XSL file or placeholder for the XML argument.      </p>     </dd>    </dt>    <dt>     <span class="term"><i><tt class="parameter">resultcontainer</tt></i></span>     <dd>      <p class="para">       The result container defaults to a filename for the transformed       document. If the result container is not specified - i.e. <b><tt>NULL</tt></b>       - than the result is returned.      </p>     </dd>    </dt>    <dt>     <span class="term"><i><tt class="parameter">arguments</tt></i></span>     <dd>      <p class="para">       Instead of files as the XML and XSLT arguments to the <b>xslt_process()</b>       function, you can specify &quot;argument place holders&quot; which are then substituted by values       given in the <i><tt class="parameter">arguments</tt></i> array.      </p>     </dd>    </dt>    <dt>     <span class="term"><i><tt class="parameter">parameters</tt></i></span>     <dd>      <p class="para">       An array for any top-level parameters that will be passed to the XSLT       document.  These parameters can then be accessed within your XSL files       using the &lt;xsl:param name=&quot;parameter_name&quot;&gt;       instruction. The parameters must be UTF-8 encoded and their values will be       interpreted as strings by the <span class="productname">Sablotron</span> processor.       In other words - you cannot pass node-sets as parameters to the XSLT document.      </p>     </dd>    </dt>   </dl>  </p>  <p class="para">   Containers can also be set via the <i><tt class="parameter">arguments</tt></i>   array (see below).  </p>

⌨️ 快捷键说明

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