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

Document all functions, parameters Switch to the new documentation structure git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@175768 c90b9560-bf6c-de11-be94-00142212c4b1
111 lines
2.7 KiB
XML
111 lines
2.7 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.5 $ -->
|
|
<refentry id="function.xsl-xsltprocessor-transform-to-xml">
|
|
<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
|
|
-->
|