W3C home > Mailing lists > Public > public-css-testsuite@w3.org > March 2009

RE: attribute-value-selector-004.xht not well formed

From: Sylvain Galineau <sylvaing@microsoft.com>
Date: Mon, 9 Mar 2009 17:47:26 -0700
To: "L. David Baron" <dbaron@dbaron.org>, "public-css-testsuite@w3.org" <public-css-testsuite@w3.org>
Message-ID: <5D97C7EB4695104AB6345E56FE356B19408A0DD1EA@NA-EXMSG-C125.redmond.corp.microsoft.com>
David,

Shouldn't the statements below be reversed i.e.

p { color: green; }
p, [1badAttr] { color: red; }

However, the only way to verify that the red rule is not applied to [1badAttr] is to have markup with that attribute in the page. We can certainly assume that if color:red not applied to p then it's not applied to [1badAttr] i.e. that the user agent handles selector error recovery properly for all the selectors in the group. The original testcase does not make that assumption. It may be conservative but it would also reveal a bad bug that the alternative wouldn't.

Imho, testing CSS should take precedence over the well-formedness of the markup in some of the testcases, as long as the broken markup relates directly to the feature being tested. Given how much invalid or broken markup there is in the real world, limiting ourselves to testing valid XHTML seems restrictive and may allow a PASS that should FAIL.

-----Original Message-----
From: public-css-testsuite-request@w3.org [mailto:public-css-testsuite-request@w3.org] On Behalf Of L. David Baron
Sent: Thursday, March 05, 2009 9:07 PM
To: public-css-testsuite@w3.org
Subject: Re: attribute-value-selector-004.xht not well formed

On Friday 2009-03-06 06:00 +0100, Chris Lilley wrote:
>   http://test.csswg.org/source/CSS2.1-test-suite/incoming/microsoft/Chapter_5/attribute-value-selector-004.xht
> 
> is not well formed.

And the test should probably be written using only invalid CSS and
not bad XML:

p, [1badAttr] { color: red; }
p { color: green; }

<p>This should be green.</p>

-David

-- 
L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/
Received on Tuesday, 10 March 2009 00:51:56 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 20 September 2010 17:51:57 GMT