some more tidy documentation

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@151447 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Nuno Lopes 2004-02-15 17:21:04 +00:00
parent 1e04b68ced
commit fa216f30ce
5 changed files with 101 additions and 18 deletions

View file

@ -263,5 +263,5 @@ are <emphasis>case-sensitive</emphasis></simpara></note>'>
Tidy 1.0. It became obsolete in Tidy 2.0 and thus has been removed.</simpara></note>'>
<!ENTITY note.tidy.2only '<note><simpara>The optional parameters
<literal>config_options</literal> and <literal>encoding</literal> were
<literal>config</literal> and <literal>encoding</literal> were
added in Tidy 2.0.</simpara></note>'>

View file

@ -1,6 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.2 $ -->
<!-- Generated by xml_proto.php v2.0. Found in /scripts directory of phpdoc. -->
<!-- $Revision: 1.3 $ -->
<refentry id="function.tidy-diagnose">
<refnamediv>
<refname>tidy_diagnose</refname>
@ -12,11 +11,12 @@
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>tidy_diagnose</methodname>
<void/>
<methodparam><type>resource</type><parameter>tidy</parameter></methodparam>
</methodsynopsis>
&warn.undocumented.func;
<para>
<function>tidy_diagnose</function> runs diagnostic tests on the given
resource.
</para>
</refsect1>
</refentry>

View file

@ -1,6 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.1 $ -->
<!-- Generated by xml_proto.php v2.0. Found in /scripts directory of phpdoc. -->
<!-- $Revision: 1.2 $ -->
<refentry id="function.tidy-parse-string">
<refnamediv>
<refname>tidy_parse_string</refname>
@ -14,9 +13,70 @@
<type>bool</type><methodname>tidy_parse_string</methodname>
<methodparam><type>string</type><parameter>input</parameter></methodparam>
</methodsynopsis>
<para>
<function>tidy_parse_string</function> parses a document stored in a
string.
</para>
<para>
<example>
<title><function>tidy_parse_string</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
ob_start();
?>
&warn.undocumented.func;
<html>
<head>
<title>test</title>
</head>
<body>
<p>error<br>another line</i>
</body>
</html>
<?php
$buffer = ob_get_clean();
$config = array('indent' => TRUE,
'output-xhtml' => TRUE,
'wrap', 200);
$tidy = tidy_repair_string($buffer, $config, 'UTF8');
echo $tidy;
?>
]]>
</programlisting>
<para>
The above example will output:
</para>
<screen>
<![CDATA[
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
test
</title>
</head>
<body>
<p>
error<br />
another line
</p>
</body>
</html>
]]>
</screen>
</example>
</para>
<para>
See also <function>tidy_parse_file</function>,
<function>tidy_repair_file</function> and
<function>tidy_repair_string</function>.
</para>
</refsect1>
</refentry>

View file

@ -1,11 +1,10 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.2 $ -->
<!-- Generated by xml_proto.php v2.0. Found in /scripts directory of phpdoc. -->
<!-- $Revision: 1.3 $ -->
<refentry id="function.tidy-repair-file">
<refnamediv>
<refname>tidy_repair_file</refname>
<refpurpose>
Repair a file using an optionally provided configuration file
Repair a file and return it as a string
</refpurpose>
</refnamediv>
<refsect1>
@ -13,12 +12,36 @@
<methodsynopsis>
<type>bool</type><methodname>tidy_repair_file</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>config_file</parameter></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>config</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>encoding</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>use_include_path</parameter></methodparam>
</methodsynopsis>
<para>
This function repairs the given file and returns it as a string.
</para>
<para>
<example>
<title><function>tidy_repair_file</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$file = 'file.html';
&warn.undocumented.func;
$repaired = tidy_repair_file($file);
rename($file, $file . '.bak');
file_put_contents($file, $repaired);
?>
]]>
</programlisting>
</example>
</para>
&note.tidy.2only;
<para>
See also <function>tidy_parse_file</function>,
<function>tidy_parse_string</function> and
<function>tidy_repair_string</function>.
</para>
</refsect1>
</refentry>

View file

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.3 $ -->
<!-- $Revision: 1.4 $ -->
<refentry id="function.tidy-repair-string">
<refnamediv>
<refname>tidy_repair_string</refname>
@ -12,7 +12,7 @@
<methodsynopsis>
<type>bool</type><methodname>tidy_repair_string</methodname>
<methodparam><type>string</type><parameter>data</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>config_file</parameter></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>config</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter>encoding</parameter></methodparam>
</methodsynopsis>
<para>
@ -63,12 +63,12 @@ echo $tidy;
</screen>
</example>
</para>
&note.tidy.2only;
<para>
See also <function>tidy_parse_file</function>,
<function>tidy_parse_string</function> and
<function>tidy_repair_file</function>.
</para>
&note.tidy.2only;
</refsect1>
</refentry>