Re: [css21] whitespace in URI values

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.

-Boris

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