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

2002/css-validator/org/w3c/css/selectors/attributes AttributeExact.java,1.5,1.6

From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
Date: Tue, 13 May 2008 09:38:03 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1JvqxP-0003RS-48@lionel-hutz.w3.org>

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

Modified Files:
	AttributeExact.java 
Log Message:
less checks if name is not the same


Index: AttributeExact.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/selectors/attributes/AttributeExact.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- AttributeExact.java	13 May 2008 09:32:05 -0000	1.5
+++ AttributeExact.java	13 May 2008 09:38:01 -0000	1.6
@@ -55,24 +55,20 @@
 
     public void applyAttribute(ApplContext ac, AttributeSelector attr) {
 	String name = getName();
-	if (attr instanceof AttributeExact) {
-	    // if we have the same name...
-	    if (name.equals(attr.getName())) {
+	// if same name... check if they are incompatible or not
+	if (name.equals(attr.getName())) {
+	    if (attr instanceof AttributeExact) {
 		// and not the same value, raise a warning
 		if (!value.equals(((AttributeExact) attr).getValue())) {
 		    ac.getFrame().addWarning("incompatible", new String[] { toString(), attr.toString() });
 		}
-	    }
-	} else if(attr instanceof AttributeOneOf) {
-	    if (name.equals(attr.getName())) {
+	    } else if(attr instanceof AttributeOneOf) {
 		// FIXME check that the parsed one of value are matching before doing the conclict check
 		// requires breaking down the OneOf
 		if (!value.equals(((AttributeOneOf) attr).getValue())) {
 		    ac.getFrame().addWarning("incompatible", new String[] { toString(), attr.toString() });
 		}
-	    }
-	} else if(attr instanceof AttributeBegin) {
-	    if (name.equals(attr.getName())) {
+	    } else if(attr instanceof AttributeBegin) {
 		String othervalue = ((AttributeBegin) attr).getValue();
 		// check if [lang|=en][lang=fr-FR] are incompatible 
 		// form CSS3 selectors about AttributeBegin
Received on Tuesday, 13 May 2008 09:38:36 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:02:28 UTC