Re: Preventing Tidy from eating spaces

* 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 
>significant.

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