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

Bug report: LINK tag not well-formed in output

From: Evan Lenz <elenz@xyzfind.com>
Date: Wed, 6 Sep 2000 11:00:20 -0700
To: <html-tidy@w3.org>
Message-ID: <BNEMICIEADHDDOIKLHNCGEOHCDAA.elenz@xyzfind.com>

In testing my servlet which uses Tidy before doing XSLT processing, I've
been uploading copies of various HTML pages on the Internet.

This code:

<STYLE>
<LINK REL="stylesheet"
HREF="http://www.thestreet.com/tsc/common/stylesheets/global.css"
TYPE="text/css">
</STYLE>

Resulted in (XHTML mode):

<LINK REL="stylesheet"
HREF="http://www.thestreet.com/tsc/common/stylesheets/global.css"
TYPE="text/css">


Besides the fact that it's not XHTML (lower case), it's not well-formed, as
it should be an empty element.

I understand what the problem is here: <LINK> should be under <HEAD>, not
<STYLE>.  For my application, I don't particularly care if the XHTML output
is valid or not, but I definitely care if it's well-formed.

It would be nice if there was a way to incorporate, say, a SAX parser to
ensure the output is well-formed, and give the user options as to what to do
when it's not well-formed.  I would like a method returning true or false,
to let me know whether I should go on or not.

What exactly is the criterion for Tidy outputting something versus nothing?
In this case, <LINK> in its context, should be an unrecognized element...

Any further thoughts on this would be appreciated.

Thanks,

Evan Lenz
elenz@xyzfind.com
http://www.xyzfind.com
XYZFind Corp. "Building Better Search"
Received on Wednesday, 6 September 2000 13:57:52 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:44 GMT