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

RE: JTidy, XHTML, xmlns, and DOCTYPE

From: Evan Lenz <elenz@xyzfind.com>
Date: Thu, 31 Aug 2000 11:21:01 -0700
To: <html-tidy@w3.org>

I figured it out after a quick glance at the Java source code.


It usually happens that way.  As soon as I send my long request to the list,
I figure it out.  Sorry.


-----Original Message-----
From: html-tidy-request@w3.org [mailto:html-tidy-request@w3.org]On
Behalf Of Evan Lenz
Sent: Thursday, August 31, 2000 11:10 AM
To: html-tidy@w3.org
Subject: JTidy, XHTML, xmlns, and DOCTYPE

I'm trying to use JTidy to turn HTML into well-formed XHTML suitable for
XSLT processing.  The Linux command-line tidy -asxml worked fine for me.
JTidy, however, is not including the XHTML namespace declaration or the
XHTML DOCTYPE declaration in the output.  I believe that it's *trying* to
output XHTML, as it turns, for example, <br> into <br />.

My stylesheet is written to handle elements in the XHTML namespace, so this
is a problem (which I could get around by changing my stylesheet).  The
second problem is that Tidy does not convert &nbsp; to a numeric character
entity reference and thus must rely on the DTD to declare &nbsp;.  As I
mentioned, this works fine for tidy -asxml, but not for JTidy.

This is how I'm invoking JTidy:

        Tidy tidy = new Tidy();
        tidy.parse(in, out);

Am I leaving anything out?  Is there some option I need to change?


Evan Lenz
XYZFind Corp. "Building Better Search"
Received on Thursday, 31 August 2000 14:18:51 UTC

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