[imps] Standardizing "parse error" messages

Edward Z. Yang edwardzyang at thewritingpot.com
Mon Jan 12 11:42:09 PST 2009

Henri Sivonen wrote:
> The problem with standardizing error messages is that it forbids
> competition by providing better error messages.

So, the desired end result of standardized error messages is that, if
you don't feel like providing better error messages, you can use
something pre-canned.

> For example, the Validator.nu HTML Parser maintains tokenizer state that
> is unnecessary for parsing per se but useful for error messages. (The
> particular bit of state is the source position of the ampersand when
> parsing something that might turn out to be a character reference.)
> I think the Validator.nu HTML Parser shouldn't be in violation of the
> spec for doing this, but also parsers that don't want to spend cycles
> for maintaining message-only state shouldn't be required to.

That's a good argument for not including it in the HTML5 spec. Still,
the location of "emit a Parse Error" in the HTML5 spec is perhaps the
most unambiguous way of specifying these parse errors. Maybe we just
publish an alternate version with error names?


More information about the Implementors mailing list