mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Rename files
# *no* content change git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@248875 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
10abf34383
commit
f6b830291e
10 changed files with 0 additions and 984 deletions
|
@ -1,66 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<refentry xml:id="function.xsl-xsltprocessor-construct" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>XSLTProcessor::__construct</refname>
|
||||
<refpurpose>Creates a new XSLTProcessor object</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<classsynopsis>
|
||||
<ooclass><classname>XSLTProcessor</classname></ooclass>
|
||||
<constructorsynopsis>
|
||||
<methodname>__construct</methodname>
|
||||
<void/>
|
||||
</constructorsynopsis>
|
||||
</classsynopsis>
|
||||
<para>
|
||||
Creates a new <classname>XSLTProcessor</classname> object.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Creating an <classname>XSLTProcessor</classname></title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$doc = new DOMDocument();
|
||||
$xsl = new XSLTProcessor();
|
||||
|
||||
$doc->load($xsl_filename);
|
||||
$xsl->importStyleSheet($doc);
|
||||
|
||||
$doc->load($xml_filename);
|
||||
echo $xsl->transformToXML($doc);
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
|
@ -1,83 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<refentry xml:id="function.xsl-xsltprocessor-get-parameter" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>XSLTProcessor::getParameter</refname>
|
||||
<refpurpose>Get value of a parameter</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<classsynopsis>
|
||||
<ooclass><classname>XSLTProcessor</classname></ooclass>
|
||||
<methodsynopsis>
|
||||
<type>string</type>
|
||||
<methodname>getParameter</methodname>
|
||||
<methodparam><type>string</type><parameter>namespaceURI</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>localName</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
</classsynopsis>
|
||||
<para>
|
||||
Gets a parameter if previously set by <xref
|
||||
linkend="function.xsl-xsltprocessor-set-parameter" />.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>namespaceURI</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The namespace URI of the XSLT parameter.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>localName</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The local name of the XSLT parameter.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
The value of the parameter or &null; if it's not set.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><xref linkend="function.xsl-xsltprocessor-set-parameter" /></member>
|
||||
<member><xref linkend="function.xsl-xsltprocessor-remove-parameter" /></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
|
@ -1,72 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<refentry xml:id="function.xsl-xsltprocessor-has-exslt-support" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>XSLTProcessor::hasExsltSupport</refname>
|
||||
<refpurpose>Determine if PHP has EXSLT support</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<classsynopsis>
|
||||
<ooclass><classname>XSLTProcessor</classname></ooclass>
|
||||
<methodsynopsis>
|
||||
<type>bool</type>
|
||||
<methodname>hasExsltSupport</methodname>
|
||||
<void/>
|
||||
</methodsynopsis>
|
||||
</classsynopsis>
|
||||
<para>
|
||||
This method determine if PHP was built with the <link
|
||||
xlink:href="&url.exsltlib;">EXSLT library</link>.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Testing EXSLT support</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$proc = new XSLTProcessor;
|
||||
if (!$proc->hasExsltSupport()) {
|
||||
die('EXSLT support not available');
|
||||
}
|
||||
|
||||
// do EXSLT stuff here ..
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
|
@ -1,64 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<refentry xml:id="function.xsl-xsltprocessor-import-stylesheet" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>XSLTProcessor::importStylesheet</refname>
|
||||
<refpurpose>Import stylesheet</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<classsynopsis>
|
||||
<ooclass><classname>XSLTProcessor</classname></ooclass>
|
||||
<methodsynopsis>
|
||||
<type>void</type><methodname>importStylesheet</methodname>
|
||||
<methodparam><type>DOMDocument</type><parameter>stylesheet</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
</classsynopsis>
|
||||
<para>
|
||||
This method import the stylesheet into the
|
||||
<classname>XSLTProcessor</classname> for transformations.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>stylesheet</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The imported style sheet as a <classname>DOMDocument</classname> object.
|
||||
</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
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
|
@ -1,141 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<refentry xml:id="function.xsl-xsltprocessor-register-php-functions" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>XSLTProcessor::registerPHPFunctions</refname>
|
||||
<refpurpose>Enables the ability to use PHP functions as XSLT functions</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<classsynopsis>
|
||||
<ooclass><classname>XSLTProcessor</classname></ooclass>
|
||||
<methodsynopsis>
|
||||
<type>void</type>
|
||||
<methodname>registerPHPFunctions</methodname>
|
||||
<methodparam choice="opt"><type>mixed</type><parameter>restrict</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
</classsynopsis>
|
||||
<para>
|
||||
This method enables the ability to use PHP functions as XSLT functions
|
||||
within XSL stylesheets.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>restrict</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Use this parameter to only allow certain functions to be called from
|
||||
XSLT.
|
||||
</para>
|
||||
<para>
|
||||
This parameter can be either a string (a function name) or an array of
|
||||
functions.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.void;
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Simple PHP Function call from a stylesheet</title>
|
||||
<programlisting role="php"><![CDATA[<?php
|
||||
$xml = <<<EOB
|
||||
<allusers>
|
||||
<user>
|
||||
<uid>bob</uid>
|
||||
</user>
|
||||
<user>
|
||||
<uid>joe</uid>
|
||||
</user>
|
||||
</allusers>
|
||||
EOB;
|
||||
$xsl = <<<EOB
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsl:stylesheet version="1.0"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:php="http://php.net/xsl">
|
||||
<xsl:output method="html" encoding="utf-8" indent="yes"/>
|
||||
<xsl:template match="allusers">
|
||||
<html><body>
|
||||
<h2>Users</h2>
|
||||
<table>
|
||||
<xsl:for-each select="user">
|
||||
<tr><td>
|
||||
<xsl:value-of
|
||||
select="php:function('ucfirst',string(uid))"/>
|
||||
</td></tr>
|
||||
</xsl:for-each>
|
||||
</table>
|
||||
</body></html>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
EOB;
|
||||
$xmldoc = DOMDocument::loadXML($xml);
|
||||
$xsldoc = DOMDocument::loadXML($xsl);
|
||||
|
||||
$proc = new XSLTProcessor();
|
||||
$proc->registerPHPFunctions();
|
||||
$proc->importStyleSheet($xsldoc);
|
||||
echo $proc->transformToXML($xmldoc);
|
||||
?>]]></programlisting>
|
||||
</example>
|
||||
</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>5.1.0</entry>
|
||||
<entry>
|
||||
The <parameter>restrict</parameter> parameter was added.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</informaltable>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
|
@ -1,83 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<refentry xml:id="function.xsl-xsltprocessor-remove-parameter" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>XSLTProcessor::removeParameter</refname>
|
||||
<refpurpose>Remove parameter</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<classsynopsis>
|
||||
<ooclass><classname>XSLTProcessor</classname></ooclass>
|
||||
<methodsynopsis>
|
||||
<type>bool</type>
|
||||
<methodname>removeParameter</methodname>
|
||||
<methodparam><type>string</type><parameter>namespaceURI</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>localName</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
</classsynopsis>
|
||||
<para>
|
||||
Removes a parameter, if set. This will make the processor use the
|
||||
default value for the parameter as specified in the stylesheet.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>namespaceURI</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The namespace URI of the XSLT parameter.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>localName</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The local name of the XSLT parameter.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><xref linkend="function.xsl-xsltprocessor-set-parameter" /></member>
|
||||
<member><xref linkend="function.xsl-xsltprocessor-get-parameter" /></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
|
@ -1,145 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<refentry xml:id="function.xsl-xsltprocessor-set-parameter" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>XSLTProcessor::setParameter</refname>
|
||||
<refpurpose>Set value for a parameter</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<classsynopsis>
|
||||
<ooclass><classname>XSLTProcessor</classname></ooclass>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>setParameter</methodname>
|
||||
<methodparam><type>string</type><parameter>namespace</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>name</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>value</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
</classsynopsis>
|
||||
<classsynopsis>
|
||||
<ooclass><classname>XSLTProcessor</classname></ooclass>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>setParameter</methodname>
|
||||
<methodparam><type>string</type><parameter>namespace</parameter></methodparam>
|
||||
<methodparam><type>array</type><parameter>options</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
</classsynopsis>
|
||||
<para>
|
||||
Sets the value of one or more parameters to be used in subsequent
|
||||
transformations with <classname>XSLTProcessor</classname>. If the
|
||||
parameter doesn't exist in the stylesheet it will be ignored.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>namespace</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The namespace URI of the XSLT parameter.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>name</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The local name of the XSLT parameter.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>value</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The new value of the XSLT parameter.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>options</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
An array of <literal>name => value</literal> pairs. This syntax is
|
||||
available since PHP 5.1.0.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Changing the owner before the transformation</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$collections = array(
|
||||
'Marc Rutkowski' => 'marc',
|
||||
'Olivier Parmentier' => 'olivier'
|
||||
);
|
||||
|
||||
$xsl = new DOMDocument;
|
||||
$xsl->load('collection.xsl');
|
||||
|
||||
// Configure the transformer
|
||||
$proc = new XSLTProcessor;
|
||||
$proc->importStyleSheet($xsl); // attach the xsl rules
|
||||
|
||||
foreach ($collections as $name => $file) {
|
||||
// Load the XML source
|
||||
$xml = new DOMDocument;
|
||||
$xml->load('collection_' . $file . '.xml');
|
||||
|
||||
$proc->setParameter('', 'owner', $name);
|
||||
$proc->transformToURI($xml, 'file:///tmp/' . $file . '.html');
|
||||
}
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><xref linkend="function.xsl-xsltprocessor-get-parameter" /></member>
|
||||
<member><xref linkend="function.xsl-xsltprocessor-remove-parameter" /></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
|
@ -1,109 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<refentry xml:id="function.xsl-xsltprocessor-transform-to-doc" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>XSLTProcessor::transformToDoc</refname>
|
||||
<refpurpose>Transform to a DOMDocument</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<classsynopsis>
|
||||
<ooclass><classname>XSLTProcessor</classname></ooclass>
|
||||
<methodsynopsis>
|
||||
<type>DOMDocument</type>
|
||||
<methodname>transformToDoc</methodname>
|
||||
<methodparam><type>DOMNode</type><parameter>doc</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
</classsynopsis>
|
||||
<para>
|
||||
Transforms the source node to a <classname>DOMDocument</classname> applying
|
||||
the stylesheet given by the <xref
|
||||
linkend="function.xsl-xsltprocessor-import-stylesheet" /> method.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>doc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The node to be transformed.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
The resulting <classname>DOMDocument</classname> or &false; on error.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Transforming to a DOMDocument</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
// Load the XML source
|
||||
$xml = new DOMDocument;
|
||||
$xml->load('collection.xml');
|
||||
|
||||
$xsl = new DOMDocument;
|
||||
$xsl->load('collection.xsl');
|
||||
|
||||
// Configure the transformer
|
||||
$proc = new XSLTProcessor;
|
||||
$proc->importStyleSheet($xsl); // attach the xsl rules
|
||||
|
||||
echo trim($proc->transformToDoc($xml)->firstChild->wholeText);
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Hey! Welcome to Nicolas Eliaszewicz's sweet CD collection!
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><xref linkend="function.xsl-xsltprocessor-transform-to-uri" /></member>
|
||||
<member><xref linkend="function.xsl-xsltprocessor-transform-to-xml" /></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
|
@ -1,110 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<refentry xml:id="function.xsl-xsltprocessor-transform-to-uri" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>XSLTProcessor::transformToURI</refname>
|
||||
<refpurpose>Transform to URI</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<classsynopsis>
|
||||
<ooclass><classname>XSLTProcessor</classname></ooclass>
|
||||
<methodsynopsis>
|
||||
<type>int</type>
|
||||
<methodname>transformToURI</methodname>
|
||||
<methodparam><type>DOMDocument</type><parameter>doc</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>uri</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
</classsynopsis>
|
||||
<para>
|
||||
Transforms the source node to an URI applying the stylesheet given by the
|
||||
<xref linkend="function.xsl-xsltprocessor-import-stylesheet" /> method.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>doc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The transformed document.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>uri</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the number of bytes written or &false; if an error occurred.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Transforming to a HTML file</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
// Load the XML source
|
||||
$xml = new DOMDocument;
|
||||
$xml->load('collection.xml');
|
||||
|
||||
$xsl = new DOMDocument;
|
||||
$xsl->load('collection.xsl');
|
||||
|
||||
// Configure the transformer
|
||||
$proc = new XSLTProcessor;
|
||||
$proc->importStyleSheet($xsl); // attach the xsl rules
|
||||
|
||||
$proc->transformToURI($xml, 'file:///tmp/out.html');
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><xref linkend="function.xsl-xsltprocessor-transform-to-doc" /></member>
|
||||
<member><xref linkend="function.xsl-xsltprocessor-transform-to-xml" /></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
|
@ -1,111 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<refentry xml:id="function.xsl-xsltprocessor-transform-to-xml" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>XSLTProcessor::transformToXML</refname>
|
||||
<refpurpose>Transform to XML</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<classsynopsis>
|
||||
<ooclass><classname>XSLTProcessor</classname></ooclass>
|
||||
<methodsynopsis>
|
||||
<type>string</type>
|
||||
<methodname>transformToXML</methodname>
|
||||
<methodparam><type>DOMDocument</type><parameter>doc</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
</classsynopsis>
|
||||
<para>
|
||||
Transforms the source node to a string applying the stylesheet given by
|
||||
the <xref linkend="function.xsl-xsltprocessor-import-stylesheet" /> method.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>doc</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The transformed document.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
The result of the transformation as a string or &false; on error.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Transforming to a string</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
// Load the XML source
|
||||
$xml = new DOMDocument;
|
||||
$xml->load('collection.xml');
|
||||
|
||||
$xsl = new DOMDocument;
|
||||
$xsl->load('collection.xsl');
|
||||
|
||||
// Configure the transformer
|
||||
$proc = new XSLTProcessor;
|
||||
$proc->importStyleSheet($xsl); // attach the xsl rules
|
||||
|
||||
echo $proc->transformToXML($xml);
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Hey! Welcome to Nicolas Eliaszewicz's sweet CD collection!
|
||||
|
||||
<h1>Fight for your mind</h1><h2>by Ben Harper - 1995</h2><hr>
|
||||
<h1>Electric Ladyland</h1><h2>by Jimi Hendrix - 1997</h2><hr>
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><xref linkend="function.xsl-xsltprocessor-transform-to-doc" /></member>
|
||||
<member><xref linkend="function.xsl-xsltprocessor-transform-to-uri" /></member>
|
||||
</simplelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
sgml-omittag:t
|
||||
sgml-shorttag:t
|
||||
sgml-minimize-attributes:nil
|
||||
sgml-always-quote-attributes:t
|
||||
sgml-indent-step:1
|
||||
sgml-indent-data:t
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
Loading…
Reference in a new issue