W3C home > Mailing lists > Public > www-validator-css@w3.org > February 2010

Re: Possible bug in CSS Validator

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Sat, 20 Feb 2010 00:02:18 +0200
Message-ID: <95C29FC2763E446CA3DCBA437CD1447F@JukanPC>
To: "Douglas Perreault CPA* CITP" <doug@perreault.us>, <www-validator-css@w3.org>
Douglas Perreault CPA* CITP wrote:

> Note that RFC 3986 discusses URIs in
> general whereas the CSS uses URLs in particular.

There is no real difference between the two. "URIs" are just 
standardese-talk for URLs

> I still believe the
> URN portion of a URL cannot contain a non-encoded semicolon and so
> the URL reference in the style sheet simply cannot end in a semicolon.

There is no such thing as the URN portion of a URL.

Regarding semicolons in URLs (or URIs if you insist), check RFC 3986 clause 
5.4.1, which contains three examples of such URLs - and it carries the 
heading "Normal Examples".

> My question, and the point of my e-mail, remains -- have you ever
> actually seen the use of a semicolon at the end of a URL in a CSS
> style sheet where it was done on purpose?

Would it matter if someone replied "Yes"?

> So would there really be any harm in putting in such a warning?

Yes. Heuristic guesses tend to cause harm. We have seen it in the W3C Markup 
Validator, which has thoroughly confused many people with various guesses.

It's tempting to add heuristics to diagnostics. Been there, done that. If 
you are very careful and cautious, you might help people more than harm them 
that way. Much more often, programmers who add heuristics just outsmart 
themselves and confuse people.

For one thing, if a checker warns about, say, a trailing semicolon in a URL, 
won't people expect it to warn about many other problems and issues in URLs 
as well? Where would this end? Even a URL parser would be far from trivial, 
and if you add heuristics that detect "issues" in URLs that have no error in 
their syntax, wouldn't it be fair to expect that your nice checker also 
detects such a trivial thing as a URL that refers to a nonexisting resource 
(i.e., creates a 404 error)? Or a background image URL that refers to a 
non-image resource? Or an image with insufficient contrast with text color? 
Or an ugly image?

> It would save us hours of effort trying to figure out why a
> background image isn't showing.

As I wrote previously, URL checking is not a job for a CSS checker.

> It would seem adding a warning for this
> would be the right thing to do.

It may seem so, but it's a trap, and I sincerely hope people working with 
the W3C CSS Validator won't fall into it.

Yucca, http://www.cs.tut.fi/~jkorpela/ 
Received on Friday, 19 February 2010 22:04:12 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:40:46 UTC