Re: Semicolon after entities

On Wed, 25 Apr 2007, Lachlan Hunt wrote:

> HTML5 has simplified the document conformance rules to require a semi-colon 
> in all cases.
- -
> Those are just example situations when the semi-colon may be omitted, not an 
> exhaustive list of all situations.  The '=' character is another case where 
> it can be omitted per SGML rules, along with several others.
>
> That behaviour needs to be retained for backwards compatibility so that sites 
> using entity refs without semi-colons won't break.

Thus, it seems that HTML5 effectively retains the old HTML policy: the 
semicolon is not required before a name character, but it is recommended.

If you first specify a requirement on documents (always use ";") and then 
specify mandatory error processing related to it (browsers must recognize 
entity references without ";"), then you have effectively defined the 
error as a feature, though a deprecated one. But you can proclaim that you 
have now defined a stricter version of the language. :-)

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

Received on Wednesday, 25 April 2007 05:28:28 UTC