[whatwg] Attribute value (double-quoted) state

Bjoern Hoehrmann derhoermi at gmx.net
Mon Mar 25 04:57:11 PDT 2013


* Mohammad Al Houssami (Alumni) wrote:
>Hello everyone,
>Can someone explain wat is meant in the attribute value double quoted state in the tokenization specs : http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#attribute-value-%28double-quoted%29-state
>It says the below.
>U+0026 AMPERSAND (&)
>Switch to the character reference in attribute value state<http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#character-reference-in-attribute-value-state>, with the additional allowed character<http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#additional-allowed-character> being U+0022 QUOTATION MARK (").
>What does the additional allowed character mean? It says the following:

It's essentially an input parameter to "consume a character reference".
In the particular example, the idea is, "consume a character reference"
should look for `"` because the surrounding context, "double quoted"
attribute values, uses `"` as closing delimiter. Without the parameter,
there would have to be many "consume a character reference" variants,
like "consume a character reference in a double quoted attribute value",
or character references would have to be looked for in a second pass (so
you would first find the closing `"` and then re-parse the value to look
for character references since you skipped that in the first pass).
-- 
Björn Höhrmann · mailto:bjoern at hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 



More information about the whatwg mailing list