W3C home > Mailing lists > Public > html-tidy@w3.org > October to December 2002

Re: tidy, indentation and XML/SGML rules

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Sat, 12 Oct 2002 04:05:15 +0200
To: Fred.Bone@dial.pipex.com
Cc: html-tidy@w3.org
Message-ID: <3da8804b.191666441@smtp.bjoern.hoehrmann.de>

* Fred Bone wrote:
>> My problem is that tidy breaks lines between elements, like this :
>> <elem1><elem2>Content of elem2
>> is changed to
>> <elem1>
>>   <elem2>Content of elem2
>> The result is far easier to read, but...
>> the content of the document has been _changed_ : the newline between
>> <elem1> and <elem2> has been added.
>I'm no expert on XML, but as far as I can tell this would only be a 
>change of content if you have elem1 defined with 
>xml:space='preserve', and then only the blanks would be significant 
>(and not the newline).

No, Jany is right here, in XML by default all white space is significant
and as she points out, Tidy changes white space in the document. I
remember some feature requests regarding XML pretty printing and bug
reports on XML vs. Tidy's treatment of white space. I am not sure how
useful Tidy is for generic XML pretty printing...
Received on Friday, 11 October 2002 22:05:08 UTC

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