- From: Jukka K. Korpela <jkorpela@cs.tut.fi>
- Date: Mon, 8 Mar 2010 16:44:25 +0200
- To: <www-validator@w3.org>
- Cc: <dlavelle@notes.cc.sunysb.edu>
Dag-Erling Smørgrav wrote:
> dlavelle@notes.cc.sunysb.edu writes:
>> Validating the following fails. Is that correct?
>
> I don't understand why you're asking, since...
>
>> <option
>> value="mercedes"selected='selected'>Mercedes</option> <!-- put a
>> space between {value="mercedes"} and {selected='selected'} to remove
>> the error: Error Line 15: Extra content at the end of the
>> document.-->
>
> ...clearly you know the answer.
Apparently he (or whoever wrote the markup) knows how to fix the markup, but
judging from the start of the message and the Subject line, he
1) was not sure whether it's really an error to write attribute
specifications without whitespace between them
2) wonders why the error message says "Extra content at the end of the
document" and refers to the line containing the end tag </html>, instead of
giving any hint of the actual error.
Checking back some past discussions, I'd respond:
1) It is an error in XHTML. It is not an error in HTML (though it isn't
recommendable).
2) The validator used to fail to detect this error at all when processing
XHTML, though the W3C CSS Validator (!) detected it. It seems that it now
detects the problem, which is an improvement, but fails to report it
properly.
It is an improvement even in the practical sense, for those who use XHTML
for a good reason, e.g. because they process their documents using
non-browser software that needs its input to be well-formed XML. Markup
errors that mean nothing to tag slurpers (browsers) _may_ cause unexpected
results in processing based on the assumption of XML well-formedness. Of
course, to the great majority of authors who use XHTML just because they
have been misled into thinking it's cool, the error message is just
confusing.
--
Yucca, http://www.cs.tut.fi/~jkorpela/
Received on Monday, 8 March 2010 14:45:27 UTC