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

Re: tidy - ? html tree number

From: Gary L Peskin <garyp@firstech.com>
Date: Mon, 08 Jan 2001 22:10:09 -0800
Message-ID: <3A5AAB41.95F1B0A3@firstech.com>
To: Chunbo Shao <cxs0187@omega.uta.edu>
CC: html-tidy@w3.org
Chunbo Shao wrote:
> Many many thanks to your kind help. I attach my files to you. Actually, i
> just use the example java file TestDOM class in "jtidy.html" which is from
> the tidy package. My html file is out0.html. "resu" is the output by
> running "java TestDOM out0.html > resu". Please see the "resu" file and
> "out0.html", the "len" for <html> is 1, not 2. But it should be 2. Because
> it has <head> and <body> in "out0.html". And, the "len" for <head> in
> "resu" is 1, not 3. But it should be 3 because <meta>, <script> and
> <title> are 3 children of <head> in "out0.html".

Okay, Chunbo, I've found the problem.  My clue was the warning messages
received from running TestDOM.  I received the message:

line 10 column 1 - Warning: unexpected </head> in <meta>

This was a hint that something was wrong since </head> seems to be
perfectly okay.  Upon reviewing TestDOM.java, I see the line:


This tells JTidy to treat the input as XML, not as HTML.  If you comment
out this line, then the input will be treated as HTML and everything
will behave as you expect.

Received on Tuesday, 9 January 2001 01:10:19 UTC

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