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

Re: question about Tidy

From: Gary L Peskin <garyp@firstech.com>
Date: Mon, 12 Feb 2001 23:08:09 -0800
Message-ID: <3A88DD59.E6526AF0@firstech.com>
To: Chunbo Shao <cxs0187@omega.uta.edu>
CC: sami@lempinen.net, dsr@w3.org, html-tidy@w3.org
Chunbo Shao wrote:
> Hi, Gary
> I am TRULY glad you still remember me. You are so kind. I think we
> will definitely have a chance to talk in the future. May be very soon,
> maybe within this year. Or even face to face ? I hope I can say thanks to
> you directly like that.
> You exactly hit the point of my question.
> I have some knowledge of interface and implements in java. I am still not
> clear enough about my question in last email to you. Because when I see
> inside of the source code of Tidy.java, the return type of parseDOM()
> is org.w3c.dom.Document, which is not org.w3c.tidy.DOMNodeImpl.
> I know dom.Document extends dom.Node, which means dom.Document is a
> dom.Node. And I also know tidy.DOMNodeImpl implements dom.Node.......I am
> totally confused with all these "cross" relations. (because the
> implementation of the methods in dom.Node interface is in tidy.DOMNodeImpl
> class.)
> Help me.

Yes.  This is very confusing.  DOMDocumentImpl extends DOMNodeImpl (and
implements org.w3c.dom.Document).  So a DOMDocumentImpl is a Document as
well as a Node.  To really sort this out for yourself, you should take
each of the classes in the JTidy source and create a simple class
diagram that will show you the inheritance relationships of each of the

> By the way, what is the difference between tidy.Node and dom.Node?

These are two completely different classes.

Received on Tuesday, 13 February 2001 02:08:10 UTC

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