mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
update with tidy class
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@279344 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
854eefe778
commit
a8ac58b13e
23 changed files with 8 additions and 2333 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<refentry xml:id="function.ob-tidyhandler" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>ob_tidyhandler</refname>
|
||||
|
@ -13,8 +13,7 @@
|
|||
<methodparam choice="opt"><type>int</type><parameter>mode</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>ob_tidyhandler</function> is intended to be used as a
|
||||
callback function for <function>ob_start</function> to repair the buffer.
|
||||
Callback function for <function>ob_start</function> to repair the buffer.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
|
|
|
@ -1,112 +0,0 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<refentry xml:id="function.tidy-clean-repair" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>tidy_clean_repair</refname>
|
||||
<refpurpose>Execute configured cleanup and repair operations on parsed markup</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>Procedural style:</para>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>tidy_clean_repair</methodname>
|
||||
<methodparam><type>tidy</type><parameter>object</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>Object oriented style:</para>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>tidy->cleanRepair</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This function cleans and repairs the given tidy
|
||||
<parameter>object</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>object</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
&tidy.object;
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>tidy_clean_repair</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$html = '<p>test</I>';
|
||||
|
||||
$tidy = tidy_parse_string($html);
|
||||
tidy_clean_repair($tidy);
|
||||
|
||||
echo $tidy;
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
</head>
|
||||
<body>
|
||||
<p>test</p>
|
||||
</body>
|
||||
</html>
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><function>tidy_repair_file</function></member>
|
||||
<member><function>tidy_repair_string</function></member>
|
||||
</simplelist>
|
||||
</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
|
||||
-->
|
|
@ -1,162 +0,0 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<refentry xml:id="function.tidy-construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>tidy::__construct</refname>
|
||||
<refpurpose>Constructs a new tidy object</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>tidy</type><methodname>tidy::__construct</methodname>
|
||||
<methodparam choice="opt"><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>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>use_include_path</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>tidy::__construct</function> constructs a new
|
||||
<classname>tidy</classname> object.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>filename</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
If the <parameter>filename</parameter> parameter is given, this function
|
||||
will also read that file and initialize the object with the file,
|
||||
acting like <function>tidy_parse_file</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>config</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The config <parameter>config</parameter> can be passed either as an
|
||||
array or as a string. If a string is passed, it is interpreted as the
|
||||
name of the configuration file, otherwise, it is interpreted as the
|
||||
options themselves.
|
||||
</para>
|
||||
<para>
|
||||
For an explanation about each option, visit <link
|
||||
xlink:href="&url.tidy.conf;">&url.tidy.conf;</link>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>encoding</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The <parameter>encoding</parameter> parameter sets the encoding for
|
||||
input/output documents. The possible values for encoding are:
|
||||
<literal>ascii</literal>, <literal>latin0</literal>, <literal>latin1</literal>,
|
||||
<literal>raw</literal>, <literal>utf8</literal>, <literal>iso2022</literal>,
|
||||
<literal>mac</literal>, <literal>win1252</literal>, <literal>ibm858</literal>,
|
||||
<literal>utf16</literal>, <literal>utf16le</literal>, <literal>utf16be</literal>,
|
||||
<literal>big5</literal>, and <literal>shiftjis</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>use_include_path</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Search for the file in the <link linkend="ini.include-path">include_path</link>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the new <classname>tidy</classname> instance.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>tidy::__construct</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">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head><title>title</title></head>
|
||||
<body>
|
||||
<p>paragraph <bt />
|
||||
text</p>
|
||||
</body></html>
|
||||
|
||||
HTML;
|
||||
|
||||
$tidy = new tidy;
|
||||
$tidy->parseString($html);
|
||||
|
||||
$tidy->CleanRepair();
|
||||
|
||||
if ($tidy->errorBuffer) {
|
||||
echo "The following errors were detected:\n";
|
||||
echo $tidy->errorBuffer;
|
||||
}
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
The following errors were detected:
|
||||
line 8 column 14 - Error: <bt> is not recognized!
|
||||
line 8 column 14 - Warning: discarding unexpected <bt>
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><function>tidy_parse_file</function></member>
|
||||
<member><function>tidy_parse_string</function></member>
|
||||
</simplelist>
|
||||
</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
|
||||
-->
|
|
@ -1,122 +0,0 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.11 $ -->
|
||||
<refentry xml:id="function.tidy-diagnose" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>tidy_diagnose</refname>
|
||||
<refpurpose>Run configured diagnostics on parsed and repaired markup</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>Procedural style:</para>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>tidy_diagnose</methodname>
|
||||
<methodparam><type>tidy</type><parameter>object</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>Object oriented style:</para>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>tidy->diagnose</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Runs diagnostic tests on the given tidy <parameter>object</parameter>,
|
||||
adding some more information about the document in the error buffer.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>object</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
&tidy.object;
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<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>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><function>tidy_get_error_buffer</function></member>
|
||||
</simplelist>
|
||||
</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
|
||||
-->
|
|
@ -1,126 +0,0 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.12 $ -->
|
||||
<refentry xml:id="function.tidy-get-body" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>tidy_get_body</refname>
|
||||
<refpurpose>Returns a tidyNode Object starting from the <body> tag of the tidy parse tree</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>Procedural style:</para>
|
||||
<methodsynopsis>
|
||||
<type>tidyNode</type><methodname>tidy_get_body</methodname>
|
||||
<methodparam><type>tidy</type><parameter>object</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>Object oriented style:</para>
|
||||
<methodsynopsis>
|
||||
<type>tidyNode</type><methodname>tidy->body</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This function returns a tidyNode object starting from the <body>
|
||||
tag of the tidy parse tree.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>object</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
&tidy.object;
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the detected HTML version.
|
||||
</para>
|
||||
<warning>
|
||||
<para>
|
||||
This function is not yet implemented in the Tidylib itself, so it always
|
||||
return <literal>0</literal>.
|
||||
</para>
|
||||
</warning>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>tidy_get_body</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$html = '
|
||||
<html>
|
||||
<head>
|
||||
<title>test</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>paragraph</p>
|
||||
</body>
|
||||
</html>';
|
||||
|
||||
$tidy = tidy_parse_string($html);
|
||||
|
||||
$body = tidy_get_body($tidy);
|
||||
echo $body->value;
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
<body>
|
||||
<p>paragraph</p>
|
||||
</body>
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="notes">
|
||||
&reftitle.notes;
|
||||
¬e.tidy.ze2;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><function>tidy_get_head</function></member>
|
||||
<member><function>tidy_get_html</function></member>
|
||||
</simplelist>
|
||||
</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
|
||||
-->
|
|
@ -1,195 +0,0 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.11 $ -->
|
||||
<refentry xml:id="function.tidy-get-config" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>tidy_get_config</refname>
|
||||
<refpurpose>Get current Tidy configuration</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>Procedural style:</para>
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>tidy_get_config</methodname>
|
||||
<methodparam><type>tidy</type><parameter>object</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>Object oriented style:</para>
|
||||
<methodsynopsis>
|
||||
<type>array</type><methodname>tidy->getConfig</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Gets the list of the configuration options in use by the given tidy
|
||||
<parameter>object</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>object</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
&tidy.object;
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns an array of configuration options.
|
||||
</para>
|
||||
<para>
|
||||
For an explanation about each option, visit <link
|
||||
xlink:href="&url.tidy.conf;">&url.tidy.conf;</link>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>tidy_get_config</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$html = '<p>test</p>';
|
||||
$config = array('indent' => TRUE,
|
||||
'output-xhtml' => TRUE,
|
||||
'wrap' => 200);
|
||||
|
||||
$tidy = tidy_parse_string($html, $config);
|
||||
|
||||
print_r(tidy_get_config($tidy));
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
Array
|
||||
(
|
||||
[indent-spaces] => 2
|
||||
[wrap] => 200
|
||||
[tab-size] => 8
|
||||
[char-encoding] => 1
|
||||
[input-encoding] => 3
|
||||
[output-encoding] => 1
|
||||
[newline] => 1
|
||||
[doctype-mode] => 1
|
||||
[doctype] =>
|
||||
[repeated-attributes] => 1
|
||||
[alt-text] =>
|
||||
[slide-style] =>
|
||||
[error-file] =>
|
||||
[output-file] =>
|
||||
[write-back] =>
|
||||
[markup] => 1
|
||||
[show-warnings] => 1
|
||||
[quiet] =>
|
||||
[indent] => 1
|
||||
[hide-endtags] =>
|
||||
[input-xml] =>
|
||||
[output-xml] => 1
|
||||
[output-xhtml] => 1
|
||||
[output-html] =>
|
||||
[add-xml-decl] =>
|
||||
[uppercase-tags] =>
|
||||
[uppercase-attributes] =>
|
||||
[bare] =>
|
||||
[clean] =>
|
||||
[logical-emphasis] =>
|
||||
[drop-proprietary-attributes] =>
|
||||
[drop-font-tags] =>
|
||||
[drop-empty-paras] => 1
|
||||
[fix-bad-comments] => 1
|
||||
[break-before-br] =>
|
||||
[split] =>
|
||||
[numeric-entities] =>
|
||||
[quote-marks] =>
|
||||
[quote-nbsp] => 1
|
||||
[quote-ampersand] => 1
|
||||
[wrap-attributes] =>
|
||||
[wrap-script-literals] =>
|
||||
[wrap-sections] => 1
|
||||
[wrap-asp] => 1
|
||||
[wrap-jste] => 1
|
||||
[wrap-php] => 1
|
||||
[fix-backslash] => 1
|
||||
[indent-attributes] =>
|
||||
[assume-xml-procins] =>
|
||||
[add-xml-space] =>
|
||||
[enclose-text] =>
|
||||
[enclose-block-text] =>
|
||||
[keep-time] =>
|
||||
[word-2000] =>
|
||||
[tidy-mark] =>
|
||||
[gnu-emacs] =>
|
||||
[gnu-emacs-file] =>
|
||||
[literal-attributes] =>
|
||||
[show-body-only] =>
|
||||
[fix-uri] => 1
|
||||
[lower-literals] => 1
|
||||
[hide-comments] =>
|
||||
[indent-cdata] =>
|
||||
[force-output] => 1
|
||||
[show-errors] => 6
|
||||
[ascii-chars] => 1
|
||||
[join-classes] =>
|
||||
[join-styles] => 1
|
||||
[escape-cdata] =>
|
||||
[language] =>
|
||||
[ncr] => 1
|
||||
[output-bom] => 2
|
||||
[replace-color] =>
|
||||
[css-prefix] =>
|
||||
[new-inline-tags] =>
|
||||
[new-blocklevel-tags] =>
|
||||
[new-empty-tags] =>
|
||||
[new-pre-tags] =>
|
||||
[accessibility-check] => 0
|
||||
[vertical-space] =>
|
||||
[punctuation-wrap] =>
|
||||
[merge-divs] => 1
|
||||
)
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><function>tidy_reset_config</function></member>
|
||||
<member><function>tidy_save_config</function></member>
|
||||
</simplelist>
|
||||
</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
|
||||
-->
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.11 $ -->
|
||||
<!-- $Revision: 1.12 $ -->
|
||||
<refentry xml:id="function.tidy-get-error-buffer" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>tidy_get_error_buffer</refname>
|
||||
|
@ -18,8 +18,7 @@
|
|||
<fieldsynopsis><type>string</type><varname>errorBuffer</varname></fieldsynopsis>
|
||||
</classsynopsis>
|
||||
<para>
|
||||
<function>tidy_get_error_buffer</function> returns warnings and errors
|
||||
which occurred parsing the specified document.
|
||||
Returns warnings and errors which occurred parsing the specified document.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
|
|
|
@ -1,120 +0,0 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.12 $ -->
|
||||
<refentry xml:id="function.tidy-get-head" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>tidy_get_head</refname>
|
||||
<refpurpose>Returns a tidyNode Object starting from the <head> tag of the tidy parse tree</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>Procedural style:</para>
|
||||
<methodsynopsis>
|
||||
<type>tidyNode</type><methodname>tidy_get_head</methodname>
|
||||
<methodparam><type>tidy</type><parameter>object</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>Object oriented style:</para>
|
||||
<methodsynopsis>
|
||||
<type>tidyNode</type><methodname>tidy->head</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This function returns a tidyNode object starting from the <head>
|
||||
tag of the tidy parse tree.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>object</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
&tidy.object;
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the <classname>tidyNode</classname> object.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>tidy_get_head</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$html = '
|
||||
<html>
|
||||
<head>
|
||||
<title>test</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>paragraph</p>
|
||||
</body>
|
||||
</html>';
|
||||
|
||||
$tidy = tidy_parse_string($html);
|
||||
|
||||
$head = tidy_get_head($tidy);
|
||||
echo $head->value;
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
<head>
|
||||
<title>test</title>
|
||||
</head>
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="notes">
|
||||
&reftitle.notes;
|
||||
¬e.tidy.ze2;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><function>tidy_get_body</function></member>
|
||||
<member><function>tidy_get_html</function></member>
|
||||
</simplelist>
|
||||
</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
|
||||
-->
|
|
@ -1,76 +0,0 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.10 $ -->
|
||||
<refentry xml:id="function.tidy-get-html-ver" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>tidy_get_html_ver</refname>
|
||||
<refpurpose>Get the Detected HTML version for the specified document</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>Procedural style:</para>
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>tidy_get_html_ver</methodname>
|
||||
<methodparam><type>tidy</type><parameter>object</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>Object oriented style:</para>
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>tidy->getHtmlVer</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the detected HTML version for the specified tidy
|
||||
<parameter>object</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>object</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
&tidy.object;
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the detected HTML version.
|
||||
</para>
|
||||
<warning>
|
||||
<para>
|
||||
This function is not yet implemented in the Tidylib itself, so it always
|
||||
return <literal>0</literal>.
|
||||
</para>
|
||||
</warning>
|
||||
</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
|
||||
-->
|
|
@ -1,124 +0,0 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.13 $ -->
|
||||
<refentry xml:id="function.tidy-get-html" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>tidy_get_html</refname>
|
||||
<refpurpose>Returns a tidyNode Object starting from the <html> tag of the tidy parse tree</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>Procedural style:</para>
|
||||
<methodsynopsis>
|
||||
<type>tidyNode</type><methodname>tidy_get_html</methodname>
|
||||
<methodparam><type>tidy</type><parameter>object</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>Object oriented style:</para>
|
||||
<methodsynopsis>
|
||||
<type>tidyNode</type><methodname>tidy->html</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This function returns a tidyNode object starting from the <html>
|
||||
tag of the tidy parse tree.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>object</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
&tidy.object;
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the <classname>tidyNode</classname> object.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>tidy_get_html</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$html = '
|
||||
<html>
|
||||
<head>
|
||||
<title>test</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>paragraph</p>
|
||||
</body>
|
||||
</html>';
|
||||
|
||||
$tidy = tidy_parse_string($html);
|
||||
|
||||
$html = tidy_get_html($tidy);
|
||||
echo $html->value;
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
<html>
|
||||
<head>
|
||||
<title>test</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>paragraph</p>
|
||||
</body>
|
||||
</html>
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="notes">
|
||||
&reftitle.notes;
|
||||
¬e.tidy.ze2;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><function>tidy_get_body</function></member>
|
||||
<member><function>tidy_get_head</function></member>
|
||||
</simplelist>
|
||||
</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
|
||||
-->
|
|
@ -1,130 +0,0 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<refentry xml:id="function.tidy-get-opt-doc" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>tidy_get_opt_doc</refname>
|
||||
<refpurpose>
|
||||
Returns the documentation for the given option name
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>Procedural style:</para>
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>tidy_get_opt_doc</methodname>
|
||||
<methodparam><type>tidy</type><parameter>object</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>optname</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>Object oriented style:</para>
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>tidy->getOptDoc</methodname>
|
||||
<methodparam><type>string</type><parameter>optname</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>tidy_get_opt_doc</function> returns the documentation for the
|
||||
given option name.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
You need at least libtidy from 25 April, 2005 for this function be
|
||||
available.
|
||||
</para>
|
||||
</note>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>object</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
&tidy.object;
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>optname</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The option name
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns a string if the option exists and has documentation available, or
|
||||
&false; otherwise.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>Print all options along with their documentation and default value</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$tidy = new tidy;
|
||||
$config = $tidy->getConfig();
|
||||
|
||||
ksort($config);
|
||||
|
||||
foreach ($config as $opt => $val) {
|
||||
|
||||
if (!$doc = $tidy->getOptDoc($opt))
|
||||
$doc = 'no documentation available!';
|
||||
|
||||
$val = ($tidy->getOpt($opt) === true) ? 'true' : $val;
|
||||
$val = ($tidy->getOpt($opt) === false) ? 'false' : $val;
|
||||
|
||||
echo "<p><b>$opt</b> (default: '$val')<br />".
|
||||
"$doc</p><hr />\n";
|
||||
}
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<para>
|
||||
<simplelist>
|
||||
<member><function>tidy_get_config</function></member>
|
||||
<member><function>tidy_getopt</function></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
|
||||
-->
|
|
@ -1,51 +0,0 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<refentry xml:id="function.tidy-get-release" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>tidy_get_release</refname>
|
||||
<refpurpose>Get release date (version) for Tidy library</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>Procedural style:</para>
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>tidy_get_release</methodname>
|
||||
<void/>
|
||||
</methodsynopsis>
|
||||
<para>Object oriented style:</para>
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>tidy->getRelease</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Gets the release date of the Tidy library.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns a string with the release date of the Tidy library.
|
||||
</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
|
||||
-->
|
|
@ -1,124 +0,0 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.10 $ -->
|
||||
<refentry xml:id="function.tidy-get-root" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>tidy_get_root</refname>
|
||||
<refpurpose>Returns a tidyNode object representing the root of the tidy parse tree</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>Procedural style:</para>
|
||||
<methodsynopsis>
|
||||
<type>tidyNode</type><methodname>tidy_get_root</methodname>
|
||||
<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>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>object</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
&tidy.object;
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the <classname>tidyNode</classname> object.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title>dump nodes</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$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>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="notes">
|
||||
&reftitle.notes;
|
||||
¬e.tidy.ze2;
|
||||
</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
|
||||
-->
|
|
@ -1,93 +0,0 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.11 $ -->
|
||||
<refentry xml:id="function.tidy-get-status" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>tidy_get_status</refname>
|
||||
<refpurpose>Get status of specified document</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>Procedural style:</para>
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>tidy_get_status</methodname>
|
||||
<methodparam><type>tidy</type><parameter>object</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>Object oriented style:</para>
|
||||
<methodsynopsis>
|
||||
<type>int</type><methodname>tidy->getStatus</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the status for the specified tidy <parameter>object</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>object</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
&tidy.object;
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns 0 if no error/warning was raised, 1 for warnings or accessibility
|
||||
errors, or 2 for errors.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>tidy_get_status</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$html = '<p>paragraph</i>';
|
||||
$tidy = tidy_parse_string($html);
|
||||
|
||||
$html2 = '<bogus>test</bogus>';
|
||||
$tidy2 = tidy_parse_string($html2);
|
||||
|
||||
echo tidy_get_status($tidy); //1
|
||||
|
||||
echo tidy_get_status($tidy2); //2
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</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
|
||||
-->
|
|
@ -1,123 +0,0 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<refentry xml:id="function.tidy-getopt" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>tidy_getopt</refname>
|
||||
<refpurpose>Returns the value of the specified configuration option for the tidy document</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>Procedural style:</para>
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>tidy_getopt</methodname>
|
||||
<methodparam><type>tidy</type><parameter>object</parameter></methodparam>
|
||||
<methodparam><type>string</type><parameter>option</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>Object oriented style:</para>
|
||||
<methodsynopsis>
|
||||
<type>mixed</type><methodname>tidy->getOpt</methodname>
|
||||
<methodparam><type>string</type><parameter>option</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Returns the value of the specified <parameter>option</parameter> for the
|
||||
specified tidy <parameter>object</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>object</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
&tidy.object;
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>option</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
You will find a list with each configuration option and their types
|
||||
at: <link xlink:href="&url.tidy.conf;">&url.tidy.conf;</link>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the value of the specified <parameter>option</parameter>.
|
||||
The return type depends on the type of the specified one.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>tidy_getopt</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
$html ='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||
<html><head><title>Title</title></head>
|
||||
<body>
|
||||
|
||||
<p><img src="img.png"></p>
|
||||
|
||||
</body></html>';
|
||||
|
||||
$config = array('accessibility-check' => 3,
|
||||
'alt-text' => 'some text');
|
||||
|
||||
$tidy = new tidy();
|
||||
$tidy->parseString($html, $config);
|
||||
|
||||
|
||||
var_dump($tidy->getOpt('accessibility-check')); //integer
|
||||
var_dump($tidy->getOpt('lower-literals')); //boolean
|
||||
var_dump($tidy->getOpt('alt-text')); //string
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
int(3)
|
||||
bool(true)
|
||||
string(9) "some text"
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</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
|
||||
-->
|
|
@ -1,76 +0,0 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.11 $ -->
|
||||
<refentry xml:id="function.tidy-is-xhtml" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>tidy_is_xhtml</refname>
|
||||
<refpurpose>Indicates if the document is a XHTML document</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>Procedural style:</para>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>tidy_is_xhtml</methodname>
|
||||
<methodparam><type>tidy</type><parameter>object</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>Object oriented style:</para>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>tidy->isXhtml</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Tells if the document is a XHTML document.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>object</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
&tidy.object;
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
This function returns &true; if the specified tidy
|
||||
<parameter>object</parameter> is a XHTML document, or &false; otherwise.
|
||||
</para>
|
||||
<warning>
|
||||
<para>
|
||||
This function is not yet implemented in the Tidylib itself, so it always
|
||||
return &false;.
|
||||
</para>
|
||||
</warning>
|
||||
</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
|
||||
-->
|
|
@ -1,77 +0,0 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<refentry xml:id="function.tidy-is-xml" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>tidy_is_xml</refname>
|
||||
<refpurpose>Indicates if the document is a generic (non HTML/XHTML) XML document</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>Procedural style:</para>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>tidy_is_xml</methodname>
|
||||
<methodparam><type>tidy</type><parameter>object</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>Object oriented style:</para>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>tidy->isXml</methodname>
|
||||
<void />
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Tells if the document is a generic (non HTML/XHTML) XML document.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>object</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
&tidy.object;
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
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>
|
||||
This function is not yet implemented in the Tidylib itself, so it always
|
||||
return &false;.
|
||||
</para>
|
||||
</warning>
|
||||
</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
|
||||
-->
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<refentry xml:id="function.tidy-load-config" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>tidy_load_config</refname>
|
||||
|
@ -13,7 +13,7 @@
|
|||
<methodparam><type>string</type><parameter>encoding</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This function loads a Tidy configuration file, with the specified
|
||||
Loads a Tidy configuration file, with the specified
|
||||
<parameter>encoding</parameter>.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
|
|
@ -1,151 +0,0 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<!-- $Revision: 1.15 $ -->
|
||||
<refentry xml:id="function.tidy-parse-file" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>tidy_parse_file</refname>
|
||||
<refpurpose>Parse markup in file or URI</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>Procedural style:</para>
|
||||
<methodsynopsis>
|
||||
<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>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>use_include_path</parameter><initializer>false</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>Object oriented style:</para>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>tidy->parseFile</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>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>use_include_path</parameter><initializer>false</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This function parses the given file.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>filename</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
If the <parameter>filename</parameter> parameter is given, this function
|
||||
will also read that file and initialize the object with the file,
|
||||
acting like <function>tidy_parse_file</function>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>config</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The config <parameter>config</parameter> can be passed either as an
|
||||
array or as a string. If a string is passed, it is interpreted as the
|
||||
name of the configuration file, otherwise, it is interpreted as the
|
||||
options themselves.
|
||||
</para>
|
||||
<para>
|
||||
Pour une explication sur chaque option, voyez
|
||||
<link xlink:href="&url.tidy.conf;">&url.tidy.conf;</link>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>encoding</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Le paramètre <parameter>encoding</parameter> configure l'encodage
|
||||
pour les documents d'entrée et de sortie. Les valeurs possibles sont
|
||||
<literal>ascii</literal>, <literal>latin0</literal>, <literal>latin1</literal>,
|
||||
<literal>raw</literal>, <literal>utf8</literal>, <literal>iso2022</literal>,
|
||||
<literal>mac</literal>, <literal>win1252</literal>, <literal>ibm858</literal>,
|
||||
<literal>utf16</literal>, <literal>utf16le</literal>, <literal>utf16be</literal>,
|
||||
<literal>big5</literal> et <literal>shiftjis</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>use_include_path</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Search for the file in the <link linkend="ini.include-path">include_path</link>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>tidy_parse_file</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$tidy = tidy_parse_file('file.html');
|
||||
|
||||
$tidy->cleanRepair();
|
||||
|
||||
if(!empty($tidy->errorBuffer)) {
|
||||
echo "The following errors or warnings occured:\n";
|
||||
echo $tidy->errorBuffer;
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="notes">
|
||||
&reftitle.notes;
|
||||
¬e.tidy.2only;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><function>tidy_parse_string</function></member>
|
||||
<member><function>tidy_repair_file</function></member>
|
||||
<member><function>tidy_repair_string</function></member>
|
||||
</simplelist>
|
||||
</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
|
||||
-->
|
|
@ -1,174 +0,0 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.13 $ -->
|
||||
<refentry xml:id="function.tidy-parse-string" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<refnamediv>
|
||||
<refname>tidy_parse_string</refname>
|
||||
<refpurpose>Parse a document stored in a string</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<para>Procedural style:</para>
|
||||
<methodsynopsis>
|
||||
<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>
|
||||
</methodsynopsis>
|
||||
<para>Object oriented style:</para>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>tidy->parseString</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>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Parses a document stored in a string.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>input</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The data to be parsed.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>config</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The config <parameter>config</parameter> can be passed either as an
|
||||
array or as a string. If a string is passed, it is interpreted as the
|
||||
name of the configuration file, otherwise, it is interpreted as the
|
||||
options themselves.
|
||||
</para>
|
||||
<para>
|
||||
For an explanation about each option, visit <link
|
||||
xlink:href="&url.tidy.conf;">&url.tidy.conf;</link>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>encoding</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The <parameter>encoding</parameter> parameter sets the encoding for
|
||||
input/output documents. The possible values for encoding are:
|
||||
<literal>ascii</literal>, <literal>latin0</literal>, <literal>latin1</literal>,
|
||||
<literal>raw</literal>, <literal>utf8</literal>, <literal>iso2022</literal>,
|
||||
<literal>mac</literal>, <literal>win1252</literal>, <literal>ibm858</literal>,
|
||||
<literal>utf16</literal>, <literal>utf16le</literal>, <literal>utf16be</literal>,
|
||||
<literal>big5</literal>, and <literal>shiftjis</literal>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns a new <classname>tidy</classname> instance.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>tidy_parse_string</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
ob_start();
|
||||
?>
|
||||
|
||||
<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_parse_string($buffer, $config, 'UTF8');
|
||||
|
||||
$tidy->cleanRepair();
|
||||
echo $tidy;
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<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>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="notes">
|
||||
&reftitle.notes;
|
||||
¬e.tidy.2only;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><function>tidy_parse_file</function></member>
|
||||
<member><function>tidy_repair_file</function></member>
|
||||
<member><function>tidy_repair_string</function></member>
|
||||
</simplelist>
|
||||
</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
|
||||
-->
|
|
@ -1,135 +0,0 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<refentry xml:id="function.tidy-repair-file" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>tidy_repair_file</refname>
|
||||
<refpurpose>Repair a file and return it as a string</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>tidy_repair_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>
|
||||
<methodparam choice="opt"><type>bool</type><parameter>use_include_path</parameter><initializer>false</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
Repairs the given file and returns it as a string.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>filename</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The file to be repaired.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>config</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The config <parameter>config</parameter> can be passed either as an
|
||||
array or as a string. If a string is passed, it is interpreted as the
|
||||
name of the configuration file, otherwise, it is interpreted as the
|
||||
options themselves.
|
||||
</para>
|
||||
<para>
|
||||
Check http://tidy.sourceforge.net/docs/quickref.html for an
|
||||
explanation about each option.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>encoding</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The <parameter>encoding</parameter> parameter sets the encoding for
|
||||
input/output documents. The possible values for encoding are: ascii,
|
||||
latin0, latin1, raw, utf8, iso2022, mac, win1252, ibm858, utf16,
|
||||
utf16le, utf16be, big5 and shiftjis.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>use_include_path</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
Search for the file in the <link linkend="ini.include-path">include_path</link>.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the repaired contents as a string.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>tidy_repair_file</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
$file = 'file.html';
|
||||
|
||||
$repaired = tidy_repair_file($file);
|
||||
rename($file, $file . '.bak');
|
||||
|
||||
file_put_contents($file, $repaired);
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="notes">
|
||||
&reftitle.notes;
|
||||
¬e.tidy.2only;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><function>tidy_parse_file</function></member>
|
||||
<member><function>tidy_parse_string</function></member>
|
||||
<member><function>tidy_repair_string</function></member>
|
||||
</simplelist>
|
||||
</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
|
||||
-->
|
|
@ -1,151 +0,0 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.12 $ -->
|
||||
<refentry xml:id="function.tidy-repair-string" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>tidy_repair_string</refname>
|
||||
<refpurpose>Repair a string using an optionally provided configuration file</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1 role="description">
|
||||
&reftitle.description;
|
||||
<methodsynopsis>
|
||||
<type>string</type><methodname>tidy_repair_string</methodname>
|
||||
<methodparam><type>string</type><parameter>data</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>mixed</type><parameter>config</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>encoding</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
This function repairs the given string.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
<para>
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term><parameter>data</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The data to be repaired.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>config</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The config <parameter>config</parameter> can be passed either as an
|
||||
array or as a string. If a string is passed, it is interpreted as the
|
||||
name of the configuration file, otherwise, it is interpreted as the
|
||||
options themselves.
|
||||
</para>
|
||||
<para>
|
||||
Check http://tidy.sourceforge.net/docs/quickref.html for an
|
||||
explanation about each option.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>encoding</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
The <parameter>encoding</parameter> parameter sets the encoding for
|
||||
input/output documents. The possible values for encoding are: ascii,
|
||||
latin0, latin1, raw, utf8, iso2022, mac, win1252, ibm858, utf16,
|
||||
utf16le, utf16be, big5 and shiftjis.
|
||||
</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
Returns the repaired string.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<para>
|
||||
<example>
|
||||
<title><function>tidy_repair_string</function> example</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
ob_start();
|
||||
?>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>test</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>error</i>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<?php
|
||||
|
||||
$buffer = ob_get_clean();
|
||||
$tidy = tidy_repair_string($buffer);
|
||||
|
||||
echo $tidy;
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
&example.outputs;
|
||||
<screen>
|
||||
<![CDATA[
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>test</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>error</p>
|
||||
</body>
|
||||
</html>
|
||||
]]>
|
||||
</screen>
|
||||
</example>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="notes">
|
||||
&reftitle.notes;
|
||||
¬e.tidy.2only;
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="seealso">
|
||||
&reftitle.seealso;
|
||||
<simplelist>
|
||||
<member><function>tidy_parse_file</function></member>
|
||||
<member><function>tidy_parse_string</function></member>
|
||||
<member><function>tidy_repair_file</function></member>
|
||||
</simplelist>
|
||||
</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
|
||||
-->
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<!-- $Revision: 1.9 $ -->
|
||||
<refentry xml:id="function.tidy-warning-count" xmlns="http://docbook.org/ns/docbook">
|
||||
<refnamediv>
|
||||
<refname>tidy_warning_count</refname>
|
||||
|
@ -12,8 +12,7 @@
|
|||
<methodparam><type>tidy</type><parameter>object</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>tidy_warning_count</function> returns the number of Tidy warnings
|
||||
encountered for the specified document.
|
||||
Returns the number of Tidy warnings encountered for the specified document.
|
||||
</para>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
|
|
Loading…
Reference in a new issue