Re: [VE][libxml2-5] Confusing error when validating

Dag-Erling Smørgrav, Mon, 08 Mar 2010 15:04:00 +0100:
> dlavelle [at] … 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.

This issue is that different HTML variants as well as different 
validators have different requirements:

According to the W3C validator, whitespace is not needed between 
attributes when the document is a HTML4 document. But /is/ necessary 
when the document is a XHTML document. In Validator.nu (whose source 
code is also used for HTML5 validation in the W3C validator), HTML - 
regardless of which version - has the same requirements as XHTML: 
attributes must be kept separate with whitespace.
-- 
leif halvard silli

Received on Monday, 8 March 2010 14:57:06 UTC