W3C home > Mailing lists > Public > html-tidy@w3.org > January to March 2007

Re: Preventing Tidy from eating spaces

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Sun, 04 Feb 2007 01:58:58 +0100
To: Elliotte Harold <elharo@metalab.unc.edu>
Cc: Trevor Harmon <trevor@vocaro.com>, html-tidy@w3.org
Message-ID: <6kbas2lc9aeplaupa929vlkb8cfloob92o@hive.bjoern.hoehrmann.de>

* Elliotte Harold wrote:
>Bjoern Hoehrmann wrote:
>> There is not. The problem here is that all white space in XML documents
>> is potentially significant, so Tidy could not add or remove any of it,
>Tidy does not work on XML documents. It works on HTML documents, and in 
>such documents we know exactly where and how white space is and is not 

Tidy does have limited XML support, see the -xml option and --input-xml
configuration options. And yes, the same applies to HTML documents; most
browsers treat most white space in HTML documents as significant while
Tidy considers most of it insignificant and so it is easy to construct
documents that break after tidying. It just so happens Tidy makes much
better assumptions in HTML mode than in XML mode.
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Sunday, 4 February 2007 00:59:10 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:56 UTC