W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2013

Re: [whatwg] Attribute value (double-quoted) state

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Mon, 25 Mar 2013 12:57:11 +0100
To: "Mohammad Al Houssami (Alumni)" <mha53@mail.aub.edu>
Message-ID: <49e0l8595rj7oos1qq4gpl9v7sv36jthap@hive.bjoern.hoehrmann.de>
Cc: "whatwg@lists.whatwg.org" <whatwg@lists.whatwg.org>
* 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@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/ 
Received on Monday, 25 March 2013 11:57:37 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:20 UTC