ref.xslt: switch to new doc style

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@237384 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Mehdi Achour 2007-06-11 00:05:27 +00:00
parent e4e6e9c60a
commit 9e528680d8
19 changed files with 954 additions and 369 deletions

View file

@ -1,29 +1,41 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<refentry id="function.xslt-backend-info">
<refnamediv>
<refname>xslt_backend_info</refname>
<refpurpose>Returns the information on the compilation settings of the backend</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>xslt_backend_info</methodname>
<void/>
</methodsynopsis>
<para>
<function>xslt_backend_info</function> returns a string with
information about the compilation setting of the backend
or an error string when no information available.
<function>xslt_backend_info</function> gets information about the
compilation settings of the backend.
</para>
</refsect1>
<refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns a string with information about the compilation setting of the
backend or an error string when no information available.
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<function>xslt_backend_name</function>&listendand;
<function>xslt_backend_version</function>.
<simplelist>
<member><function>xslt_backend_name</function></member>
<member><function>xslt_backend_version</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -1,26 +1,35 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<refentry id="function.xslt-backend-name">
<refnamediv>
<refname>xslt_backend_name</refname>
<refpurpose>Returns the name of the backend</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>xslt_backend_name</methodname>
<void/>
</methodsynopsis>
<para>
<function>xslt_backend_name</function> will always return
<productname>Sablotron</productname>.
<function>xslt_backend_name</function> gets the name of the backend.
</para>
</refsect1>
<refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns <productname>Sablotron</productname>.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>
<title><function>xslt_backend_name</function> example</title>
<programlisting role="php">
<para>
<example>
<title><function>xslt_backend_name</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
@ -28,16 +37,21 @@ echo xslt_backend_name(); // Sablotron
?>
]]>
</programlisting>
</example>
</refsect1>
<refsect1>
&reftitle.seealso;
<para>
<function>xslt_backend_info</function>&listendand;
<function>xslt_backend_version</function>.
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>xslt_backend_info</function></member>
<member><function>xslt_backend_version</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -1,27 +1,36 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.5 $ -->
<!-- $Revision: 1.6 $ -->
<refentry id="function.xslt-backend-version">
<refnamediv>
<refname>xslt_backend_version</refname>
<refpurpose>Returns the version number of Sablotron</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>xslt_backend_version</methodname>
<void/>
</methodsynopsis>
<para>
<function>xslt_backend_version</function> returns the version
number of <productname>Sablotron</productname> if available,
&false; otherwise.
<function>xslt_backend_version</function> gets the version
number of <productname>Sablotron</productname>.
</para>
</refsect1>
<refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the version number, or &false; if not available.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>
<title><function>xslt_backend_version</function> example</title>
<programlisting role="php">
<para>
<example>
<title><function>xslt_backend_version</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
@ -29,16 +38,21 @@ echo xslt_backend_version(); // 0.98 for example
?>
]]>
</programlisting>
</example>
</refsect1>
<refsect1>
&reftitle.seealso;
<para>
<function>xslt_backend_name</function>&listendand;
<function>xslt_backend_info</function>.
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>xslt_backend_info</function></member>
<member><function>xslt_backend_name</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.10 $ -->
<!-- splitted from ./en/functions/xslt.xml, last change in rev 1.3 -->
<!-- $Revision: 1.11 $ -->
<refentry id="function.xslt-create">
<refnamediv>
<refname>xslt_create</refname>
<refpurpose>Create a new XSLT processor</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>resource</type><methodname>xslt_create</methodname>
<void/>
@ -17,11 +17,20 @@
other XSLT functions.
</para>
</refsect1>
<refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns an XSLT processor link identifier on success, or &false; on error.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>
<title><function>xslt_create</function> example</title>
<programlisting role="php">
<para>
<example>
<title><function>xslt_create</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
function xml2html($xmldata, $xsl)
@ -44,15 +53,20 @@ function xml2html($xmldata, $xsl)
}
?>
]]>
</programlisting>
</example>
</refsect1>
<refsect1>
&reftitle.seealso;
<para>
<function>xslt_free</function>.
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>xslt_free</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/xslt.xml, last change in rev 1.3 -->
<!-- $Revision: 1.8 $ -->
<refentry id="function.xslt-errno">
<refnamediv>
<refname>xslt_errno</refname>
<refpurpose>Returns an error number</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>xslt_errno</methodname>
<methodparam><type>resource</type><parameter>xh</parameter></methodparam>
@ -17,12 +17,40 @@
passed XSLT processor.
</para>
</refsect1>
<refsect1>
&reftitle.seealso;
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<function>xslt_error</function>.
<variablelist>
<varlistentry>
<term><parameter>xh</parameter></term>
<listitem>
<para>
The XSLT processor link identifier, created with
<function>xslt_create</function>.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the error code, as an integer.
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>xslt_error</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.9 $ -->
<!-- splitted from ./en/functions/xslt.xml, last change in rev 1.3 -->
<!-- $Revision: 1.10 $ -->
<refentry id="function.xslt-error">
<refnamediv>
<refname>xslt_error</refname>
<refpurpose>Returns an error string</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>xslt_error</methodname>
<methodparam><type>resource</type><parameter>xh</parameter></methodparam>
@ -17,14 +17,40 @@
passed XSLT processor.
</para>
</refsect1>
<refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>xh</parameter></term>
<listitem>
<para>
The XSLT processor link identifier, created with
<function>xslt_create</function>.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the error message, as a string.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>
<title>
Handling errors using the <function>xslt_error</function> and
<function>xslt_errno</function> functions.
</title>
<programlisting role="php">
<para>
<example>
<title>
Handling errors using the <function>xslt_error</function> and
<function>xslt_errno</function> functions.
</title>
<programlisting role="php">
<![CDATA[
<?php
@ -40,15 +66,20 @@ echo $result;
xslt_free($xh);
?>
]]>
</programlisting>
</example>
</refsect1>
<refsect1>
&reftitle.seealso;
<para>
<function>xslt_errno</function>.
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>xslt_errno</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/xslt.xml, last change in rev 1.3 -->
<!-- $Revision: 1.6 $ -->
<refentry id="function.xslt-free">
<refnamediv>
<refname>xslt_free</refname>
<refpurpose>Free XSLT processor</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>void</type><methodname>xslt_free</methodname>
<methodparam><type>resource</type><parameter>xh</parameter></methodparam>
@ -16,12 +16,40 @@
Free the XSLT processor identified by the given handle.
</para>
</refsect1>
<refsect1>
&reftitle.seealso;
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<function>xslt_create</function>
<variablelist>
<varlistentry>
<term><parameter>xh</parameter></term>
<listitem>
<para>
The XSLT processor link identifier, created with
<function>xslt_create</function>.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.void;
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>xslt_create</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -1,12 +1,13 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<refentry id="function.xslt-getopt">
<refnamediv>
<refname>xslt_getopt</refname>
<refpurpose>Get options on a given xsl processor</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>xslt_getopt</methodname>
<methodparam><type>resource</type><parameter>processor</parameter></methodparam>
@ -16,12 +17,41 @@
<parameter>processor</parameter>.
</para>
</refsect1>
<refsect1>
&reftitle.seealso;
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<function>xslt_setopt</function>.
<variablelist>
<varlistentry>
<term><parameter>processor</parameter></term>
<listitem>
<para>
The XSLT processor link identifier, created with
<function>xslt_create</function>.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the options, a bitmask constructed with the
<literal>XSLT_SABOPT_XXX</literal> constants.
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>xslt_setopt</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.19 $ -->
<!-- splitted from ./en/functions/xslt.xml, last change in rev 1.3 -->
<!-- $Revision: 1.20 $ -->
<refentry id="function.xslt-process">
<refnamediv>
<refname>xslt_process</refname>
<refpurpose>Perform an XSLT transformation</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>mixed</type><methodname>xslt_process</methodname>
<methodparam><type>resource</type><parameter>xh</parameter></methodparam>
@ -18,31 +18,124 @@
<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
The <function>xslt_process</function> 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 '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.
&null; - than the result is returned.
processed.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<warning>
<simpara>
As of PHP 4.0.6, this function no longer takes XML strings in
<parameter>xmlcontainer</parameter> or
<parameter>xslcontainer</parameter>. Passing a string containing XML
to either of these parameters will result in a segmentation fault in
Sablotron versions up to and including version 0.95.
</simpara>
</warning>
<variablelist>
<varlistentry>
<term><parameter>xh</parameter></term>
<listitem>
<para>
The XSLT processor link identifier, created with
<function>xslt_create</function>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>xmlcontainer</parameter></term>
<listitem>
<para>
Path to XML file or placeholder for the XML argument.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>xslcontainer</parameter></term>
<listitem>
<para>
Path to XSL file or placeholder for the XML argument.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>resultcontainer</parameter></term>
<listitem>
<para>
The result container defaults to a filename for the transformed
document. If the result container is not specified - i.e. &null;
- than the result is returned.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>arguments</parameter></term>
<listitem>
<para>
Instead of files as the XML and XSLT arguments to the <function>xslt_process</function>
function, you can specify &quot;argument place holders&quot; which are then substituted by values
given in the <parameter>arguments</parameter> array.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>parameters</parameter></term>
<listitem>
<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 <productname>Sablotron</productname> processor.
In other words - you cannot pass node-sets as parameters to the XSLT document.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
<para>
Containers can also be set via the <parameter>arguments</parameter>
array (see below).
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success; If the result container is not specified - i.e.
&null; - than the result is returned.
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>4.0.6</entry>
<entry>
This function no longer takes XML strings in
<parameter>xmlcontainer</parameter> or
<parameter>xslcontainer</parameter>. Passing a string containing XML
to either of these parameters will result in a segmentation fault in
Sablotron versions up to and including version 0.95.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
The simplest type of transformation with the
<function>xslt_process</function> function is the transformation of an
@ -166,15 +259,6 @@ xslt_free($xh);
</programlisting>
</example>
</para>
<para>
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 &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 <productname>Sablotron</productname> processor.
In other words - you cannot pass node-sets as parameters to the XSLT document.
</para>
<para>
<example>
<title>Passing PHP variables to XSL files</title>
@ -229,8 +313,13 @@ My node set : &lt;foo&gt;bar&lt;/foo&gt;
</screen>
</example>
</para>
</refsect1>
<refsect1 role="notes">
&reftitle.notes;
&note.xslt.windows;
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.6 $ -->
<!-- splitted from ./en/functions/xslt.xml, last change in rev 1.3 -->
<!-- $Revision: 1.7 $ -->
<refentry id="function.xslt-set-base">
<refnamediv>
<refname>xslt_set_base</refname>
<refpurpose>Set the base URI for all XSLT transformations</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>void</type><methodname>xslt_set_base</methodname>
<methodparam><type>resource</type><parameter>xh</parameter></methodparam>
@ -19,13 +19,71 @@
access external resources. It is also used to resolve URIs for the &lt;xsl:include&gt;
and &lt;xsl:import&gt; elements.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
As of 4.3, the default base URI is the directory of the executing script.
In effect, it is the directory name value of the <constant>__FILE__</constant>
constant. Prior to 4.3, the default base URI was less predictable.
<variablelist>
<varlistentry>
<term><parameter>xh</parameter></term>
<listitem>
<para>
The XSLT processor link identifier, created with
<function>xslt_create</function>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>uri</parameter></term>
<listitem>
<para>
The base URI to be used.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.void;
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>4.3.0</entry>
<entry>
As of PHP 4.3.0, the default base URI is the directory of the executing script.
In effect, it is the directory name value of the <constant>__FILE__</constant>
constant. The default base URI is less predictable with older versions.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
<refsect1 role="notes">
&reftitle.notes;
&note.xslt.windows;
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/xslt.xml, last change in rev 1.3 -->
<!-- $Revision: 1.5 $ -->
<refentry id="function.xslt-set-encoding">
<refnamediv>
<refname>xslt_set_encoding</refname>
<refpurpose>Set the encoding for the parsing of XML documents</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>void</type><methodname>xslt_set_encoding</methodname>
<methodparam><type>resource</type><parameter>xh</parameter></methodparam>
@ -20,6 +20,39 @@
encoding support.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>xh</parameter></term>
<listitem>
<para>
The XSLT processor link identifier, created with
<function>xslt_create</function>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>encoding</parameter></term>
<listitem>
<para>
An output encoding, e.g <literal>iso-8859-1</literal>.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.void;
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -1,17 +1,17 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/xslt.xml, last change in rev 1.1 -->
<!-- $Revision: 1.8 $ -->
<refentry id="function.xslt-set-error-handler">
<refnamediv>
<refname>xslt_set_error_handler</refname>
<refpurpose>Set an error handler for a XSLT processor</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>void</type><methodname>xslt_set_error_handler</methodname>
<methodparam><type>resource</type><parameter>xh</parameter></methodparam>
<methodparam><type>mixed</type><parameter>handler</parameter></methodparam>
<methodparam><type>resource</type><parameter>xh</parameter></methodparam>
<methodparam><type>mixed</type><parameter>handler</parameter></methodparam>
</methodsynopsis>
<para>
Set an error handler function for the XSLT processor given by
@ -19,20 +19,50 @@
error occurs in the XSLT transformation (this function is also called
for notices).
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
The user function needs to accept four parameters: the XSLT processor,
the error level, the error code and an array of messages. The function
can be shown as:
<methodsynopsis>
<methodname><replaceable>error_handler</replaceable></methodname>
<methodparam><type>resource</type><parameter>xh</parameter></methodparam>
<methodparam><type>int</type><parameter>error_level</parameter></methodparam>
<methodparam><type>int</type><parameter>error_code</parameter></methodparam>
<methodparam><type>array</type><parameter>messages</parameter></methodparam>
</methodsynopsis>
<variablelist>
<varlistentry>
<term><parameter>xh</parameter></term>
<listitem>
<para>
The XSLT processor link identifier, created with
<function>xslt_create</function>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>handler</parameter></term>
<listitem>
<para>
The user function needs to accept four parameters: the XSLT processor,
the error level, the error code and an array of messages. The function
can be shown as:
<methodsynopsis>
<methodname><replaceable>error_handler</replaceable></methodname>
<methodparam><type>resource</type><parameter>xh</parameter></methodparam>
<methodparam><type>int</type><parameter>error_level</parameter></methodparam>
<methodparam><type>int</type><parameter>error_code</parameter></methodparam>
<methodparam><type>array</type><parameter>messages</parameter></methodparam>
</methodsynopsis>
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.void;
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>
<title><function>xslt_set_error_handler</function> Example</title>
@ -101,13 +131,17 @@ array(4) {
</screen>
</example>
</refsect1>
<refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<function>xslt_set_object</function> if you want to use an
object method as handler.
<simplelist>
<member><function>xslt_set_object</function> if you want to use an
object method as handler</member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -1,38 +1,18 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.9 $ -->
<!-- splitted from ./en/functions/xslt.xml, last change in rev 1.3 -->
<!-- $Revision: 1.10 $ -->
<refentry id="function.xslt-set-log">
<refnamediv>
<refname>xslt_set_log</refname>
<refpurpose>Set the log file to write log messages to</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>void</type><methodname>xslt_set_log</methodname>
<methodparam><type>resource</type><parameter>xh</parameter></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>log</parameter></methodparam>
</methodsynopsis>
<para>
<variablelist>
<varlistentry>
<term><parameter>xh</parameter></term>
<listitem>
<simpara>
A reference to the XSLT parser.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>log</parameter></term>
<listitem>
<simpara>
This parameter is either a boolean value which toggles logging on and
off, or a string containing the logfile in which log errors too.
</simpara>
</listitem>
</varlistentry>
</variablelist></para>
<para>
This function allows you to set the file in which you want XSLT log
messages to, XSLT log messages are different than error messages, in
@ -46,13 +26,52 @@
which enables logging, then if you want to set the log file to debug to,
you must then pass it a string containing the filename.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>xh</parameter></term>
<listitem>
<para>
The XSLT processor link identifier, created with
<function>xslt_create</function>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>log</parameter></term>
<listitem>
<para>
This parameter is either a boolean value which toggles logging on and
off, or a string containing the logfile in which log errors too.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.void;
</para>
</refsect1>
<refsect1 role="notes">
&reftitle.notes;
&note.xslt.windows;
</refsect1>
<refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>
<title>Using the XSLT Logging features</title>
<programlisting role="php">
<para>
<example>
<title>Using the XSLT Logging features</title>
<programlisting role="php">
<![CDATA[
<?php
@ -66,9 +85,11 @@ echo $result;
xslt_free($xh);
?>
]]>
</programlisting>
</example>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -1,12 +1,13 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.7 $ -->
<!-- $Revision: 1.8 $ -->
<refentry id="function.xslt-set-object">
<refnamediv>
<refname>xslt_set_object</refname>
<refpurpose>Sets the object in which to resolve callback functions</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>bool</type><methodname>xslt_set_object</methodname>
<methodparam><type>resource</type><parameter>processor</parameter></methodparam>
@ -25,7 +26,41 @@
of <parameter>object</parameter>.
</para>
</refsect1>
<refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>processor</parameter></term>
<listitem>
<para>
The XSLT processor link identifier, created with
<function>xslt_create</function>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>obj</parameter></term>
<listitem>
<para>
An object.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.success;
</para>
</refsect1>
<refsect1 role="description">
&reftitle.examples;
<example>
<title>Using your own error handler as a method</title>
@ -60,6 +95,7 @@ class my_xslt_processor {
</programlisting>
</example>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/xslt.xml, last change in rev 1.3 -->
<!-- $Revision: 1.4 $ -->
<refentry id="function.xslt-set-sax-handler">
<refnamediv>
<refname>xslt_set_sax_handler</refname>
<refpurpose>Set SAX handlers for a XSLT processor</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>void</type><methodname>xslt_set_sax_handler</methodname>
<methodparam><type>resource</type><parameter>xh</parameter></methodparam>
@ -15,10 +15,31 @@
</methodsynopsis>
<para>
Set SAX handlers on the resource handle given by
<parameter>xh</parameter>. SAX handlers should be a two dimensional array
with the format (all top level elements are optional):
<informalexample>
<programlisting role="php">
<parameter>xh</parameter>.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>xh</parameter></term>
<listitem>
<para>
The XSLT processor link identifier, created with
<function>xslt_create</function>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>handlers</parameter></term>
<listitem>
<para>
SAX handlers should be a two dimensional array
with the format (all top level elements are optional):
<informalexample>
<programlisting role="php">
<![CDATA[
array(
[document] =>
@ -41,10 +62,22 @@ array(
[character] => character data handler
)
]]>
</programlisting>
</informalexample>
</programlisting>
</informalexample>
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.void;
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.8 $ -->
<!-- splitted from ./en/functions/xslt.xml, last change in rev 1.29 -->
<!-- $Revision: 1.9 $ -->
<refentry id='function.xslt-set-sax-handlers'>
<refnamediv>
<refname>xslt_set_sax_handlers</refname>
<refpurpose>Set the SAX handlers to be called when the XML document gets processed</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>void</type><methodname>xslt_set_sax_handlers</methodname>
<methodparam><type>resource</type><parameter>processor</parameter></methodparam>
@ -19,9 +19,32 @@
<parameter>processor</parameter> resource.
</para>
<para>
<parameter>handlers</parameter> should be an array in the following format:
<informalexample>
<programlisting role="php">
Using <function>xslt_set_sax_handlers</function> doesn't look very different than
running a SAX parser like <function>xml_parse</function> on the result of an
<function>xslt_process</function> transformation.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>processor</parameter></term>
<listitem>
<para>
The XSLT processor link identifier, created with
<function>xslt_create</function>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>handlers</parameter></term>
<listitem>
<para>
<parameter>handlers</parameter> should be an array in the following format:
<informalexample>
<programlisting role="php">
<![CDATA[
<?php
@ -48,112 +71,120 @@ $handlers = array(
);
?>
]]>
</programlisting>
</informalexample>
Where the functions follow the syntax described for the scheme handler
functions.
</para>
<note>
<para>
The given array does not need to contain all of the different sax
handler elements (although it can), but it only needs to conform to
"handler" => "function" format described above.
</para>
</note>
<para>
Each of the individual SAX handler functions are in the format below:
<itemizedlist>
<listitem>
<simpara>
<methodsynopsis>
<methodname><replaceable>start_doc</replaceable></methodname>
<methodparam><type>resource</type><parameter>processor</parameter></methodparam>
</methodsynopsis>
</simpara>
</listitem>
<listitem>
<simpara>
<methodsynopsis>
<methodname><replaceable>end_doc</replaceable></methodname>
<methodparam><type>resource</type><parameter>processor</parameter></methodparam>
</methodsynopsis>
</simpara>
</listitem>
<listitem>
<simpara>
<methodsynopsis>
<methodname><replaceable>start_element</replaceable></methodname>
<methodparam><type>resource</type><parameter>processor</parameter></methodparam>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
<methodparam><type>array</type><parameter>attributes</parameter></methodparam>
</methodsynopsis>
</simpara>
</listitem>
<listitem>
<simpara>
<methodsynopsis>
<methodname><replaceable>end_element</replaceable></methodname>
<methodparam><type>resource</type><parameter>processor</parameter></methodparam>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
</methodsynopsis>
</simpara>
</listitem>
<listitem>
<simpara>
<methodsynopsis>
<methodname><replaceable>start_namespace</replaceable></methodname>
<methodparam><type>resource</type><parameter>processor</parameter></methodparam>
<methodparam><type>string</type><parameter>prefix</parameter></methodparam>
<methodparam><type>string</type><parameter>uri</parameter></methodparam>
</methodsynopsis>
</simpara>
</listitem>
<listitem>
<simpara>
<methodsynopsis>
<methodname><replaceable>end_namespace</replaceable></methodname>
<methodparam><type>resource</type><parameter>processor</parameter></methodparam>
<methodparam><type>string</type><parameter>prefix</parameter></methodparam>
</methodsynopsis>
</simpara>
</listitem>
<listitem>
<simpara>
<methodsynopsis>
<methodname><replaceable>comment</replaceable></methodname>
<methodparam><type>resource</type><parameter>processor</parameter></methodparam>
<methodparam><type>string</type><parameter>contents</parameter></methodparam>
</methodsynopsis>
</simpara>
</listitem>
<listitem>
<simpara>
<methodsynopsis>
<methodname><replaceable>pi</replaceable></methodname>
<methodparam><type>resource</type><parameter>processor</parameter></methodparam>
<methodparam><type>string</type><parameter>target</parameter></methodparam>
<methodparam><type>string</type><parameter>contents</parameter></methodparam>
</methodsynopsis>
</simpara>
</listitem>
<listitem>
<simpara>
<methodsynopsis>
<methodname><replaceable>characters</replaceable></methodname>
<methodparam><type>resource</type><parameter>processor</parameter></methodparam>
<methodparam><type>string</type><parameter>contents</parameter></methodparam>
</methodsynopsis>
</simpara>
</listitem>
</itemizedlist>
</para>
<para>
Using <function>xslt_set_sax_handlers</function> doesn't look very different than
running a SAX parser like <function>xml_parse</function> on the result of an
<function>xslt_process</function> transformation.
</programlisting>
</informalexample>
Where the functions follow the syntax described for the scheme handler
functions.
</para>
<note>
<para>
The given array does not need to contain all of the different sax
handler elements (although it can), but it only needs to conform to
"handler" => "function" format described above.
</para>
</note>
<para>
Each of the individual SAX handler functions are in the format below:
<itemizedlist>
<listitem>
<simpara>
<methodsynopsis>
<methodname><replaceable>start_doc</replaceable></methodname>
<methodparam><type>resource</type><parameter>processor</parameter></methodparam>
</methodsynopsis>
</simpara>
</listitem>
<listitem>
<simpara>
<methodsynopsis>
<methodname><replaceable>end_doc</replaceable></methodname>
<methodparam><type>resource</type><parameter>processor</parameter></methodparam>
</methodsynopsis>
</simpara>
</listitem>
<listitem>
<simpara>
<methodsynopsis>
<methodname><replaceable>start_element</replaceable></methodname>
<methodparam><type>resource</type><parameter>processor</parameter></methodparam>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
<methodparam><type>array</type><parameter>attributes</parameter></methodparam>
</methodsynopsis>
</simpara>
</listitem>
<listitem>
<simpara>
<methodsynopsis>
<methodname><replaceable>end_element</replaceable></methodname>
<methodparam><type>resource</type><parameter>processor</parameter></methodparam>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
</methodsynopsis>
</simpara>
</listitem>
<listitem>
<simpara>
<methodsynopsis>
<methodname><replaceable>start_namespace</replaceable></methodname>
<methodparam><type>resource</type><parameter>processor</parameter></methodparam>
<methodparam><type>string</type><parameter>prefix</parameter></methodparam>
<methodparam><type>string</type><parameter>uri</parameter></methodparam>
</methodsynopsis>
</simpara>
</listitem>
<listitem>
<simpara>
<methodsynopsis>
<methodname><replaceable>end_namespace</replaceable></methodname>
<methodparam><type>resource</type><parameter>processor</parameter></methodparam>
<methodparam><type>string</type><parameter>prefix</parameter></methodparam>
</methodsynopsis>
</simpara>
</listitem>
<listitem>
<simpara>
<methodsynopsis>
<methodname><replaceable>comment</replaceable></methodname>
<methodparam><type>resource</type><parameter>processor</parameter></methodparam>
<methodparam><type>string</type><parameter>contents</parameter></methodparam>
</methodsynopsis>
</simpara>
</listitem>
<listitem>
<simpara>
<methodsynopsis>
<methodname><replaceable>pi</replaceable></methodname>
<methodparam><type>resource</type><parameter>processor</parameter></methodparam>
<methodparam><type>string</type><parameter>target</parameter></methodparam>
<methodparam><type>string</type><parameter>contents</parameter></methodparam>
</methodsynopsis>
</simpara>
</listitem>
<listitem>
<simpara>
<methodsynopsis>
<methodname><replaceable>characters</replaceable></methodname>
<methodparam><type>resource</type><parameter>processor</parameter></methodparam>
<methodparam><type>string</type><parameter>contents</parameter></methodparam>
</methodsynopsis>
</simpara>
</listitem>
</itemizedlist>
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.void;
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>
<title><function>xslt_set_sax_handlers</function> Example</title>
@ -328,6 +359,7 @@ $exec = new data_sax_handler($xml, $xsl);
</screen>
</example>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/xslt.xml, last change in rev 1.3 -->
<!-- $Revision: 1.4 $ -->
<refentry id="function.xslt-set-scheme-handler">
<refnamediv>
<refname>xslt_set_scheme_handler</refname>
<refpurpose>Set Scheme handlers for a XSLT processor</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>void</type><methodname>xslt_set_scheme_handler</methodname>
<methodparam><type>resource</type><parameter>xh</parameter></methodparam>
@ -15,10 +15,31 @@
</methodsynopsis>
<para>
Set Scheme handlers on the resource handle given by
<parameter>xh</parameter>. Scheme handlers should be an array with the
format (all elements are optional):
<informalexample>
<programlisting role="php">
<parameter>xh</parameter>.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>xh</parameter></term>
<listitem>
<para>
The XSLT processor link identifier, created with
<function>xslt_create</function>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>handlers</parameter></term>
<listitem>
<para>
Scheme handlers should be an array with the
format (all elements are optional):
<informalexample>
<programlisting role="php">
<![CDATA[
array(
[get_all] => get all handler,
@ -28,10 +49,22 @@ array(
[close] => close handler
)
]]>
</programlisting>
</informalexample>
</programlisting>
</informalexample>
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.void;
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/xslt.xml, last change in rev 1.29 -->
<!-- $Revision: 1.4 $ -->
<refentry id='function.xslt-set-scheme-handlers'>
<refnamediv>
<refname>xslt_set_scheme_handlers</refname>
<refpurpose>Set the scheme handlers for the XSLT processor</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>void</type><methodname>xslt_set_scheme_handlers</methodname>
<methodparam><type>resource</type><parameter>processor</parameter></methodparam>
@ -17,6 +17,14 @@
&warn.undocumented.func;
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
&return.void;
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file

View file

@ -1,12 +1,13 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.7 $ -->
<!-- $Revision: 1.8 $ -->
<refentry id="function.xslt-setopt">
<refnamediv>
<refname>xslt_setopt</refname>
<refpurpose>Set options on a given xsl processor</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>mixed</type><methodname>xslt_setopt</methodname>
<methodparam><type>resource</type><parameter>processor</parameter></methodparam>
@ -15,46 +16,77 @@
<para>
<function>xslt_setopt</function> sets the options specified by
<parameter>newmask</parameter> on the given <parameter>processor</parameter>.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>processor</parameter></term>
<listitem>
<para>
The XSLT processor link identifier, created with
<function>xslt_create</function>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>newmask</parameter></term>
<listitem>
<para>
<parameter>newmask</parameter> is a bitmask constructed with the
following constants:
<itemizedlist>
<listitem>
<para>
<constant>XSLT_SABOPT_PARSE_PUBLIC_ENTITIES</constant> - Tell the
processor to parse public entities. By default this has been turned
off.
</para>
</listitem>
<listitem>
<para>
<constant>XSLT_SABOPT_DISABLE_ADDING_META</constant> - Do not add
the meta tag "Content-Type" for HTML output. The default is set
during the compilation of the processor.
</para>
</listitem>
<listitem>
<para>
<constant>XSLT_SABOPT_DISABLE_STRIPPING</constant> - Suppress the
whitespace stripping (on data files only).
</para>
</listitem>
<listitem>
<para>
<constant>XSLT_SABOPT_IGNORE_DOC_NOT_FOUND</constant> - Consider
unresolved documents (the document() function) non-lethal.
</para>
</listitem>
</itemizedlist>
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the number of previous mask is possible, &true; otherwise,
&false; in case of an error.
</para>
<para>
<parameter>newmask</parameter> is a bitmask constructed with the following
constants:
<itemizedlist>
<listitem>
<para>
<constant>XSLT_SABOPT_PARSE_PUBLIC_ENTITIES</constant> - Tell the processor
to parse public entities. By default this has been turned off.
</para>
</listitem>
<listitem>
<para>
<constant>XSLT_SABOPT_DISABLE_ADDING_META</constant> - Do not add the meta
tag "Content-Type" for HTML output. The default is set during the compilation
of the processor.
</para>
</listitem>
<listitem>
<para>
<constant>XSLT_SABOPT_DISABLE_STRIPPING</constant> - Suppress the whitespace
stripping (on data files only).
</para>
</listitem>
<listitem>
<para>
<constant>XSLT_SABOPT_IGNORE_DOC_NOT_FOUND</constant> - Consider unresolved
documents (the document() function) non-lethal.
</para>
</listitem>
</itemizedlist>
</para>
</refsect1>
<refsect1>
<refsect1 role="examples">
&reftitle.examples;
<example>
<title><function>xslt_setopt</function> Example</title>
<programlisting role="php">
<para>
<example>
<title><function>xslt_setopt</function> Example</title>
<programlisting role="php">
<![CDATA[
<?php
@ -68,15 +100,20 @@ xslt_setopt($xh, xslt_getopt($xh) | XSLT_SABOPT_DISABLE_STRIPPING);
?>
]]>
</programlisting>
</example>
</refsect1>
<refsect1>
&reftitle.seealso;
<para>
<function>xslt_getopt</function>.
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>xslt_getopt</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file