[ZPT] HTMLParseError confusion

Dieter Maurer dieter@handshake.de
Sat, 11 Aug 2001 09:42:12 +0200 (CEST)


Ron Bickers writes:
 > >  >  TAL.HTMLParser.HTMLParseError: EOF in middle of entity or
 > > char ref, at line
 > >  > 199, column 20
 > 
 > > Search for an '&' followed by something that does not follow
 > > the SGML entity/charref syntax.
 > 
 > Sure enough, there was an & on line 95, as in 'Ernst & Young' instead of
 > 'Ernst & Young'.  That fixed it, but why did the error refer to a
 > line/column that wasn't anywhere near the problem?
Probably because the parser started at the "&" and looked for a
matching ';'. It stopped when it reached a closing tag because
it knew that the looked for ';' must not be beyond that tag.

As space is not allowed in entity names (with the
standard SGML declaration), the parser could probably recognize
the problem earlier, facilitating localizing the problem:

    ===> Feature request for the ZPT Tracker


Dieter