- From: Brian Gilkison <gilkison@one.net>
- Date: Wed, 2 Feb 2000 02:12:31 -0500
- To: <www-validator@w3.org>
- Cc: <marc@kalle.yodanet.schwaebischhall.de>
Marc A. Donges said: > I recently tried to make my documents, which complied with HTML 4.0 > Transitional, as compatible with XHTML 1.0 as possible (whithout > switching the DTD yet). > > So I edited the documents for XML wellformedness. I converted "<HR>" to > "<hr />", which was OK for the validator. When changing a "<LINK [...]>" > element to "<link [...] />", the HTML-validator started reporting errors. I think the problem (and others will correct me if I'm wrong) is that a document can't be both HTML4 AND XHTML1 compliant at the same time. My interpretation has been that the backwards-compatibility tags -- converting <HR>, for example, into <hr /> -- is for backwards compatibility with exisiting user-agents (i.e. browsers, etc.). The clue to me is that you stated you had changed the DOCTYPE in your code yet; if you look at the parse tree from the sample URL you gave, you'll notice that after your <link> statement, there are two <BODY> tags. I'd assume that the closing ' />' on the <link>, combined with and HTML 4 DOCTYPE, is what's causing the problem. Switch the DOCTYPE to XHTML and re-run the validator. Brian Gilkison gilkison@one.net
Received on Wednesday, 2 February 2000 02:12:53 UTC