W3C home > Mailing lists > Public > www-validator-cvs@w3.org > May 2008

2002/css-validator/org/w3c/css/selectors/attributes AttributeOneOf.java,1.3,1.4

From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
Date: Tue, 13 May 2008 09:37:29 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1Jvqwr-0003Lf-Aq@lionel-hutz.w3.org>

Update of /sources/public/2002/css-validator/org/w3c/css/selectors/attributes
In directory hutz:/tmp/cvs-serv12848

Modified Files:
	AttributeOneOf.java 
Log Message:
report warning only if name is the same (but more is needed to verify incompatibilty in that case, pure equality doesn't work)


Index: AttributeOneOf.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/selectors/attributes/AttributeOneOf.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- AttributeOneOf.java	13 Sep 2007 10:12:07 -0000	1.3
+++ AttributeOneOf.java	13 May 2008 09:37:27 -0000	1.4
@@ -63,9 +63,11 @@
     }
 
     public void applyAttribute(ApplContext ac, AttributeSelector attr) {
-	if((attr instanceof AttributeExact) &&
-		!value.equals(((AttributeExact) attr).getValue())) {
-	    ac.getFrame().addWarning("incompatible", new String[] { toString(), attr.toString() });
+	if (getName().equals(attr.getName())) {
+	    if((attr instanceof AttributeExact) &&
+	       !value.equals(((AttributeExact) attr).getValue())) {
+		ac.getFrame().addWarning("incompatible", new String[] { toString(), attr.toString() });
+	    }
 	}
     }
 
Received on Tuesday, 13 May 2008 09:38:02 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:55:01 GMT