namespace syntax-004 is invalid

http://hg.csswg.org/test/raw-file/tip/approved/css3-namespace/src/syntax-004.xml

This test case tests whether

   @namespace u\00072l("test");
   *|test { background:red }
   test { background: lime }

results in 'background: lime;' for

  <test xmlns="test" />

. But even if the whole @namespace statement is dropped, according to
Selectors3:

  # Element type selectors that have no namespace component (no
  # namespace separator) represent elements without regard to the
  # element's namespace (equivalent to "*|") unless a default namespace
  # has been declared for namespaced selectors (e.g. in CSS, in the
  # style sheet).  If a default namespace has been declared, such
  # selectors will represent only elements in the default namespace.

it will be matched.

I think a fix to this test case is perhaps to add a @namespace ""; at
the beginning to declare a default namespace. Still, whether you can use
CSS escape sequence here is subject to debate. Both Appendix G of CSS2.1
and the core grammar disallow this but yet we have fuzzy text in prose
and a test case (uri-15)... But given constructs of Appendix G are used
here, I think we should just ignore the fuzzy text.


Cheers,
Kenny

Received on Friday, 4 May 2012 08:18:51 UTC