Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

tidy_access_count(3) [php man page]

TIDY_ACCESS_COUNT(3)							 1						      TIDY_ACCESS_COUNT(3)

tidy_access_count - Returns the Number of Tidy accessibility warnings encountered for specified document

SYNOPSIS
int tidy_access_count (tidy $object) DESCRIPTION
tidy_access_count(3) returns the number of accessibility warnings found for the specified document. PARAMETERS
o $object - The Tidy object. RETURN VALUES
Returns the number of warnings. EXAMPLES
Example #1 tidy_access_count(3) example <?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>'; // 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 ?> NOTES
Note Due to the design of the TidyLib, you must call tidy_diagnose(3) before tidy_access_count(3) or it will return always 0. You must also need to enable the accessibility-check option. SEE ALSO
tidy_error_count(3), tidy_warning_count(3). PHP Documentation Group TIDY_ACCESS_COUNT(3)

Check Out this Related Man Page

TIDY_GETOPT(3)								 1							    TIDY_GETOPT(3)

tidy::getOpt - Returns the value of the specified configuration option for the tidy document

       Object oriented style

SYNOPSIS
mixed tidy::getOpt (string $option) DESCRIPTION
Procedural style mixed tidy_getopt (tidy $object, string $option) Returns the value of the specified $option for the specified tidy $object. PARAMETERS
o $object - The Tidy object. o $option - You will find a list with each configuration option and their types at: http://tidy.sourceforge.net/docs/quickref.html. RETURN VALUES
Returns the value of the specified $option. The return type depends on the type of the specified one. EXAMPLES
Example #1 tidy_getopt(3) example <?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 ?> The above example will output: int(3) bool(true) string(9) "some text" PHP Documentation Group TIDY_GETOPT(3)
Man Page

2 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk modify multiple columns with pipes

Hello, I have a CSV-like dataset where some of the columns contain HTML snippets which I need to convert to XHTML. For any given snippet, I have a functioning config for the text processor 'tidy' such that tidy -config tidy.cfg example.html does the job I need done. I would like to process... (10 Replies)
Discussion started by: bstamper
10 Replies

2. Shell Programming and Scripting

Delete all lines ending with /

I have a text file with contents given below: file:///About/ file:///About/accessibility.html file:///About/disclaimer.html file:///About/disclaimer.html#disclaimer file:///About/glance/contact_info.html file:///books/ file:///bookshelf/br.fcgi?book=helppubmed&part=pubmedhelp... (6 Replies)
Discussion started by: shoaibjameel123
6 Replies