Re: [css3-namespaces] syntax-006.xml Test

On Thu, 06 May 2010 01:12:29 +0900, Daniel Glazman  
<daniel.glazman@disruptive-innovations.com> wrote:
> I think we have a pretty useless test in the CSS 3 Namespaces
> Test suite: syntax-006.xml test [1] seems to me almost outside of the
> scope of this Test Suite because what it really tests is the invalidity
> of the @import rule, not the invalidity of a @namespace rule because of
> its context. The only constraint it checks is the existing constraint on
> @import, nothing new, and that's in CSS 2.1...

Since @namespace is new it introduces a new possibility to get @import  
parsing wrong. It seems valuable to test that.


> I think a better test, enforcing the written rule "Any @namespace rules
> must follow all @charset and @import rules and precede all other
> non-ignored at-rules and rule sets in a style sheet" and matching better
> the title of the test about "invalid ordering" is the following one:
>
>    <style>
>      @namespace test url("test");
>      @media all {
>        test|test { background-color: lime; }
>      }
>      @namespace test2 url("test");
>      test2|test { background: red }
>    </style>
>    <p>
>      <test xmlns="test">This sentence should have a green
>                         background.</test>
>    </p>
>
> Here, the second @namespace rule is invalid and the background should be
> green.

This seems like a useful test too.


> [1]  
> http://www.w3.org/Style/CSS/Test/CSS3/Namespace/20090210/syntax-006.xml


-- 
Anne van Kesteren
http://annevankesteren.nl/

Received on Thursday, 6 May 2010 04:32:10 UTC