Re: <br> tag incorrect, but validates anyway

On Tue, 19 Dec 2006, David Dorward wrote:

> The validator gives a warning, but I think this should be an error. I
> don't know enough about XML to say for sure.

A construct like < /br> is in error by the XML specification. Clause 2.4 
clearly says:
"The ampersand character (&) and the left angle bracket (<) MUST NOT 
appear in their literal form, except when used as markup delimiters, or 
within a comment, a processing instruction, or a CDATA section."

I guess the explanation for the warning is that the markup validator is 
really an SGML validator that has been flavored a little to act as a 
kind-of XML validator as well.

Given the importance of XML, including its role in the W3C policy 
statements and declarations, it is really odd that there is no real XML 
validator available at the www.w3.org site - and the markup validator does 
not even check "well-formedness" correctly. Playing the formal games of 
validation and things like that, I'd expect the players to start playing 
them _by the rules_ at some point.

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/

Received on Tuesday, 19 December 2006 17:09:03 UTC