Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^5: Wanted, more simple tutorials on testing

by adrianh (Chancellor)
on Jul 24, 2005 at 15:56 UTC ( [id://477574]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Wanted, more simple tutorials on testing
in thread Wanted, more simple tutorials on testing

Mine verify doctypes and even convert from a doctype to another (for instance from html 4.01 transitional to strict, or to xhtml 1.0 strict, etc). It also corrects character encodings IIRC.

Tidy does some nice things, but it doesn't do the checks that the W3C validator does - it's not doing a full parse of the HTML based on the docs.

For example the W3C Markup Validation Service will catch the error in this broken XHTML:

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-s +trict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>A random test file</title> </head> <body> <P>Oops - XHTML tags must be in lower case</p> </body> </html>

but tidy thinks it's fine:

% tidy -e test.html Info: Doctype given is "-//W3C//DTD XHTML 1.0 Strict//EN" Info: Document content looks like XHTML 1.0 Strict No warnings or errors were found. To learn more about HTML Tidy see http://tidy.sourceforge.net Please send bug reports to html-tidy@w3.org HTML and CSS specifications are available from http://www.w3.org/ Lobby your company to join W3C, see http://www.w3.org/Consortium

I'm not saying tidy isn't useful. It's a great tool from basic checks and fixes on HTML. But it doesn't validate (X)HTML.

Replies are listed 'Best First'.
Re^6: Wanted, more simple tutorials on testing
by wazoox (Prior) on Jul 24, 2005 at 17:12 UTC
    Alright. However "tidy" will correct the error with tidy test.html or tidy -i test.html.
      Alright. However "tidy" will correct the error with tidy test.html or tidy -i test.html.

      Yup. Tidy is an excellent tool for fixing many mistakes in HTML. Just not a good one for strict validation.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://477574]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-25 07:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found