[Bug 2406] when link tag is ended with / in header validator parses off by one

http://www.w3.org/Bugs/Public/show_bug.cgi?id=2406





------- Comment #4 from ot@w3.org  2007-02-28 03:07 -------
(In reply to comment #3)
> This sounds like the problem I have.  I am using the Link tag for a CSS
> stylesheet and am trying to be both HTML 4.01 Strict and XHTML 1.0 Strict
> compliant. 

You can't do that. It's like saying you want to say a sentence that will make
sense in both Italian and Spanish. That may be possible, but in most cases, it
won't.

> <link rel="stylesheet" type="text/css" href="../mysitestyle.css"/>

 /> is a tag ending specific to XML (and thus XHTML), but in HTML 4.01, it
means something totally different: it means end of tag followed by the angle
bracket. That's invalid in <head>, where character data (outside of tags) is
not allowed.

> This is XHTML 1.0 Strict compliant (and validates properly).

Yes.

  However, when
> validating for HTML 4.01 Strict (as is what the page is presently designed to
> use), it returns the error described by "arl (Ari Lemmke)".

Yes, and that's correct. 

You have to choose one document type and stick to it.

Received on Wednesday, 28 February 2007 03:08:08 UTC