W3C home > Mailing lists > Public > www-validator@w3.org > April 2003

Re: [x]html head parsing bug in validator

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Sat, 26 Apr 2003 18:23:37 +0200
To: Gabor Hojtsy <gabor@hojtsy.hu>
Cc: www-validator@w3.org
Message-ID: <3ecbb1e3.183558783@smtp.bjoern.hoehrmann.de>

* Gabor Hojtsy wrote:
>First: if I try to use such constructs in the head, such as <link ... /> then 
>the validator thinks I am closing the head element, which seems quite buggy. 

The validator is right, the link element is closed by "/" and the ">" is
interpreted as character data and since character data is disallowed in
<head>, the validator closes the <head> and opens the <body> element,
just like

  <head>
    <link ...>
  </head>
  <body>&gt;

>Following on this, I have checked the HTML 4.01 spec and truly it says, that 
><link> ending tags are forbidden. But anyway, the validator should not think 
>that the <head> is closed...

SGML requires it to.

>Second: After my finding that <link> ending tag is forbidden, I decided to try 
>a <br /> in a body of a normal document. It works, and the validator does not 
>think I am closing the body tag (while <br> ending tags are also forbidden).
>http://validator.w3.org/check?uri=http%3A%2F%2Fgoba.hu%2Fvaltest2.html

<br /> is interpreted as <br></br>&gt;, that's indeed legal practise.
Received on Saturday, 26 April 2003 12:23:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:08 GMT