Daniël: Did you test your own examples? In all my browsers, the first one works and the second one doesn't.
Tom: The relevant document to quote is the SGML standard (for HTML) or the XML standard (for XHTML). Luckily the XHTML standard has a nice little writeup of the issue:
http://www.w3.org/TR/xhtml1/#C_12
(notice the example given)