Difference between CSS21 and Media Queries in parsing media?

Hi,

in 
<http://www.w3.org/TR/2009/CR-css3-mediaqueries-20090915/#error-handling> 
we read:

   Malformed media query. User agents are to handle unexpected tokens
   encountered while parsing a media query by reading until the end of
   the media query, while observing the rules for matching pairs of (),
   [], {}, "", and '', and correctly handling escapes. Media queries with
   unexpected tokens are ignored. [CSS21]

   @media (example, all,), speech { /* only applicable to speech devices
   */ }
   @media &test, screen           { /* only applicable to screen devices
   */ }

And a little further down:

   Media queries are expected to follow the error handling rules of the
   host language as well.


In 
<http://www.w3.org/TR/2009/CR-CSS2-20090908/syndata.html#parsing-errors> 
we read:

   Malformed statements. User agents must handle unexpected tokens
   encountered while parsing a statement by reading until the end of the
   statement, while observing the rules for matching pairs of (), [], {},
   "", and '', and correctly handling escapes.

and in 
<http://www.w3.org/TR/2009/CR-CSS2-20090908/media.html#at-media-rule>:

   Invalid statements must be ignored per 4.1.7 "Rule sets, declaration
   blocks, and selectors" and 4.2 "Rules for handling parsing errors."


Is a CSS 2.1 user agent required to ignore both @media rules quoted 
above "by reading until the end of the statement", while a CSS Media 
Queries user agent will only read "until the end of the media query" 
(ignoring "(example, all,)," and "&test,") and apply the set of 
statements to "speech" (1st @media rule) and "screen" (2nd @media rule)?

-- 
Johannes Koch
In te domine speravi; non confundar in aeternum.
                             (Te Deum, 4th cent.)

Received on Thursday, 29 July 2010 14:05:45 UTC