- From: Lachlan Hunt <lachlan.hunt@iinet.net.au>
- Date: Wed, 08 Sep 2004 18:35:17 +1000
- To: Umpa lump <umpalump@poczta.neostrada.pl>
- CC: www-validator@w3.org
Umpa lump wrote: > There is a certain bug in Validator. When parsing LINK and META tags: > Validator returns error when one of above tag is closed with "/>", but > everything works fine were closing with ">" > eg: > in source code: > '<meta http-equiv="content-style-type" content="text/css" />' > ^ > returns error: "character data is not allowed here" It's not a bug, it's the SGML SHORTTAG feature. In HTML (not XHTML) The trailing '/' before the '>' actually closes the tag, and closes the whole element in the case of EMPTY elements, such as meta and link. Therefore, the '>' is actually a character after the meta element and in the head, where there is no character allowed. See appendix B [1] of the HTML 4.01 spec for a brief description of SHORTTAG. If your going to use the XML syntax, then you should use an XHTML DOCTYPE. If you're going to use an HTML 4 DOCTYPE, then don't use the XML syntax for empty elements. [1] http://www.w3.org/TR/html401/appendix/notes.html#h-B.3.7 -- Lachlan Hunt http://www.lachy.id.au/
Received on Wednesday, 8 September 2004 08:35:54 UTC