Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update transformToDoc description #2810

Merged
merged 2 commits into from
Sep 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions reference/xsl/xsltprocessor/transformtodoc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
<refentry xml:id="xsltprocessor.transformtodoc" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>XSLTProcessor::transformToDoc</refname>
<refpurpose>Transform to a DOMDocument</refpurpose>
<refpurpose>Transform to a document</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis role="XSLTProcessor">
<modifier>public</modifier> <type class="union"><type>DOMDocument</type><type>false</type></type><methodname>XSLTProcessor::transformToDoc</methodname>
<modifier>public</modifier> <type class="union"><type>object</type><type>false</type></type><methodname>XSLTProcessor::transformToDoc</methodname>
<methodparam><type>object</type><parameter>document</parameter></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>returnClass</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
Transforms the source node to a <classname>DOMDocument</classname> applying
Transforms the source node to a document (e.g. <classname>DOMDocument</classname>) applying
the stylesheet given by the
<function>XSLTProcessor::importStylesheet</function> method.
</para>
Expand All @@ -26,8 +26,19 @@
<term><parameter>document</parameter></term>
<listitem>
<para>
The <classname>DOMDocument</classname> or <classname>SimpleXMLElement</classname> object to
be transformed.
The <classname>DOMDocument</classname> or <classname>SimpleXMLElement</classname> or libxml-compatible
object to be transformed.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>returnClass</parameter></term>
<listitem>
<para>
This optional parameter may be used so that
<methodname>XSLTProcessor::transformToDoc</methodname>
will return an object of the specified class.
That class should either extend or be the same class as <parameter>document</parameter>'s class.
</para>
</listitem>
</varlistentry>
Expand All @@ -37,7 +48,7 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
The resulting <classname>DOMDocument</classname> or &false; on error.
The resulting document or &false; on error.
</para>
</refsect1>
<refsect1 role="examples">
Expand Down