Re: [CSS21] url() parsing

On 22.04.2011, at 23:18, fantasai wrote:

> I believe this testcase
>  http://test.csswg.org/suites/css2.1/20110323/html4/uri-015.htm
> 
>  background: red U\r\4c ("support/swatch-green.png");
> 
> is wrong according to the core grammar.

I don't think so. Though "U\r\4c (" parses in the core grammar to a FUNCTION token with value "Url(", which after applying the case-insitivity rule per [1] is equivalent to "url(", there's no wording in [2] that suggests that the character sequence "url(" that starts a URI value needs to be the URI token, it could also be a FUNCTION token.

It follows that "Url(" as appearing in the testcase must be treated as an URI value as per CSS21, section 4.3.4, making the test case correct.

-chris

[1] http://www.w3.org/TR/CSS21/syndata.html#characters
[2] http://www.w3.org/TR/CSS21/syndata.html#uri

Received on Saturday, 23 April 2011 23:18:23 UTC