mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
(xslt-process) Minor changes, to make it clearer, that users cannot
suplly the contents of xml documents as args 2/3 but file- names or arguments. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@98491 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
db39ea4a0a
commit
e00efdd677
1 changed files with 32 additions and 10 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- splitted from ./en/functions/xslt.xml, last change in rev 1.3 -->
|
||||
<refentry id="function.xslt-process">
|
||||
<refnamediv>
|
||||
|
@ -11,18 +11,36 @@
|
|||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>xslt_process</methodname>
|
||||
<methodparam><type>resource</type><parameter>xh</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>xml</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>xsl</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>result</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>xmlcontainer</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>xslcontainer</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>resultcontainer</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>array</type><parameter>arguments</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>array</type><parameter>parameters</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
The <function>xslt_process</function> function is the crux of the new
|
||||
XSLT extension. It allows you to perform an XSLT transformation using
|
||||
almost any type of input source. 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).
|
||||
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 'containing' the document to be
|
||||
processed. The result container defaults to a filename for the transformed
|
||||
document. If the result container is not specified - i.e.
|
||||
<parameter>NULL</parameter> - than the result is returned.
|
||||
</para>
|
||||
<para>
|
||||
<warning>
|
||||
<simpara>
|
||||
This function has changed it's arguments, sinceversion 4.0.6. Do NOT
|
||||
provide the actual xml or xsl content as 2nd and 3rd argument, as this
|
||||
will create a segmentation fault, in Sablotron versions up to and
|
||||
including 0.95.
|
||||
</simpara>
|
||||
</warning>
|
||||
</para>
|
||||
<para>
|
||||
Containers can also be set via the <parameter>$arguments</parameter>
|
||||
array (see below).
|
||||
</para>
|
||||
<para>
|
||||
The simplest type of transformation with the
|
||||
|
@ -151,9 +169,13 @@ xslt_free($xh);
|
|||
</example>
|
||||
</para>
|
||||
<para>
|
||||
Finally, the last argument to the <function>xslt_process</function> function is any parameters
|
||||
that you want to pass to the XSLT document. These parameters can then be accessed within
|
||||
your XSL files using the <xsl:param name="parameter_name"> instruction.
|
||||
Finally, the last argument to the <function>xslt_process</function>
|
||||
function represents an array for any top-level parameters that you want to
|
||||
pass to the XSLT document. These parameters can then be accessed within
|
||||
your XSL files using the <xsl:param name="parameter_name">
|
||||
instruction. The parameters must be UTF-8 encoded and their values will be
|
||||
interpreted as strings by the Sablotron processor. In other words - you
|
||||
cannot pass node-sets as parameters to the XSLT document.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
|
Loading…
Reference in a new issue