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_ERROR_COUNT(3)							 1						       TIDY_ERROR_COUNT(3)

tidy_error_count - Returns the Number of Tidy errors encountered for specified document

SYNOPSIS
int tidy_error_count (tidy $object) DESCRIPTION
Returns the number of Tidy errors encountered for the specified document. PARAMETERS
o $object - The Tidy object. RETURN VALUES
Returns the number of errors. EXAMPLES
Example #1 tidy_error_count(3) example <?php $html = '<p>test</i> <bogustag>bogus</bogustag>'; $tidy = tidy_parse_string($html); echo tidy_error_count($tidy) . " "; //1 echo $tidy->errorBuffer; ?> The above example will output: 1 line 1 column 1 - Warning: missing <!DOCTYPE> declaration line 1 column 8 - Warning: discarding unexpected </i> line 2 column 1 - Error: <bogustag> is not recognized! line 2 column 1 - Warning: discarding unexpected <bogustag> line 2 column 16 - Warning: discarding unexpected </bogustag> line 1 column 1 - Warning: inserting missing 'title' element SEE ALSO
tidy_access_count(3), tidy_warning_count(3). PHP Documentation Group TIDY_ERROR_COUNT(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