tidy docs revision part 1

fix return/parameter types
add some examples
rename some files, tidy_node to tidyNode


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@172700 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Nuno Lopes 2004-11-15 15:54:28 +00:00
parent 4f5e0deb1d
commit 1b39e2c563
26 changed files with 188 additions and 194 deletions

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.1 $ -->
<!-- $Revision: 1.2 $ -->
<refentry id="function.ob-tidyhandler">
<refnamediv>
<refname>ob_tidyhandler</refname>
@ -30,9 +30,7 @@ echo '<p>test</i>';
?>
]]>
</programlisting>
<para>
The above example will output:
</para>
&example.outputs;
<screen>
<![CDATA[
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<refentry id="function.tidy-access-count">
<refnamediv>
<refname>tidy_access_count</refname>
@ -11,7 +11,7 @@
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>tidy_access_count</methodname>
<methodparam><type>resource</type><parameter>tidy</parameter></methodparam>
<methodparam><type>tidy</type><parameter>object</parameter></methodparam>
</methodsynopsis>
<para>
<function>tidy_access_count</function> returns the number of

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<refentry id="function.tidy-clean-repair">
<refnamediv>
<refname>tidy_clean_repair</refname>
@ -12,7 +12,7 @@
<para>Procedural style:</para>
<methodsynopsis>
<type>bool</type><methodname>tidy_clean_repair</methodname>
<methodparam><type>resource</type><parameter>tidy</parameter></methodparam>
<methodparam><type>tidy</type><parameter>object</parameter></methodparam>
</methodsynopsis>
<para>Object oriented style:</para>
<methodsynopsis>
@ -20,8 +20,8 @@
<void />
</methodsynopsis>
<para>
This function cleans and repairs the given <parameter>tidy</parameter>
resource.
This function cleans and repairs the given tidy
<parameter>object</parameter>.
</para>
<para>
<example>
@ -38,9 +38,7 @@ echo $tidy;
?>
]]>
</programlisting>
<para>
The above example will output:
</para>
&example.outputs;
<screen>
<![CDATA[
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<refentry id="function.tidy-config-count">
<refnamediv>
<refname>tidy_config_count</refname>
@ -11,11 +11,12 @@
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>tidy_config_count</methodname>
<methodparam><type>resource</type><parameter>tidy</parameter></methodparam>
<methodparam><type>tidy</type><parameter>object</parameter></methodparam>
</methodsynopsis>
<para>
<function>tidy_config_count</function> returns the number of errors
encountered in the given configuration.
encountered in the configuration of the specified tidy
<parameter>object</parameter>.
</para>
<para>
<example>

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.3 $ -->
<!-- $Revision: 1.4 $ -->
<refentry id="function.tidy-construct">
<refnamediv>
<refname>tidy::__construct</refname>
@ -59,9 +59,7 @@ if ($tidy->errorBuffer) {
?>
]]>
</programlisting>
<para>
The above example will output:
</para>
&example.outputs;
<screen>
<![CDATA[
The following errors were detected:

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.6 $ -->
<!-- $Revision: 1.7 $ -->
<refentry id="function.tidy-diagnose">
<refnamediv>
<refname>tidy_diagnose</refname>
@ -12,7 +12,7 @@
<para>Procedural style:</para>
<methodsynopsis>
<type>bool</type><methodname>tidy_diagnose</methodname>
<methodparam><type>resource</type><parameter>tidy</parameter></methodparam>
<methodparam><type>tidy</type><parameter>object</parameter></methodparam>
</methodsynopsis>
<para>Object oriented style:</para>
<methodsynopsis>
@ -21,11 +21,56 @@
</methodsynopsis>
<para>
<function>tidy_diagnose</function> runs diagnostic tests on the given
resource.
tidy <parameter>object</parameter>, adding some more information about
the document in the error buffer.
</para>
<para>
&return.success;
</para>
<para>
<example>
<title><function>tidy_diagnose</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$html = <<< HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<p>paragraph</p>
HTML;
$tidy = tidy_parse_string($html);
$tidy->CleanRepair();
// note the difference between the two outputs
echo tidy_get_error_buffer($tidy) . "\n";
$tidy->diagnose();
echo tidy_get_error_buffer($tidy);
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
line 5 column 1 - Warning: <p> isn't allowed in <head> elements
line 5 column 1 - Warning: inserting missing 'title' element
line 5 column 1 - Warning: <p> isn't allowed in <head> elements
line 5 column 1 - Warning: inserting missing 'title' element
Info: Doctype given is "-//W3C//DTD XHTML 1.0 Strict//EN"
Info: Document content looks like XHTML 1.0 Strict
2 warnings, 0 errors were found!
]]>
</screen>
</example>
</para>
<para>
See also <function>tidy_get_error_buffer</function>.
</para>
</refsect1>
</refentry>

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<refentry id="function.tidy-error-count">
<refnamediv>
<refname>tidy_error_count</refname>
@ -11,7 +11,7 @@
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>tidy_error_count</methodname>
<methodparam><type>resource</type><parameter>tidy</parameter></methodparam>
<methodparam><type>tidy</type><parameter>object</parameter></methodparam>
</methodsynopsis>
<para>
<function>tidy_error_count</function> returns the number of Tidy errors

View file

@ -1,10 +1,10 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.7 $ -->
<!-- $Revision: 1.8 $ -->
<refentry id="function.tidy-get-body">
<refnamediv>
<refname>tidy_get_body</refname>
<refpurpose>
Returns a TidyNode Object starting from the &lt;body&gt; tag of the tidy parse tree
Returns a tidyNode Object starting from the &lt;body&gt; tag of the tidy parse tree
</refpurpose>
</refnamediv>
<refsect1>
@ -12,7 +12,7 @@
<para>Procedural style:</para>
<methodsynopsis>
<type>tidyNode</type><methodname>tidy_get_body</methodname>
<methodparam><type>resource</type><parameter>tidy</parameter></methodparam>
<methodparam><type>tidy</type><parameter>object</parameter></methodparam>
</methodsynopsis>
<para>Object oriented style:</para>
<methodsynopsis>
@ -20,7 +20,7 @@
<void />
</methodsynopsis>
<para>
This function returns a TidyNode object starting from the &lt;body&gt;
This function returns a tidyNode object starting from the &lt;body&gt;
tag of the tidy parse tree.
</para>
<para>
@ -46,9 +46,7 @@ echo $body->value;
?>
]]>
</programlisting>
<para>
The above example will output:
</para>
&example.outputs;
<screen>
<![CDATA[
<body>

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.5 $ -->
<!-- $Revision: 1.6 $ -->
<refentry id="function.tidy-get-config">
<refnamediv>
<refname>tidy_get_config</refname>
@ -12,7 +12,7 @@
<para>Procedural style:</para>
<methodsynopsis>
<type>array</type><methodname>tidy_get_config</methodname>
<methodparam><type>resource</type><parameter>tidy</parameter></methodparam>
<methodparam><type>tidy</type><parameter>object</parameter></methodparam>
</methodsynopsis>
<para>Object oriented style:</para>
<methodsynopsis>
@ -21,10 +21,12 @@
</methodsynopsis>
<para>
<function>tidy_get_config</function> returns an array with the
configuration options in use by the given resource.
configuration options in use by the given tidy
<parameter>object</parameter>.
</para>
<para>
For a explanation about each option, visit <ulink url="&url.tidy.conf;">&url.tidy.conf;</ulink>.
For an explanation about each option, visit <ulink
url="&url.tidy.conf;">&url.tidy.conf;</ulink>.
</para>
<para>
<example>
@ -43,15 +45,13 @@ print_r(tidy_get_config($tidy));
?>
]]>
</programlisting>
<para>
The above example will output:
</para>
&example.outputs;
<screen>
<![CDATA[
Array
(
[indent-spaces] => 2
[wrap] => 68
[wrap] => 200
[tab-size] => 8
[char-encoding] => 1
[input-encoding] => 3
@ -131,6 +131,7 @@ Array
[accessibility-check] => 0
[vertical-space] =>
[punctuation-wrap] =>
[merge-divs] => 1
)
]]>
</screen>

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.6 $ -->
<!-- $Revision: 1.7 $ -->
<refentry id="function.tidy-get-error-buffer">
<refnamediv>
<refname>tidy_get_error_buffer</refname>
@ -12,7 +12,7 @@
<para>Procedural style:</para>
<methodsynopsis>
<type>string</type><methodname>tidy_get_error_buffer</methodname>
<methodparam><type>resource</type><parameter>tidy</parameter></methodparam>
<methodparam><type>tidy</type><parameter>object</parameter></methodparam>
</methodsynopsis>
<para>Object oriented style (property):</para>
<classsynopsis>
@ -39,9 +39,7 @@ echo $tidy->errorBuffer;
?>
]]>
</programlisting>
<para>
The above example will output:
</para>
&example.outputs;
<screen>
<![CDATA[
line 1 column 1 - Warning: missing <!DOCTYPE> declaration

View file

@ -1,10 +1,10 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.7 $ -->
<!-- $Revision: 1.8 $ -->
<refentry id="function.tidy-get-head">
<refnamediv>
<refname>tidy_get_head</refname>
<refpurpose>
Returns a TidyNode Object starting from the &lt;head&gt; tag of the tidy parse tree
Returns a tidyNode Object starting from the &lt;head&gt; tag of the tidy parse tree
</refpurpose>
</refnamediv>
<refsect1>
@ -12,7 +12,7 @@
<para>Procedural style:</para>
<methodsynopsis>
<type>tidyNode</type><methodname>tidy_get_head</methodname>
<methodparam><type>resource</type><parameter>tidy</parameter></methodparam>
<methodparam><type>tidy</type><parameter>object</parameter></methodparam>
</methodsynopsis>
<para>Object oriented style:</para>
<methodsynopsis>
@ -20,7 +20,7 @@
<void />
</methodsynopsis>
<para>
This function returns a TidyNode object starting from the &lt;head&gt;
This function returns a tidyNode object starting from the &lt;head&gt;
tag of the tidy parse tree.
</para>
<para>
@ -46,9 +46,7 @@ echo $head->value;
?>
]]>
</programlisting>
<para>
The above example will output:
</para>
&example.outputs;
<screen>
<![CDATA[
<head>

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.5 $ -->
<!-- $Revision: 1.6 $ -->
<refentry id="function.tidy-get-html-ver">
<refnamediv>
<refname>tidy_get_html_ver</refname>
@ -12,7 +12,7 @@
<para>Procedural style:</para>
<methodsynopsis>
<type>int</type><methodname>tidy_get_html_ver</methodname>
<methodparam><type>resource</type><parameter>tidy</parameter></methodparam>
<methodparam><type>tidy</type><parameter>object</parameter></methodparam>
</methodsynopsis>
<para>Object oriented style:</para>
<methodsynopsis>
@ -21,7 +21,7 @@
</methodsynopsis>
<para>
<function>tidy_get_html_ver</function> returns the detected HTML version
for the specified <parameter>tidy</parameter> resource.
for the specified tidy <parameter>object</parameter>.
</para>
<warning>
<para>

View file

@ -1,10 +1,10 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.8 $ -->
<!-- $Revision: 1.9 $ -->
<refentry id="function.tidy-get-html">
<refnamediv>
<refname>tidy_get_html</refname>
<refpurpose>
Returns a TidyNode Object starting from the &lt;html&gt; tag of the tidy parse tree
Returns a tidyNode Object starting from the &lt;html&gt; tag of the tidy parse tree
</refpurpose>
</refnamediv>
<refsect1>
@ -12,7 +12,7 @@
<para>Procedural style:</para>
<methodsynopsis>
<type>tidyNode</type><methodname>tidy_get_html</methodname>
<methodparam><type>resource</type><parameter>tidy</parameter></methodparam>
<methodparam><type>tidy</type><parameter>object</parameter></methodparam>
</methodsynopsis>
<para>Object oriented style:</para>
<methodsynopsis>
@ -20,7 +20,7 @@
<void />
</methodsynopsis>
<para>
This function returns a TidyNode object starting from the &lt;html&gt;
This function returns a tidyNode object starting from the &lt;html&gt;
tag of the tidy parse tree.
</para>
<para>
@ -46,9 +46,7 @@ echo $html->value;
?>
]]>
</programlisting>
<para>
The above example will output:
</para>
&example.outputs;
<screen>
<![CDATA[
<html>

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<refentry id="function.tidy-get-output">
<refnamediv>
<refname>tidy_get_output</refname>
@ -11,7 +11,7 @@
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>tidy_get_output</methodname>
<methodparam><type>resource</type><parameter>tidy</parameter></methodparam>
<methodparam><type>tidy</type><parameter>object</parameter></methodparam>
</methodsynopsis>
<para>
<function>tidy_get_output</function> returns a string with the repaired
@ -33,9 +33,7 @@ echo tidy_get_output($tidy);
?>
]]>
</programlisting>
<para>
The above example will output:
</para>
&example.outputs;
<screen>
<![CDATA[
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">

View file

@ -1,11 +1,10 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.5 $ -->
<!-- Generated by xml_proto.php v2.0. Found in /scripts directory of phpdoc. -->
<!-- $Revision: 1.6 $ -->
<refentry id="function.tidy-get-root">
<refnamediv>
<refname>tidy_get_root</refname>
<refpurpose>
Returns a TidyNode Object representing the root of the tidy parse tree
Returns a tidyNode object representing the root of the tidy parse tree
</refpurpose>
</refnamediv>
<refsect1>
@ -13,17 +12,65 @@
<para>Procedural style:</para>
<methodsynopsis>
<type>tidyNode</type><methodname>tidy_get_root</methodname>
<methodparam><type>resource</type><parameter>tidy</parameter></methodparam>
<methodparam><type>tidy</type><parameter>object</parameter></methodparam>
</methodsynopsis>
<para>Object oriented style:</para>
<methodsynopsis>
<type>tidyNode</type><methodname>tidy->root</methodname>
<void />
</methodsynopsis>
<para>
Returns a tidyNode object representing the root of the tidy parse tree.
</para>
<para>
<example>
<title>dump nodes</title>
<programlisting role="php">
<![CDATA[
<?php
&warn.undocumented.func;
&note.tidy.ze2;
$html = <<< HTML
<html><body>
<p>paragraph</p>
<br/>
</body></html>
HTML;
$tidy = tidy_parse_string($html);
dump_nodes($tidy->root(), 1);
function dump_nodes($node, $indent) {
if($node->hasChildren()) {
foreach($node->child as $child) {
echo str_repeat('.', $indent*2) . ($child->name ? $child->name : '"'.$child->value.'"'). "\n";
dump_nodes($child, $indent+1);
}
}
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
..html
....head
......title
....body
......p
........"paragraph"
......br
]]>
</screen>
</example>
</para>
&note.tidy.ze2;
</refsect1>
</refentry>

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.6 $ -->
<!-- $Revision: 1.7 $ -->
<refentry id="function.tidy-get-status">
<refnamediv>
<refname>tidy_get_status</refname>
@ -12,7 +12,7 @@
<para>Procedural style:</para>
<methodsynopsis>
<type>int</type><methodname>tidy_get_status</methodname>
<methodparam><type>resource</type><parameter>tidy</parameter></methodparam>
<methodparam><type>tidy</type><parameter>object</parameter></methodparam>
</methodsynopsis>
<para>Object oriented style:</para>
<methodsynopsis>
@ -21,7 +21,7 @@
</methodsynopsis>
<para>
<function>tidy_get_status</function> returns the status for the specified
<parameter>tidy</parameter> resource. It returns 0 if no error/warning
tidy <parameter>object</parameter>. It returns 0 if no error/warning
was raised, 1 for warnings or accessibility errors, or 2 for errors.
</para>
<para>

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<refentry id="function.tidy-getopt">
<refnamediv>
<refname>tidy_getopt</refname>
@ -12,7 +12,7 @@
<para>Procedural style:</para>
<methodsynopsis>
<type>mixed</type><methodname>tidy_getopt</methodname>
<methodparam><type>resource</type><parameter>tidy</parameter></methodparam>
<methodparam><type>tidy</type><parameter>object</parameter></methodparam>
<methodparam><type>string</type><parameter>option</parameter></methodparam>
</methodsynopsis>
<para>Object oriented style:</para>
@ -22,8 +22,8 @@
</methodsynopsis>
<para>
<function>tidy_getopt</function> returns the value of the specified
<parameter>option</parameter> for the specified
<parameter>tidy</parameter> document. The return type depends on the type
<parameter>option</parameter> for the specified tidy
<parameter>object</parameter>. The return type depends on the type
of the specified <parameter>option</parameter>. You will find a list with
each configuration option and their types at: <ulink
url="&url.tidy.conf;">&url.tidy.conf;</ulink>.
@ -57,9 +57,7 @@ var_dump($tidy->getOpt('alt-text')); //string
?>
]]>
</programlisting>
<para>
The above example will output:
</para>
&example.outputs;
<screen>
<![CDATA[
int(3)

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.6 $ -->
<!-- $Revision: 1.7 $ -->
<refentry id="function.tidy-is-xhtml">
<refnamediv>
<refname>tidy_is_xhtml</refname>
@ -12,7 +12,7 @@
<para>Procedural style:</para>
<methodsynopsis>
<type>bool</type><methodname>tidy_is_xhtml</methodname>
<methodparam><type>resource</type><parameter>tidy</parameter></methodparam>
<methodparam><type>tidy</type><parameter>object</parameter></methodparam>
</methodsynopsis>
<para>Object oriented style:</para>
<methodsynopsis>
@ -20,8 +20,8 @@
<void />
</methodsynopsis>
<para>
This function returns &true; if the specified <parameter>tidy</parameter>
object is a XHTML document, or &false; otherwise.
This function returns &true; if the specified tidy
<parameter>object</parameter> is a XHTML document, or &false; otherwise.
</para>
<warning>
<para>

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<refentry id="function.tidy-is-xml">
<refnamediv>
<refname>tidy_is_xml</refname>
@ -12,7 +12,7 @@
<para>Procedural style:</para>
<methodsynopsis>
<type>bool</type><methodname>tidy_is_xml</methodname>
<methodparam><type>resource</type><parameter>tidy</parameter></methodparam>
<methodparam><type>tidy</type><parameter>object</parameter></methodparam>
</methodsynopsis>
<para>Object oriented style:</para>
<methodsynopsis>
@ -20,8 +20,9 @@
<void />
</methodsynopsis>
<para>
This function returns &true; if the specified <parameter>tidy</parameter>
object is a generic XML document (non HTML/XHTML), or &false; otherwise.
This function returns &true; if the specified tidy
<parameter>object</parameter> is a generic XML document (non HTML/XHTML),
or &false; otherwise.
</para>
<warning>
<para>

View file

@ -1,41 +0,0 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.tidy-node-attributes">
<refnamediv>
<refname>tidy_node->attributes</refname>
<refpurpose>
Returns an array of attribute objects for node
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>tidy_node->attributes</methodname>
<void/>
</methodsynopsis>
&warn.undocumented.func;
</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
-->

View file

@ -1,41 +0,0 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.2 $ -->
<refentry id="function.tidy-node-tidy-node">
<refnamediv>
<refname>tidy_node->tidy_node</refname>
<refpurpose>
Constructor
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>void</type><methodname>tidy_node->tidy_node</methodname>
<void/>
</methodsynopsis>
&warn.undocumented.func;
</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
-->

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.6 $ -->
<!-- $Revision: 1.7 $ -->
<refentry id="function.tidy-parse-file">
<refnamediv>
<refname>tidy_parse_file</refname>
@ -11,7 +11,7 @@
<title>Description</title>
<para>Procedural style:</para>
<methodsynopsis>
<type>resource</type><methodname>tidy_parse_file</methodname>
<type>tidy</type><methodname>tidy_parse_file</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>config</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>encoding</parameter></methodparam>

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.6 $ -->
<!-- $Revision: 1.7 $ -->
<refentry id="function.tidy-parse-string">
<refnamediv>
<refname>tidy_parse_string</refname>
@ -11,7 +11,7 @@
<title>Description</title>
<para>Procedural style:</para>
<methodsynopsis>
<type>resource</type><methodname>tidy_parse_string</methodname>
<type>tidy</type><methodname>tidy_parse_string</methodname>
<methodparam><type>string</type><parameter>input</parameter></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>config</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>encoding</parameter></methodparam>

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.3 $ -->
<!-- $Revision: 1.4 $ -->
<refentry id="function.tidy-warning-count">
<refnamediv>
<refname>tidy_warning_count</refname>
@ -11,7 +11,7 @@
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>tidy_warning_count</methodname>
<methodparam><type>resource</type><parameter>tidy</parameter></methodparam>
<methodparam><type>tidy</type><parameter>object</parameter></methodparam>
</methodsynopsis>
<para>
<function>tidy_warning_count</function> returns the number of Tidy warnings

View file

@ -1,8 +1,8 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.3 $ -->
<refentry id="function.tidy-node-isAsp">
<!-- $Revision: 1.1 $ -->
<refentry id="function.tidyNode-isAsp">
<refnamediv>
<refname>tidy_node->isAsp</refname>
<refname>tidyNode->isAsp</refname>
<refpurpose>
Returns true if this node is ASP
</refpurpose>
@ -10,12 +10,13 @@
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>tidy_node->isAsp</methodname>
<type>bool</type><methodname>tidyNode->isAsp</methodname>
<void/>
</methodsynopsis>
&warn.undocumented.func;
<para>
This functions returns &true; if the current node is ASP, or &false;
otherwise.
</para>
<note>
<para>
This function was named <function>tidy_node->is_asp</function> in

View file

@ -1,8 +1,8 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.4 $ -->
<refentry id="function.tidy-node-isPhp">
<!-- $Revision: 1.1 $ -->
<refentry id="function.tidyNode-isPhp">
<refnamediv>
<refname>tidy_node->isPhp</refname>
<refname>tidyNode->isPhp</refname>
<refpurpose>
Returns true if this node is PHP
</refpurpose>
@ -10,7 +10,7 @@
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>tidy_node->isPhp</methodname>
<type>bool</type><methodname>tidyNode->isPhp</methodname>
<void/>
</methodsynopsis>
<para>
@ -46,7 +46,7 @@ get_php($tidy->html());
function get_php($node) {
// check if the current node is PHP code
if($node->isPHP()) {
if($node->isPhp()) {
echo "\n\n# PHP node #" . ++$GLOBALS['num'] . "\n";
echo $node->value;
}
@ -62,9 +62,7 @@ function get_php($node) {
?>
]]>
</programlisting>
<para>
The above example will output:
</para>
&example.outputs;
<screen>
<![CDATA[
# PHP node #1