Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^4: Wanted, more simple tutorials on testing

by wazoox (Prior)
on Jul 24, 2005 at 11:38 UTC ( #477554=note: print w/replies, xml ) Need Help??


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

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.
  • Comment on Re^4: Wanted, more simple tutorials on testing

Replies are listed 'Best First'.
Re^5: Wanted, more simple tutorials on testing
by adrianh (Chancellor) on Jul 24, 2005 at 15:56 UTC
    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.
        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
Node Status?
node history
Node Type: note [id://477554]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2020-06-01 23:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?



    Results (12 votes). Check out past polls.

    Notices?