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

IE "expression" in CSS - Piercing the mystery of "exception:javax.servlet.ServletException: Timed out"

From: olivier Thereaux <ot@w3.org>
Date: Fri, 29 Feb 2008 12:08:32 -0500
Message-Id: <BFDF329F-5BA0-4A2B-B256-B0CCAAC3C2D9@w3.org>
To: W3C CSS Validator ML <www-validator-css@w3.org>


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  

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 :  

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
Still not standard AFAICT …I guess it's tantamount to passing the  

Last Word: this problem (as far as the CSS validator is concerned) is  
tracked at

Received on Friday, 29 February 2008 17:08:49 UTC

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