W3C home > Mailing lists > Public > html-tidy@w3.org > July to September 2000

JTidy and Error in Dom Construction

From: Scott Dossett <sdossett@metaphoria.net>
Date: Tue, 11 Jul 2000 08:43:01 -0400
Message-ID: <00eb01bfeb35$8d22b7c0$046f10ac@duesenberg>
To: "HTMLTidy" <html-tidy@w3.org>
The DOM model constructed by JTidy for HTML seems to be erroneous.  When
JTidy parses HTML it produces a DOM for the HTML.  When attempting to
traverse this model, I have found that it does not get the structure
correct.  For example, given the following code from Netcenter:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0025)http://home.netscape.com/ -->
<META content="text/html; charset=windows-1252"
<SCRIPT language=JavaScript type=text/javascript><!--
if (parseFloat(navigator.appVersion) <
else if
1.html";}// --></SCRIPT>

When getting the parent of the <SCRIPT ...> tag here (via the org.w3c.dom
package included with JTidy), JTidy returns:

<META content="text/html; charset=windows-1252" http-equiv=Content-Type>

as its parent, where the <HEAD> tag should be returned as its parent.  This
appears to be an error in JTidy.  Response/suggestions/reprimands are

Received on Tuesday, 11 July 2000 08:37:19 UTC

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