- 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.
tidy.setXHTML(true);
It usually happens that way. As soon as I send my long request to the list,
I figure it out. Sorry.
Evan
-----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 to a numeric character
entity reference and thus must rely on the DTD to declare . 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.setXmlOut(true);
tidy.parse(in, out);
Am I leaving anything out? Is there some option I need to change?
Thanks,
Evan Lenz
elenz@xyzfind.com
http://www.xyzfind.com
XYZFind Corp. "Building Better Search"
Received on Thursday, 31 August 2000 14:18:51 UTC