Validating Your Pages with Tidy


AddOutputFilterByType   TIDY    text/html application/xhtml+xml TidyOption char-encoding utf8


Independently of whether you have dynamically generated or hand-coded your HTML pages, if they contain markup errors, they may not display correctly in all browsers. Tidy is a useful command-line tool that is able to process malformed HTML and XML, correct many common mistakes, and produce standards-compliant output. You can download it from http://tidy.sourceforge.net/.

You can run Tidy from the command line over static files or, thanks to mod_tidy and the Apache 2 filter architecture, process content being served on-the-fly. This example shows how to use the SetFilter directive to associate a Tidy filter with XML and HTML files and how to use TidyOption to configure the behavior of the Tidy engine. Apache filter architecture and configuration is described in Chapter 11. You can download mod_tidy from

http://home.snafu.de/tusk/mod_tidy/.


A related Apache 2 module is mod_validator, which can be downloaded from

http://www.webthing.com/software/mod_validator/.





Apache(c) Phrase Book(c) Essential Code and Commands
Apache Phrasebook
ISBN: 0672328364
EAN: 2147483647
Year: 2006
Pages: 254

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net