- From: olivier Thereaux <ot@w3.org>
- Date: Fri, 29 Feb 2008 12:08:32 -0500
- To: W3C CSS Validator ML <www-validator-css@w3.org>
Hello, Since this question comes up now and again in this list, I guess it's worth a quick mail… I think I figured out today the reason why some sites/stylesheets receive the ugly “ServletException: Timed out” when there is no apparent networking issue. Short answer: don't use the nonstandard "expression" syntax in your stylesheets. Longer answer: … From the various URIs reported to trigger this crash, I managed to pinpoint that the crash (of, I guess, the tokenizer) was caused by one character: the question mark. You know. The harmless “?”. Most (if not all) of the pages reportedly crashing the validator were using IE's "expression" syntax to javascriptize their CSS. Like this: padding-bottom: expression(this.scrollWidth > this.offsetWidth ? 15 : 0); I couldn't find such a syntax defined anywhere in the CSS specs, nor in MSDN, so I'm not sure where it comes from, but it's talked about and apparently widely used as a way to make MSIE do stuff, so I suppose it's an IE-proprietary syntax. It certainly is interesting (some might say ugly, YMMV) but as far as I can tell this syntax is outside of the boundaries provided by the standard CSS tokenization, no wonder it tripped the validator's parser (and probably others, although most CSS consumers will likely just ignore what they don't understand, as they should). I guess we'll be relaxing the tokenizer in the validator, so as to validate the stylesheet and output a CSS validation error, in a fashion probably more useful than "Timed Out". As a suggested quick fix, it seems that the MSDN documents a setExpression javascript method http://msdn2.microsoft.com/en-us/library/ms531196(VS.85).aspx Still not standard AFAICT …I guess it's tantamount to passing the bucket… Last Word: this problem (as far as the CSS validator is concerned) is tracked at http://www.w3.org/Bugs/Public/show_bug.cgi?id=4981 -- olivier
Received on Friday, 29 February 2008 17:08:49 UTC