mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-19 02:18:56 +00:00

- All id attributes are now xml:id - Add docbook namespace to all root elements - Replace <ulink /> with <link xlink:href /> - Minor markup fixes here and there git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@238160 c90b9560-bf6c-de11-be94-00142212c4b1
160 lines
4.8 KiB
XML
160 lines
4.8 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.12 $ -->
|
|
<!-- Purpose: xml -->
|
|
<!-- Membership: bundled, external -->
|
|
|
|
<reference xml:id="ref.xsl" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<title>XSL functions</title>
|
|
<titleabbrev>XSL</titleabbrev>
|
|
|
|
<partintro>
|
|
|
|
<section xml:id="xsl.intro">
|
|
&reftitle.intro;
|
|
<para>
|
|
The XSL extension implements the XSL standard, performing <link
|
|
xlink:href="&url.xslt;">XSLT transformations</link> using the <link
|
|
xlink:href="&url.libxslt;">libxslt library</link>
|
|
</para>
|
|
</section>
|
|
|
|
<section xml:id="xsl.requirements">
|
|
&reftitle.required;
|
|
<para>
|
|
This extension uses <productname>libxslt</productname> which can be
|
|
found at <link xlink:href="&url.libxslt;">&url.libxslt;</link>. libxslt
|
|
version 1.1.0 or greater is required.
|
|
</para>
|
|
</section>
|
|
|
|
&reference.xsl.configure;
|
|
|
|
<section xml:id='xsl.classes'>
|
|
&reftitle.classes;
|
|
<para>
|
|
</para>
|
|
|
|
<section xml:id='xsl.class.xsltprocessor'>
|
|
<title><classname>XSLTProcessor</classname></title>
|
|
<para>
|
|
</para>
|
|
<section xml:id='xsl.class.xsltprocessor.constructor'>
|
|
&reftitle.constructor;
|
|
<itemizedlist>
|
|
<listitem>
|
|
<para><xref linkend='function.xsl-xsltprocessor-construct' /> - construct a new XSLTProcessor object</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
</section>
|
|
<section xml:id='xsl.class.xsltprocessor.methods'>
|
|
&reftitle.methods;
|
|
<itemizedlist>
|
|
<listitem>
|
|
<para><xref linkend="function.xsl-xsltprocessor-get-parameter" /> - Get value of a parameter</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para><xref linkend="function.xsl-xsltprocessor-has-exslt-support" /> - Determine if PHP has EXSLT support</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para><xref linkend="function.xsl-xsltprocessor-import-stylesheet" /> - Import stylesheet</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para><xref linkend="function.xsl-xsltprocessor-register-php-functions" /> - Enables the ability to use PHP functions as XSLT functions</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para><xref linkend="function.xsl-xsltprocessor-remove-parameter" /> - Remove parameter</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para><xref linkend="function.xsl-xsltprocessor-set-parameter" /> - Set value for a parameter</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para><xref linkend="function.xsl-xsltprocessor-transform-to-doc" /> - Transform to DOMDocument</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para><xref linkend="function.xsl-xsltprocessor-transform-to-uri" /> - Transform to URI</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para><xref linkend="function.xsl-xsltprocessor-transform-to-xml" /> - Transform to XML</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
</section>
|
|
</section>
|
|
</section>
|
|
|
|
<section xml:id="xsl.examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
Many examples in this reference require both an XML and an XSL file.
|
|
We will use <filename>collection.xml</filename> and
|
|
<filename>collection.xsl</filename> that contains the following:
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title>collection.xml</title>
|
|
<programlisting role="xml">
|
|
<![CDATA[
|
|
<collection>
|
|
<cd>
|
|
<title>Fight for your mind</title>
|
|
<artist>Ben Harper</artist>
|
|
<year>1995</year>
|
|
</cd>
|
|
<cd>
|
|
<title>Electric Ladyland</title>
|
|
<artist>Jimi Hendrix</artist>
|
|
<year>1997</year>
|
|
</cd>
|
|
</collection>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
<example>
|
|
<title>collection.xsl</title>
|
|
<programlisting role="xml">
|
|
<![CDATA[
|
|
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
|
<xsl:param name="owner" select="'Nicolas Eliaszewicz'"/>
|
|
<xsl:output method="html" encoding="iso-8859-1" indent="no"/>
|
|
<xsl:template match="collection">
|
|
Hey! Welcome to <xsl:value-of select="$owner"/>'s sweet CD collection!
|
|
<xsl:apply-templates/>
|
|
</xsl:template>
|
|
<xsl:template match="cd">
|
|
<h1><xsl:value-of select="title"/></h1>
|
|
<h2>by <xsl:value-of select="artist"/> - <xsl:value-of select="year"/></h2>
|
|
<hr />
|
|
</xsl:template>
|
|
</xsl:stylesheet>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</section>
|
|
|
|
&reference.xsl.constants;
|
|
|
|
</partintro>
|
|
|
|
&reference.xsl.functions;
|
|
|
|
</reference>
|
|
<!-- 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
|
|
-->
|