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_GET_ERROR_BUFFER(3)						 1						  TIDY_GET_ERROR_BUFFER(3)

tidy::$errorBuffer - Return warnings and errors which occurred parsing the specified document

       Object oriented style (property):

SYNOPSIS
string$tidy->errorBuffer () DESCRIPTION
Procedural style: string tidy_get_error_buffer (tidy $tidy) Returns warnings and errors which occurred parsing the specified document. PARAMETERS
o $tidy - The Tidy object. RETURN VALUES
Returns the error buffer as a string. EXAMPLES
Example #1 tidy_get_error_buffer(3) example <?php $html = '<p>paragraph</p>'; $tidy = tidy_parse_string($html); echo tidy_get_error_buffer($tidy); /* or in OO: */ echo $tidy->errorBuffer; ?> The above example will output: line 1 column 1 - Warning: missing <!DOCTYPE> declaration line 1 column 1 - Warning: inserting missing 'title' element SEE ALSO
tidy_access_count(3), tidy_error_count(3), tidy_warning_count(3). PHP Documentation Group TIDY_GET_ERROR_BUFFER(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