On Mon, 27 Jun 2005, David Håsäther wrote:
Alan J. Flavell <fl*****@ph.gla.ac.uk> wrote:
On Mon, 27 Jun 2005, David Håsäther wrote:
[ "ścią". ]
It _will_ work (for HTML, not XHTML) since the parsing for the
numeric character reference will end with the first non-digit, in
this case "c".
No. Some client agents may choose that fixup, but I challenge you
to produce any authoritative specification which requires it.
The SGML Handbook (353:3) says (emphasis mine)
[...]
OK, I have to admit that this SGML detail was not known to me, and it
appears you are correct about that.
However, the HTML specification (parts displayed in black)
does not include this option - see
http://www.w3.org/TR/html4/charset.html#h-5.3
Indeed there is a note (in green) stating:
Note. In SGML, it is possible to eliminate the final ";" after a
character reference in some cases (e.g., at a line break or
immediately before a tag). In other circumstances it may not be
eliminated (e.g., in the middle of a word). We strongly suggest using
the ";" in all cases to avoid problems with user agents that require
this character to be present.
And all of their recipes and examples include the terminating
semicolon.
So although I concede that you may be technically correct on the SGML
front, I think it's overstating the case to claim that it's true for
HTML.
(Modulo the usual arguments about "the HTML specification purports to
exclude some features of SGML which SGML does not permit to be
excluded.)
thanks.