W3C home > Mailing lists > Public > www-style@w3.org > November 2005

Re: [css21] whitespace in URI values

From: Boris Zbarsky <bzbarsky@mit.edu>
Date: Fri, 11 Nov 2005 22:52:50 -0600
Message-ID: <43757522.5080001@mit.edu>
To: Anne van Kesteren <annevk@opera.com>
CC: "www-style@w3.org" <www-style@w3.org>

Anne van Kesteren wrote:
> Can someone explain to me what the following means:
> * "url("{w}{string}{w}")"  {return URI;}

This means that if you have:

1)  The characters 'u', 'r', 'l', '(' in that order.  Followed by
2)  Optional whitespace.  Followed by
3)  A string.  Followed by
4)  Optional whitespace.  Followed by
5)  The character ')'

then that is a URI token.  The point is, the whitespace is _outside_ the string. 
  That's a little non-obvious from the quoting above that makes it look like 
it's saying "{w}{string}{w}", but it's really saying: "url("  {w}{string}{w} 
")" (spaces inserted for clarity).  That is, you can write:

   @import url( "test.css" );

if you want, and it's the same as:

   @import url("test.css");

> Which URIs would load if I had:
> 1. @import url("\Atest.css");
> 2. @import url(" test.css");

This is an interesting question, I agree; not really related to the part of 
Appendix G you quoted, though.

Received on Saturday, 12 November 2005 04:53:06 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:21 UTC