Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: Wanted, more simple tutorials on testing

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


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

Better than that, there's HTML-Tidy. It's basically the same as the w3c validator,

While tidy is certainly a useful app it is nothing like the W3C validator. It doesn't do verification against doctypes, doesn't recognise use of meta tags to set character encoding, etc.

Replies are listed 'Best First'.
Re^4: Wanted, more simple tutorials on testing
by wazoox (Prior) on Jul 24, 2005 at 11:38 UTC
    Hum, are we talking about the same app? 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.
      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.

        Alright. However "tidy" will correct the error with tidy test.html or tidy -i test.html.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-03-28 21:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found