W3C home > Mailing lists > Public > www-style@w3.org > May 2008

Re: [CSS2.1] syntax: url() and unexpected end of (line / style sheet)

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Wed, 14 May 2008 18:46:48 +0200
To: Zachary Weinberg <zweinberg@mozilla.com>
Cc: www-style <www-style@w3.org>
Message-ID: <kl4m24p652mroio0860utoi7iov5d6ge2r@hive.bjoern.hoehrmann.de>

* Zachary Weinberg wrote:
>1) "User agents must close all constructs (nonexhaustive list) at the
>end of the style sheet."  Because URI is a single token rather than a
>grammar production, it is not clear whether it counts as a "construct"
>for this rule.

No, a token cannot be open in this sense (they may be open in the sense
that the next character may also be part of the token, but they cannot
end prematurely, either the text you have matches the production, or it
is not that token). So you parse it like other tokens, in your example

>  <style>#foo { background-image: url("picture.png</style>

close the string, close the ), and have an unknown functional notation.
Or perhaps a known one, that is indeed something that should be defined.

>2) "User agents must close strings upon reaching the end of a line, but
>then drop the construct in which the string was found."  A URI token is
>not a string, even if it uses the quoted form.  Should this rule apply
>anyway, and if so, which forms should it apply to? Consider eg.
>  <style>#foo { background-image: url(data:image/png;base64,
>YJgAhAkAB4gB4Ry+pcoAAAAASUVORK5CYII=) }</style>

In the quoted form the string is a string and the rule applies. In this
form the thing as a whole does not match the URI production, so this is
not a URI token. So the same as above.

I can't answer your Tangential question 1, but I do note it is usually
best to split independent questions into independent threads (and en-
able automatic line wrapping after ~72 columns in your mail reader).

>Tangential question 2: Is there any |value|, either in CSS2.1 or any
>proposed CSS3 module, whose syntax contains square brackets?  Without
>one I cannot think of a way to test end-of-style-sheet processing for
>open square brackets.

Square bracket blocks are part of "any" in CSS 2.1, which is part of
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Wednesday, 14 May 2008 16:54:11 UTC

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