nlopess         Sat Jul  3 11:47:19 2004 EDT

  Modified files:              
    /phpdoc/en/reference/tidy/functions tidy-access-count.xml 
                                        tidy-clean-repair.xml 
                                        tidy-diagnose.xml 
                                        tidy-get-body.xml 
                                        tidy-get-config.xml 
                                        tidy-get-error-buffer.xml 
                                        tidy-get-head.xml 
                                        tidy-get-html-ver.xml 
                                        tidy-get-html.xml 
                                        tidy-get-release.xml 
                                        tidy-get-root.xml 
                                        tidy-get-status.xml 
                                        tidy-getopt.xml 
  Log:
  more tidy docs and examples. also some OO protos
  
http://cvs.php.net/diff.php/phpdoc/en/reference/tidy/functions/tidy-access-count.xml?r1=1.2&r2=1.3&ty=u
Index: phpdoc/en/reference/tidy/functions/tidy-access-count.xml
diff -u phpdoc/en/reference/tidy/functions/tidy-access-count.xml:1.2 
phpdoc/en/reference/tidy/functions/tidy-access-count.xml:1.3
--- phpdoc/en/reference/tidy/functions/tidy-access-count.xml:1.2        Sat Feb 21 
05:41:02 2004
+++ phpdoc/en/reference/tidy/functions/tidy-access-count.xml    Sat Jul  3 11:47:18 
2004
@@ -1,5 +1,5 @@
 <?xml version='1.0' encoding='iso-8859-1'?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
   <refentry id="function.tidy-access-count">
    <refnamediv>
     <refname>tidy_access_count</refname>
@@ -13,9 +13,56 @@
      <type>int</type><methodname>tidy_access_count</methodname>
      <methodparam><type>resource</type><parameter>tidy</parameter></methodparam>
     </methodsynopsis>
+    <para>
+     <function>tidy_access_count</function> returns the number of
+     accessibility warnings found for the specified document.
+    </para>
+    <note>
+     <para>
+      Due to the design of the TidyLib, you must call
+      <function>tidy_diagnose</function> before
+      <function>tidy_access_count</function> or it will return always
+      <literal>0</literal>. You must also need to enable the
+      <literal>accessibility-check</literal> option.
+     </para>
+    </note>
+    <para>
+     <example>
+      <title><function>tidy_access_count</function> example</title>
+      <programlisting role="php">
+<![CDATA[
+<?php
 
-     &warn.undocumented.func;
+$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>';
+
+
+// select the accessibility check level: 1, 2 or 3
+$config = array('accessibility-check' => 3);
+
+$tidy = new tidy();
+$tidy->parseString($html, $config);
+$tidy->CleanRepair();
+
+/* Never forget to call this! */
+$tidy->diagnose();
+
+echo tidy_access_count($tidy); //5
+
+?>
+]]>
+      </programlisting>
+     </example>
+    </para>
+    <para>
+     See also <function>tidy_error_count</function> and
+     <function>tidy_warning_count</function>.
+    </para>
    </refsect1>
   </refentry>
 
http://cvs.php.net/diff.php/phpdoc/en/reference/tidy/functions/tidy-clean-repair.xml?r1=1.3&r2=1.4&ty=u
Index: phpdoc/en/reference/tidy/functions/tidy-clean-repair.xml
diff -u phpdoc/en/reference/tidy/functions/tidy-clean-repair.xml:1.3 
phpdoc/en/reference/tidy/functions/tidy-clean-repair.xml:1.4
--- phpdoc/en/reference/tidy/functions/tidy-clean-repair.xml:1.3        Sat Feb 21 
05:41:02 2004
+++ phpdoc/en/reference/tidy/functions/tidy-clean-repair.xml    Sat Jul  3 11:47:18 
2004
@@ -1,5 +1,5 @@
 <?xml version='1.0' encoding='iso-8859-1'?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
   <refentry id="function.tidy-clean-repair">
    <refnamediv>
     <refname>tidy_clean_repair</refname>
@@ -9,9 +9,15 @@
    </refnamediv>
    <refsect1>
     <title>Description</title>
+    <para>Procedural style:</para>
     <methodsynopsis>
      <type>bool</type><methodname>tidy_clean_repair</methodname>
      <methodparam><type>resource</type><parameter>tidy</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 <parameter>tidy</parameter>
http://cvs.php.net/diff.php/phpdoc/en/reference/tidy/functions/tidy-diagnose.xml?r1=1.4&r2=1.5&ty=u
Index: phpdoc/en/reference/tidy/functions/tidy-diagnose.xml
diff -u phpdoc/en/reference/tidy/functions/tidy-diagnose.xml:1.4 
phpdoc/en/reference/tidy/functions/tidy-diagnose.xml:1.5
--- phpdoc/en/reference/tidy/functions/tidy-diagnose.xml:1.4    Wed Feb 25 06:07:43 
2004
+++ phpdoc/en/reference/tidy/functions/tidy-diagnose.xml        Sat Jul  3 11:47:18 
2004
@@ -1,5 +1,5 @@
 <?xml version='1.0' encoding='iso-8859-1'?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
   <refentry id="function.tidy-diagnose">
    <refnamediv>
     <refname>tidy_diagnose</refname>
@@ -9,9 +9,15 @@
    </refnamediv>
    <refsect1>
     <title>Description</title>
+    <para>Procedural style:</para>
     <methodsynopsis>
      <type>bool</type><methodname>tidy_diagnose</methodname>
      <methodparam><type>resource</type><parameter>tidy</parameter></methodparam>
+    </methodsynopsis>
+    <para>Object oriented style:</para>
+    <methodsynopsis>
+     <type>bool</type><methodname>tidy->diagnose</methodname>
+     <void />
     </methodsynopsis>
     <para>
      <function>tidy_diagnose</function> runs diagnostic tests on the given
http://cvs.php.net/diff.php/phpdoc/en/reference/tidy/functions/tidy-get-body.xml?r1=1.5&r2=1.6&ty=u
Index: phpdoc/en/reference/tidy/functions/tidy-get-body.xml
diff -u phpdoc/en/reference/tidy/functions/tidy-get-body.xml:1.5 
phpdoc/en/reference/tidy/functions/tidy-get-body.xml:1.6
--- phpdoc/en/reference/tidy/functions/tidy-get-body.xml:1.5    Sun Jan 18 07:45:56 
2004
+++ phpdoc/en/reference/tidy/functions/tidy-get-body.xml        Sat Jul  3 11:47:18 
2004
@@ -1,5 +1,5 @@
 <?xml version='1.0' encoding='iso-8859-1'?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
   <refentry id="function.tidy-get-body">
    <refnamediv>
     <refname>tidy_get_body</refname>
@@ -9,9 +9,15 @@
    </refnamediv>
    <refsect1>
     <title>Description</title>
+    <para>Procedural style:</para>
     <methodsynopsis>
      <type>object</type><methodname>tidy_get_body</methodname>
      <methodparam><type>resource</type><parameter>tidy</parameter></methodparam>
+    </methodsynopsis>
+    <para>Object oriented style:</para>
+    <methodsynopsis>
+     <type>object</type><methodname>tidy->body</methodname>
+     <void />
     </methodsynopsis>
     <para>
      This function returns a TidyNode object starting from the &lt;body&gt;
http://cvs.php.net/diff.php/phpdoc/en/reference/tidy/functions/tidy-get-config.xml?r1=1.3&r2=1.4&ty=u
Index: phpdoc/en/reference/tidy/functions/tidy-get-config.xml
diff -u phpdoc/en/reference/tidy/functions/tidy-get-config.xml:1.3 
phpdoc/en/reference/tidy/functions/tidy-get-config.xml:1.4
--- phpdoc/en/reference/tidy/functions/tidy-get-config.xml:1.3  Sun Feb 22 07:23:24 
2004
+++ phpdoc/en/reference/tidy/functions/tidy-get-config.xml      Sat Jul  3 11:47:18 
2004
@@ -1,5 +1,5 @@
 <?xml version='1.0' encoding='iso-8859-1'?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
   <refentry id="function.tidy-get-config">
    <refnamediv>
     <refname>tidy_get_config</refname>
@@ -9,9 +9,15 @@
    </refnamediv>
    <refsect1>
     <title>Description</title>
+    <para>Procedural style:</para>
     <methodsynopsis>
      <type>array</type><methodname>tidy_get_config</methodname>
      <methodparam><type>resource</type><parameter>tidy</parameter></methodparam>
+    </methodsynopsis>
+    <para>Object oriented style:</para>
+    <methodsynopsis>
+     <type>array</type><methodname>tidy->getConfig</methodname>
+     <void />
     </methodsynopsis>
     <para>
      <function>tidy_get_config</function> returns an array with the
http://cvs.php.net/diff.php/phpdoc/en/reference/tidy/functions/tidy-get-error-buffer.xml?r1=1.4&r2=1.5&ty=u
Index: phpdoc/en/reference/tidy/functions/tidy-get-error-buffer.xml
diff -u phpdoc/en/reference/tidy/functions/tidy-get-error-buffer.xml:1.4 
phpdoc/en/reference/tidy/functions/tidy-get-error-buffer.xml:1.5
--- phpdoc/en/reference/tidy/functions/tidy-get-error-buffer.xml:1.4    Sat Mar  6 
06:54:32 2004
+++ phpdoc/en/reference/tidy/functions/tidy-get-error-buffer.xml        Sat Jul  3 
11:47:18 2004
@@ -1,5 +1,5 @@
 <?xml version='1.0' encoding='iso-8859-1'?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
   <refentry id="function.tidy-get-error-buffer">
    <refnamediv>
     <refname>tidy_get_error_buffer</refname>
@@ -13,6 +13,11 @@
      <type>string</type><methodname>tidy_get_error_buffer</methodname>
      <methodparam><type>resource</type><parameter>tidy</parameter></methodparam>
     </methodsynopsis>
+    <para>Object oriented style (property):</para>
+    <classsynopsis>
+     <ooclass><classname>tidy</classname></ooclass>
+     <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.
@@ -26,7 +31,10 @@
 $html = '<p>paragraph</p>';
 
 $tidy = tidy_parse_string($html);
+
 echo tidy_get_error_buffer($tidy);
+/* or in OO: */
+echo $tidy->errorBuffer;
 ?>
 ]]>
       </programlisting>
http://cvs.php.net/diff.php/phpdoc/en/reference/tidy/functions/tidy-get-head.xml?r1=1.5&r2=1.6&ty=u
Index: phpdoc/en/reference/tidy/functions/tidy-get-head.xml
diff -u phpdoc/en/reference/tidy/functions/tidy-get-head.xml:1.5 
phpdoc/en/reference/tidy/functions/tidy-get-head.xml:1.6
--- phpdoc/en/reference/tidy/functions/tidy-get-head.xml:1.5    Sun Jan 18 07:45:56 
2004
+++ phpdoc/en/reference/tidy/functions/tidy-get-head.xml        Sat Jul  3 11:47:18 
2004
@@ -1,5 +1,5 @@
 <?xml version='1.0' encoding='iso-8859-1'?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
   <refentry id="function.tidy-get-head">
    <refnamediv>
     <refname>tidy_get_head</refname>
@@ -9,9 +9,15 @@
    </refnamediv>
    <refsect1>
     <title>Description</title>
+    <para>Procedural style:</para>
     <methodsynopsis>
      <type>object</type><methodname>tidy_get_head</methodname>
      <methodparam><type>resource</type><parameter>tidy</parameter></methodparam>
+    </methodsynopsis>
+    <para>Object oriented style:</para>
+    <methodsynopsis>
+     <type>object</type><methodname>tidy->head</methodname>
+     <void />
     </methodsynopsis>
     <para>
      This function returns a TidyNode object starting from the &lt;head&gt;
http://cvs.php.net/diff.php/phpdoc/en/reference/tidy/functions/tidy-get-html-ver.xml?r1=1.3&r2=1.4&ty=u
Index: phpdoc/en/reference/tidy/functions/tidy-get-html-ver.xml
diff -u phpdoc/en/reference/tidy/functions/tidy-get-html-ver.xml:1.3 
phpdoc/en/reference/tidy/functions/tidy-get-html-ver.xml:1.4
--- phpdoc/en/reference/tidy/functions/tidy-get-html-ver.xml:1.3        Sat May 29 
06:21:49 2004
+++ phpdoc/en/reference/tidy/functions/tidy-get-html-ver.xml    Sat Jul  3 11:47:18 
2004
@@ -1,5 +1,5 @@
 <?xml version='1.0' encoding='iso-8859-1'?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
   <refentry id="function.tidy-get-html-ver">
    <refnamediv>
     <refname>tidy_get_html_ver</refname>
@@ -9,9 +9,15 @@
    </refnamediv>
    <refsect1>
     <title>Description</title>
+    <para>Procedural style:</para>
     <methodsynopsis>
      <type>int</type><methodname>tidy_get_html_ver</methodname>
      <methodparam><type>resource</type><parameter>tidy</parameter></methodparam>
+    </methodsynopsis>
+    <para>Object oriented style:</para>
+    <methodsynopsis>
+     <type>int</type><methodname>tidy->getHtmlVer</methodname>
+     <void />
     </methodsynopsis>
     <para>
      <function>tidy_get_html_ver</function> returns the detected HTML version
http://cvs.php.net/diff.php/phpdoc/en/reference/tidy/functions/tidy-get-html.xml?r1=1.6&r2=1.7&ty=u
Index: phpdoc/en/reference/tidy/functions/tidy-get-html.xml
diff -u phpdoc/en/reference/tidy/functions/tidy-get-html.xml:1.6 
phpdoc/en/reference/tidy/functions/tidy-get-html.xml:1.7
--- phpdoc/en/reference/tidy/functions/tidy-get-html.xml:1.6    Sun Jan 18 07:45:55 
2004
+++ phpdoc/en/reference/tidy/functions/tidy-get-html.xml        Sat Jul  3 11:47:18 
2004
@@ -1,5 +1,5 @@
 <?xml version='1.0' encoding='iso-8859-1'?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
   <refentry id="function.tidy-get-html">
    <refnamediv>
     <refname>tidy_get_html</refname>
@@ -9,9 +9,15 @@
    </refnamediv>
    <refsect1>
     <title>Description</title>
+    <para>Procedural style:</para>
     <methodsynopsis>
      <type>object</type><methodname>tidy_get_html</methodname>
      <methodparam><type>resource</type><parameter>tidy</parameter></methodparam>
+    </methodsynopsis>
+    <para>Object oriented style:</para>
+    <methodsynopsis>
+     <type>object</type><methodname>tidy->html</methodname>
+     <void />
     </methodsynopsis>
     <para>
      This function returns a TidyNode object starting from the &lt;html&gt;
http://cvs.php.net/diff.php/phpdoc/en/reference/tidy/functions/tidy-get-release.xml?r1=1.2&r2=1.3&ty=u
Index: phpdoc/en/reference/tidy/functions/tidy-get-release.xml
diff -u phpdoc/en/reference/tidy/functions/tidy-get-release.xml:1.2 
phpdoc/en/reference/tidy/functions/tidy-get-release.xml:1.3
--- phpdoc/en/reference/tidy/functions/tidy-get-release.xml:1.2 Sun Jan 18 07:53:27 
2004
+++ phpdoc/en/reference/tidy/functions/tidy-get-release.xml     Sat Jul  3 11:47:18 
2004
@@ -1,5 +1,5 @@
 <?xml version='1.0' encoding='iso-8859-1'?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
   <refentry id="function.tidy-get-release">
    <refnamediv>
     <refname>tidy_get_release</refname>
@@ -9,9 +9,15 @@
    </refnamediv>
    <refsect1>
     <title>Description</title>
+    <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>
      This function returns a string with the release date of the Tidy library.
http://cvs.php.net/diff.php/phpdoc/en/reference/tidy/functions/tidy-get-root.xml?r1=1.3&r2=1.4&ty=u
Index: phpdoc/en/reference/tidy/functions/tidy-get-root.xml
diff -u phpdoc/en/reference/tidy/functions/tidy-get-root.xml:1.3 
phpdoc/en/reference/tidy/functions/tidy-get-root.xml:1.4
--- phpdoc/en/reference/tidy/functions/tidy-get-root.xml:1.3    Sun Dec  7 17:00:56 
2003
+++ phpdoc/en/reference/tidy/functions/tidy-get-root.xml        Sat Jul  3 11:47:18 
2004
@@ -1,5 +1,5 @@
 <?xml version='1.0' encoding='iso-8859-1'?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
 <!-- Generated by xml_proto.php v2.0. Found in /scripts directory of phpdoc. -->
   <refentry id="function.tidy-get-root">
    <refnamediv>
@@ -10,9 +10,15 @@
    </refnamediv>
    <refsect1>
     <title>Description</title>
+    <para>Procedural style:</para>
     <methodsynopsis>
      <type>object</type><methodname>tidy_get_root</methodname>
-     <void/>
+     <methodparam><type>resource</type><parameter>tidy</parameter></methodparam>
+    </methodsynopsis>
+    <para>Object oriented style:</para>
+    <methodsynopsis>
+     <type>object</type><methodname>tidy->root</methodname>
+     <void />
     </methodsynopsis>
 
      &warn.undocumented.func;
http://cvs.php.net/diff.php/phpdoc/en/reference/tidy/functions/tidy-get-status.xml?r1=1.4&r2=1.5&ty=u
Index: phpdoc/en/reference/tidy/functions/tidy-get-status.xml
diff -u phpdoc/en/reference/tidy/functions/tidy-get-status.xml:1.4 
phpdoc/en/reference/tidy/functions/tidy-get-status.xml:1.5
--- phpdoc/en/reference/tidy/functions/tidy-get-status.xml:1.4  Tue Mar  9 14:57:40 
2004
+++ phpdoc/en/reference/tidy/functions/tidy-get-status.xml      Sat Jul  3 11:47:18 
2004
@@ -1,5 +1,5 @@
 <?xml version='1.0' encoding='iso-8859-1'?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
   <refentry id="function.tidy-get-status">
    <refnamediv>
     <refname>tidy_get_status</refname>
@@ -9,9 +9,15 @@
    </refnamediv>
    <refsect1>
     <title>Description</title>
+    <para>Procedural style:</para>
     <methodsynopsis>
      <type>int</type><methodname>tidy_get_status</methodname>
      <methodparam><type>resource</type><parameter>tidy</parameter></methodparam>
+    </methodsynopsis>
+    <para>Object oriented style:</para>
+    <methodsynopsis>
+     <type>int</type><methodname>tidy->getStatus</methodname>
+     <void />
     </methodsynopsis>
     <para>
      <function>tidy_get_status</function> returns the status for the specified
http://cvs.php.net/diff.php/phpdoc/en/reference/tidy/functions/tidy-getopt.xml?r1=1.1&r2=1.2&ty=u
Index: phpdoc/en/reference/tidy/functions/tidy-getopt.xml
diff -u phpdoc/en/reference/tidy/functions/tidy-getopt.xml:1.1 
phpdoc/en/reference/tidy/functions/tidy-getopt.xml:1.2
--- phpdoc/en/reference/tidy/functions/tidy-getopt.xml:1.1      Tue Nov  4 08:26:55 
2003
+++ phpdoc/en/reference/tidy/functions/tidy-getopt.xml  Sat Jul  3 11:47:18 2004
@@ -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-getopt">
    <refnamediv>
     <refname>tidy_getopt</refname>
@@ -10,13 +9,66 @@
    </refnamediv>
    <refsect1>
     <title>Description</title>
+    <para>Procedural style:</para>
     <methodsynopsis>
      <type>mixed</type><methodname>tidy_getopt</methodname>
+     <methodparam><type>resource</type><parameter>tidy</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>
+     <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
+     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>.
+    </para>
+    <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);
+
 
-     &warn.undocumented.func;
+var_dump($tidy->getOpt('accessibility-check')); //integer
+var_dump($tidy->getOpt('lower-literals')); //boolean
+var_dump($tidy->getOpt('alt-text')); //string
 
+?>
+]]>
+      </programlisting>
+      <para>
+       The above example will output:
+      </para>
+      <screen>
+<![CDATA[
+int(3)
+bool(true)
+string(9) "some text"
+]]>
+      </screen>
+     </example>
+    </para>
    </refsect1>
   </refentry>
 

Reply via email to