2002/css-validator/org/w3c/css/properties Css1Style.java,1.3,1.4 CssBackground.java,1.3,1.4 CssBackgroundAttachment.java,1.2,1.3 CssBackgroundAttachmentCSS1.java,1.2,1.3 CssBackgroundAttachmentCSS2.java,1.2,1.3 CssBackgroundAttachmentMob.java,1.2,1.3 CssBackgroundCSS1.java,1.2,1.3 CssBackgroundCSS2.java,1.2,1.3 CssBackgroundColor.java,1.3,1.4 CssBackgroundColorCSS1.java,1.3,1.4 CssBackgroundColorCSS2.java,1.3,1.4 CssBackgroundColorMob.java,1.2,1.3 CssBackgroundConstants.java,1.2,1.3 CssBackgroundImage.java,1.2,1.3 CssBackgroundImageCSS1.java,1.2,1.3 CssBackgroundImageCSS2.java,1.2,1.3 CssBackgroundImageMob.java,1.2,1.3 CssBackgroundMob.java,1.2,1.3 CssBackgroundPosition.java,1.2,1.3 CssBackgroundPositionCSS1.java,1.2,1.3 CssBackgroundPositionCSS2.java,1.2,1.3 CssBackgroundPositionMob.java,1.2,1.3 CssBackgroundRepeat.java,1.2,1.3 CssBackgroundRepeatCSS1.java,1.2,1.3 CssBackgroundRepeatCSS2.java,1.2,1.3 CssBackgroundRepeatMob.java,1.2,1.3 CssBackgroundTV.java,1.1,1.2 CssBorder.java,1.4,1.5 CssBorderB

Update of /sources/public/2002/css-validator/org/w3c/css/properties
In directory hutz:/tmp/cvs-serv27412/org/w3c/css/properties

Modified Files:
	Css1Style.java CssBackground.java CssBackgroundAttachment.java 
	CssBackgroundAttachmentCSS1.java 
	CssBackgroundAttachmentCSS2.java 
	CssBackgroundAttachmentMob.java CssBackgroundCSS1.java 
	CssBackgroundCSS2.java CssBackgroundColor.java 
	CssBackgroundColorCSS1.java CssBackgroundColorCSS2.java 
	CssBackgroundColorMob.java CssBackgroundConstants.java 
	CssBackgroundImage.java CssBackgroundImageCSS1.java 
	CssBackgroundImageCSS2.java CssBackgroundImageMob.java 
	CssBackgroundMob.java CssBackgroundPosition.java 
	CssBackgroundPositionCSS1.java CssBackgroundPositionCSS2.java 
	CssBackgroundPositionMob.java CssBackgroundRepeat.java 
	CssBackgroundRepeatCSS1.java CssBackgroundRepeatCSS2.java 
	CssBackgroundRepeatMob.java CssBackgroundTV.java 
	CssBorder.java CssBorderBottom.java CssBorderBottomCSS1.java 
	CssBorderBottomCSS2.java CssBorderBottomColor.java 
	CssBorderBottomColorCSS1.java CssBorderBottomColorCSS2.java 
	CssBorderBottomStyle.java CssBorderBottomStyleCSS1.java 
	CssBorderBottomStyleCSS2.java CssBorderBottomWidth.java 
	CssBorderBottomWidthCSS1.java CssBorderBottomWidthCSS2.java 
	CssBorderCSS1.java CssBorderCSS2.java CssBorderColor.java 
	CssBorderColorCSS1.java CssBorderColorCSS2.java 
	CssBorderFaceColor.java CssBorderFaceColorCSS1.java 
	CssBorderFaceColorCSS2.java CssBorderFaceStyle.java 
	CssBorderFaceStyleCSS1.java CssBorderFaceStyleCSS2.java 
	CssBorderFaceWidth.java CssBorderFaceWidthCSS1.java 
	CssBorderFaceWidthCSS2.java CssBorderLeft.java 
	CssBorderLeftCSS1.java CssBorderLeftCSS2.java 
	CssBorderLeftColor.java CssBorderLeftColorCSS1.java 
	CssBorderLeftColorCSS2.java CssBorderLeftStyle.java 
	CssBorderLeftStyleCSS1.java CssBorderLeftStyleCSS2.java 
	CssBorderLeftWidth.java CssBorderLeftWidthCSS1.java 
	CssBorderLeftWidthCSS2.java CssBorderRight.java 
	CssBorderRightCSS1.java CssBorderRightCSS2.java 
	CssBorderRightColor.java CssBorderRightColorCSS1.java 
	CssBorderRightColorCSS2.java CssBorderRightStyle.java 
	CssBorderRightStyleCSS1.java CssBorderRightStyleCSS2.java 
	CssBorderRightWidth.java CssBorderRightWidthCSS1.java 
	CssBorderRightWidthCSS2.java CssBorderStyle.java 
	CssBorderStyleCSS1.java CssBorderStyleCSS2.java 
	CssBorderTop.java CssBorderTopCSS1.java CssBorderTopCSS2.java 
	CssBorderTopColor.java CssBorderTopColorCSS1.java 
	CssBorderTopColorCSS2.java CssBorderTopStyle.java 
	CssBorderTopStyleCSS1.java CssBorderTopStyleCSS2.java 
	CssBorderTopWidth.java CssBorderTopWidthCSS1.java 
	CssBorderTopWidthCSS2.java CssBorderWidth.java 
	CssBorderWidthCSS1.java CssBorderWidthCSS2.java CssBottom.java 
	CssBoxOffsetFace.java CssClear.java CssClip.java CssColor.java 
	CssColorCSS1.java CssColorCSS2.java CssContent.java 
	CssContentCSS2.java CssCounterIncrement.java 
	CssCounterReset.java CssDirection.java CssDirectionATSC.java 
	CssDisplay.java CssDisplayCSS1.java CssDisplayCSS2.java 
	CssFloat.java CssFont.java CssFontCSS1.java CssFontCSS2.java 
	CssFontConstant.java CssFontFamily.java CssFontFamilyCSS1.java 
	CssFontFamilyCSS2.java CssFontSize.java CssFontSizeAdjust.java 
	CssFontSizeAdjustCSS2.java CssFontSizeCSS1.java 
	CssFontSizeCSS2.java CssFontStretch.java 
	CssFontStretchCSS1.java CssFontStretchCSS2.java 
	CssFontStyle.java CssFontStyleCSS1.java CssFontStyleCSS2.java 
	CssFontVariant.java CssFontVariantCSS1.java 
	CssFontVariantCSS2.java CssFontWeight.java 
	CssFontWeightCSS1.java CssFontWeightCSS2.java CssHeight.java 
	CssHeightMob.java CssLeft.java CssLetterSpacing.java 
	CssLineHeight.java CssLineHeightCSS1.java 
	CssLineHeightCSS2.java CssListStyle.java CssListStyleCSS1.java 
	CssListStyleCSS2.java CssListStyleConstants.java 
	CssListStyleImage.java CssListStyleImageCSS1.java 
	CssListStyleImageCSS2.java CssListStylePosition.java 
	CssListStylePositionCSS1.java CssListStylePositionCSS2.java 
	CssListStyleTV.java CssListStyleType.java 
	CssListStyleTypeCSS1.java CssListStyleTypeCSS2.java 
	CssListStyleTypeTV.java CssMargin.java CssMarginBottom.java 
	CssMarginLeft.java CssMarginRight.java CssMarginSide.java 
	CssMarginTop.java CssMarkerOffset.java 
	CssMarkerOffsetATSC.java CssMaxHeight.java 
	CssMaxHeightATSC.java CssMaxWidth.java CssMaxWidthATSC.java 
	CssMinHeight.java CssMinHeightATSC.java CssMinWidth.java 
	CssMinWidthATSC.java CssOverflow.java CssPadding.java 
	CssPaddingBottom.java CssPaddingLeft.java CssPaddingRight.java 
	CssPaddingSide.java CssPaddingTop.java CssPosition.java 
	CssPositionTV.java CssProperties.java CssProperty.java 
	CssQuotes.java CssQuotesATSC.java CssRight.java 
	CssTextAlign.java CssTextAlignMob.java CssTextAlignTV.java 
	CssTextDecoration.java CssTextDecorationMob.java 
	CssTextDecorationTV.java CssTextIndent.java 
	CssTextIndentMob.java CssTextShadow.java 
	CssTextShadowATSC.java CssTextTransform.java CssTop.java 
	CssUnicodeBidi.java CssUnicodeBidiATSC.java 
	CssVerticalAlign.java CssVerticalAlignCSS1.java 
	CssVerticalAlignMob.java CssVerticalAlignTV.java 
	CssVisibility.java CssWhiteSpace.java CssWidth.java 
	CssWidthMob.java CssWordSpacing.java CssZIndex.java 
	TextShadowFace.java 
Log Message:
All those changed made by Jean-Guilhem Rouel:

Huge patch, imports fixed (automatic)
Bug fixed: 372, 920, 778, 287, 696, 764, 233
Partial bug fix for 289

Issue with "inherit" in CSS2.
The validator now checks the number of values (extraneous values were previously ignored)




Index: CssBorderTopStyleCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderTopStyleCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderTopStyleCSS2.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderTopStyleCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -22,9 +32,9 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
-import org.w3c.css.values.CssExpression;
-import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
+import org.w3c.css.values.CssExpression;
 
 /**
  * Be careful, this is not a CSS1 property !
@@ -58,13 +68,22 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */
-    public CssBorderTopStyleCSS2(ApplContext ac, CssExpression expression) 
-	throws InvalidParamException {
+    public CssBorderTopStyleCSS2(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
 	
 	setByUser();
 	face = new CssBorderFaceStyleCSS2(ac, expression);
     }
     
+    public CssBorderTopStyleCSS2(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression,false);
+    }
+    
     /**
      * Returns the value of this property
      */
@@ -76,14 +95,20 @@
      * Returns the value
      */
     public String getStyle() {
-	return face.getStyle();
+	if(face != null) {
+	    return face.getStyle();
+	}
+	return null;
     }
     
     /**
      * Returns a string representation of the object.
      */
     public String toString() {
-	return face.toString();
+	if(face != null) {
+	    return face.toString();
+	}
+	return "";
     }
     
     /**

Index: CssPaddingTop.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssPaddingTop.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssPaddingTop.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssPaddingTop.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -28,9 +38,9 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
-import org.w3c.css.values.CssExpression;
-import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
+import org.w3c.css.values.CssExpression;
 
 /**
  *   <H4>
@@ -75,8 +85,14 @@
    * @param expression The expression for this property.
    * @exception InvalidParamException Values are incorrect
    */
-  public CssPaddingTop(ApplContext ac, CssExpression expression) throws InvalidParamException {
-    super(ac, expression);
+  public CssPaddingTop(ApplContext ac, CssExpression expression, boolean check)
+  	throws InvalidParamException {
+    super(ac, expression, check);
+  }
+  
+  public CssPaddingTop(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
   }
   
   /**

Index: CssBorderBottomWidthCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderBottomWidthCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderBottomWidthCSS2.java	8 Apr 2002 21:17:42 -0000	1.2
+++ CssBorderBottomWidthCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:42  plehegar
  * New
  *
@@ -22,10 +32,10 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
 import org.w3c.css.values.CssValue;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  *   <H4>
@@ -84,11 +94,20 @@
    * @param expression The expression for this property.
    * @exception InvalidParamException Values are incorrect
    */
-  public CssBorderBottomWidthCSS2(ApplContext ac, CssExpression expression) 
-    throws InvalidParamException {
+  public CssBorderBottomWidthCSS2(ApplContext ac, CssExpression expression,
+	  boolean check) throws InvalidParamException {
+      
+      if(check && expression.getCount() > 1) {
+	  throw new InvalidParamException("unrecognize", ac);
+      }
 
       setByUser();
-    face = new CssBorderFaceWidthCSS2(ac, expression);
+      face = new CssBorderFaceWidthCSS2(ac, expression);
+  }
+  
+  public CssBorderBottomWidthCSS2(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
   }
   
   /**
@@ -102,14 +121,20 @@
    * Return the value of this property
    */
   public CssValue getValue() {
-    return face.getValue();
+      if(face != null) {
+	  return face.getValue();
+      }
+      return null;
   }
 
   /**
    * Returns a string representation of the object.
    */
   public String toString() {
-    return face.toString();
+      if(face != null) {
+	  return face.toString();
+      }
+      return "";
   }
 
   /**

Index: CssBackgroundPosition.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBackgroundPosition.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBackgroundPosition.java	8 Apr 2002 21:17:42 -0000	1.2
+++ CssBackgroundPosition.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:42  plehegar
  * New
  *
@@ -40,15 +50,15 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.values.CssPercentage;
 import org.w3c.css.values.CssLength;
-import org.w3c.css.values.CssNumber;
+//import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssOperator;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssPercentage;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -127,17 +137,17 @@
  * @see CssBackgroundAttachment 
  */
 public class CssBackgroundPosition extends CssProperty 
-        implements CssBackgroundConstants, CssOperator {
+implements CssBackgroundConstants, CssOperator {
     
-    CssValue horizontal;
-    CssValue vertical;
+    CssValue first;
+    CssValue second;
     
     /**
      * Create a new CssBackgroundPosition
      */
     public CssBackgroundPosition() {
-	horizontal = DefaultValue0;
-	vertical = DefaultValue0;
+	first = DefaultValue0;
+	second = DefaultValue0;
     }  
     
     /**
@@ -146,73 +156,143 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssBackgroundPosition(ApplContext ac, CssExpression expression) 
-	throws InvalidParamException {
+    public CssBackgroundPosition(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 2) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
 	CssValue val = expression.getValue();
 	char op  = expression.getOperator();
-	int index;
 	
 	if (op != SPACE)
 	    throw new  InvalidParamException("operator", 
-					     ((new Character(op)).toString()),
-					     ac);
+		    ((new Character(op)).toString()),
+		    ac);
 	
 	if (val.equals(inherit)) {
-	    horizontal = inherit;
-	    vertical = inherit;
+	    if(expression.getCount() > 1) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    first = inherit;
+	    second = inherit;
 	    expression.next();
 	    return;
-	} else if (val instanceof CssIdent 
-	    && (index=IndexOfIdent((String) val.get())) != INVALID) {
-	    CssValue next = expression.getNextValue();
-	    expression.next();
-	    if (next == null) {
-		getPercentageFromIdent(index, INVALID);
-	    } else if (next instanceof CssIdent) {
+	}
+	
+	CssValue next = expression.getNextValue();	
+	
+	if(val instanceof CssIdent) {
+	    int index1 = IndexOfIdent((String) val.get());
+	    // two keywords
+	    if(next instanceof CssIdent) {
 		int index2 = IndexOfIdent((String) next.get());
-		if (index2 != INVALID) {
-		    getPercentageFromIdent(index, index2);
-		    expression.next();
-		} else {
-		    getPercentageFromIdent(index, INVALID);
+		// one is vertical, the other is vertical
+		// or the two are 'center'
+		if((isHorizontal(index1) && isVertical(index2)) ||
+			(isHorizontal(index2) && isVertical(index1))) {
+		    first = val;
+		    second = next;		    
+		}
+		// both are horizontal or vertical but not 'center'
+		else if(check){		    
+		    throw new InvalidParamException("incompatible",
+			    val, next, ac);
+		}
+		else {
+		    first = val;
 		}
 	    }
-	} else if (val instanceof CssLength || 
-		   val instanceof CssPercentage || val instanceof CssNumber) {
-	    if (val instanceof CssNumber) {
-		val = ((CssNumber) val).getLength();
+	    // a keyword and a percentage/length
+	    else if(next instanceof CssLength || next instanceof CssPercentage) {
+		if(isHorizontal(index1)) {
+		    first = val;
+		    second = next;
+		}
+		// if the keyword is the first value, it can only be an 
+		// horizontal one 
+		else {
+		    throw new InvalidParamException("incompatible",
+			    val, next, ac);
+		}
 	    }
-	    horizontal = val;
-	    expression.next();
-	    val = expression.getValue();
-	    if (val instanceof CssLength || 
-		val instanceof CssPercentage || val instanceof CssNumber) {
-		if (val instanceof CssNumber) {
-		    try {
-			val = ((CssNumber) val).getLength();
-		    } catch (InvalidParamException e) {
-			vertical = DefaultValue50;
-			return;
-		    }
+	    // only one value
+	    else if(next == null) {
+		first = val;
+	    }
+	    // the second value is invalid
+	    else if(check) {		
+		throw new InvalidParamException("value", next, 
+			getPropertyName(), ac);
+	    }
+	    else {
+		first = val;
+	    }
+	}
+	else if(val instanceof CssLength || val instanceof CssPercentage) {
+	    // a percentage/length and an keyword
+	    if(next instanceof CssIdent) {
+		int index = IndexOfIdent((String) next.get());
+		// the keyword must be a vertical one
+		if(isVertical(index)) {
+		    first = val;
+		    second = next;
 		}
-		vertical = val;
-		expression.next();
-	    } else
-		vertical = DefaultValue50;
-	} else {
+		else if(check) {
+		    throw new InvalidParamException("incompatible",
+			    val, next, ac);
+		}
+		else {
+		    first = val;
+		}
+	    }
+	    else if(next instanceof CssLength || next instanceof CssPercentage) {
+		first = val;
+		second = next;
+	    }
+	    else if(next == null || !check) {
+		first = val;
+	    }
+	    else {
+		throw new InvalidParamException("incompatible", val, next, ac);
+	    }
+	}
+	else if(check){
 	    throw new InvalidParamException("value", expression.getValue(), 
-					    getPropertyName(), ac);
+		    getPropertyName(), ac);
 	}
-
 	
+	// we only move the cursor if we found valid values
+	if(first != null) {	    
+	    expression.next();	    
+	}
+	if(second != null) {	    
+	    expression.next();	    
+	}
+    }
+    
+    public CssBackgroundPosition(ApplContext ac, CssExpression expression) 
+    throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
+    private boolean isHorizontal(int index) {
+	return index == POSITION_LEFT || index == POSITION_RIGHT ||
+	index == POSITION_CENTER;
+    }
+    
+    private boolean isVertical(int index) {
+	return index == POSITION_TOP || index == POSITION_BOTTOM ||
+	index == POSITION_CENTER;
     }
     
     /**
      * Returns the value of this property
      */
     public Object get() {
-	return horizontal;
+	return first;
     }
     
     /**
@@ -226,48 +306,58 @@
      * Returns the horizontal value of the position
      */
     public CssValue getHorizontalPosition() {
-	return horizontal;
+	return first;
     }
     
     /**
      * Returns the vertical value of the position
      */
     public CssValue getVerticalPosition() {
-	return vertical;
+	return second;
     }
-
+    
     /**
      * Returns true if this property is "softly" inherited
      * e.g. his value equals inherit
      */
     public boolean isSoftlyInherited() {
-	return horizontal == inherit;
+	return first == inherit;
     }
     
     /**
      * Returns a string representation of the object.
      */
     public String toString() {
-	if (horizontal == inherit) {
+	if (first == inherit) {
 	    return inherit.toString();
 	} else {
-	    return horizontal + " " + vertical;
+	    String ret = "";
+	    if (first != null) {
+		ret += first;
+	    }
+	    if (second != null) {
+		if (!ret.equals("")) {
+		    ret += " ";
+		}
+		ret += second;
+	    }
+	    return ret;
 	}
     }
-    
-    private void getPercentageFromIdent(int first, int second) {
-	horizontal = DefaultValue50;
-	vertical = DefaultValue50;
-	if (first == POSITION_LEFT || second == POSITION_LEFT)
-	    horizontal = DefaultValue0;
-	if (first == POSITION_RIGHT || second == POSITION_RIGHT)
-	    horizontal = DefaultValue100;
-	if (first == POSITION_TOP || second == POSITION_TOP)
-	    vertical = DefaultValue0;
-	if (first == POSITION_BOTTOM || second == POSITION_BOTTOM)
-	    vertical = DefaultValue100;
-    }
-    
+    /*
+     private void getPercentageFromIdent(int horizontal, int vertical) {
+     first = DefaultValue50;
+     second = DefaultValue50;
+     if (horizontal == POSITION_LEFT || vertical == POSITION_LEFT)
+     first = DefaultValue0;
+     if (horizontal == POSITION_RIGHT || vertical == POSITION_RIGHT)
+     first = DefaultValue100;
+     if (horizontal == POSITION_TOP || vertical == POSITION_TOP)
+     second = DefaultValue0;
+     if (horizontal == POSITION_BOTTOM || vertical == POSITION_BOTTOM)
+     second = DefaultValue100;
+     }
+     */
     /**
      * Add this property to the CssStyle.
      *
@@ -300,9 +390,12 @@
      * @param value The other property.
      */  
     public boolean equals(CssProperty property) {
-	return (property instanceof CssBackgroundPosition && 
-		horizontal.equals(((CssBackgroundPosition) property).horizontal)
-		&& vertical.equals(((CssBackgroundPosition) property).vertical));
+	return ((property == null && first == null && second == null) ||
+		(property instanceof CssBackgroundPosition && 
+			first != null &&
+			first.equals(((CssBackgroundPosition) property).first) &&
+			second != null &&
+			second.equals(((CssBackgroundPosition) property).second)));
     }
     
     /**
@@ -310,7 +403,8 @@
      * It is used by all macro for the function <code>print</code>
      */  
     public boolean isDefault() {
-	return horizontal.equals(DefaultValue0) && vertical.equals(DefaultValue0);
+	return first != null && second != null &&
+	first.equals(DefaultValue0) && second.equals(DefaultValue0);
     }
     
     private int IndexOfIdent(String ident) throws InvalidParamException {
@@ -324,10 +418,10 @@
     
     private static int[] hash_values;
     
-    private static int INVALID = -1;
+//  private static int INVALID = -1;
     private static CssPercentage DefaultValue0 = new CssPercentage(0);
-    private static CssPercentage DefaultValue50 = new CssPercentage(50);
-    private static CssPercentage DefaultValue100 = new CssPercentage(100);
+//  private static CssPercentage DefaultValue50 = new CssPercentage(50);
+//  private static CssPercentage DefaultValue100 = new CssPercentage(100);
     
     static {
 	hash_values = new int[POSITION.length];

Index: CssBorderLeftWidth.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderLeftWidth.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderLeftWidth.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderLeftWidth.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -22,10 +32,10 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
 import org.w3c.css.values.CssValue;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  *   <H4>
@@ -59,102 +69,117 @@
  * @version $Revision$
  */
 public class CssBorderLeftWidth extends CssProperty {
-
-  CssBorderFaceWidth face;
-  
-  /**
-   * Create a new CssBorderLeftWidth
-   */
-  public CssBorderLeftWidth() {
-    face = new CssBorderFaceWidth();
-  }
-  
-  /**
-   * Create a new CssBorderLeftWidth with an another CssBorderFaceWidth
-   *
-   * @param another The another side.
-   */
-  public CssBorderLeftWidth(CssBorderFaceWidth another) {
+    
+    CssBorderFaceWidth face;
+    
+    /**
+     * Create a new CssBorderLeftWidth
+     */
+    public CssBorderLeftWidth() {
+	face = new CssBorderFaceWidth();
+    }
+    
+    /**
+     * Create a new CssBorderLeftWidth with an another CssBorderFaceWidth
+     *
+     * @param another The another side.
+     */
+    public CssBorderLeftWidth(CssBorderFaceWidth another) {
 	setByUser();
-
-    face = another;
-  }
-  
-  /**
-   * Create a new CssBorderLeftWidth
-   *
-   * @param expression The expression for this property.
-   * @exception InvalidParamException Values are incorrect
-   */
-  public CssBorderLeftWidth(ApplContext ac, CssExpression expression)
-    throws InvalidParamException {
+	
+	face = another;
+    }
     
+    /**
+     * Create a new CssBorderLeftWidth
+     *
+     * @param expression The expression for this property.
+     * @exception InvalidParamException Values are incorrect
+     */
+    public CssBorderLeftWidth(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
-    face = new CssBorderFaceWidth(ac, expression);
-  }
-  
-  /**
-   * Returns the value of this property
-   */
-  public Object get() {
-    return face;
-  }
-
-  /**
-   * Return the value of this property
-   */
-  public CssValue getValue() {
-    return face.getValue();
-  }
-
-  /**
-   * Returns a string representation of the object.
-   */
-  public String toString() {
-    return face.toString();
-  }
-
-  /**
-   * Returns the name of this property
-   */  
-  public String getPropertyName() {
-    return "border-left-width";
-  }
-
-  /**
-   * Add this property to the CssStyle.
-   *
-   * @param style The CssStyle
-   */
-  public void addToStyle(ApplContext ac, CssStyle style) {
-    CssBorderLeft left = ((Css1Style) style).cssBorder.left;
-    if (left.width != null)
-      style.addRedefinitionWarning(ac, this);
-    left.width = this;
-  }
-
-  /**
-   * Get this property in the style.
-   *
-   * @param style The style where the property is
-   * @param resolve if true, resolve the style to find this property
-   */  
-  public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
-    if (resolve) {
-      return ((Css1Style) style).getBorderLeftWidth();
-    } else {
-      return ((Css1Style) style).cssBorder.getLeft().width;
+	face = new CssBorderFaceWidth(ac, expression);
     }
-  }
-
-  /**
-   * Compares two properties for equality.
-   *
-   * @param value The other property.
-   */  
-  public boolean equals(CssProperty property) {
-    return (property instanceof CssBorderLeftWidth && 
-	    face.equals(((CssBorderLeftWidth) property).face));
-  }
-
+    
+    public CssBorderLeftWidth(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression,false);
+    }
+    
+    /**
+     * Returns the value of this property
+     */
+    public Object get() {
+	return face;
+    }
+    
+    /**
+     * Return the value of this property
+     */
+    public CssValue getValue() {
+	if(face != null) {
+	    return face.getValue();
+	}
+	return null;
+    }
+    
+    /**
+     * Returns a string representation of the object.
+     */
+    public String toString() {
+	if(face != null) {
+	    return face.toString();
+	}
+	return "";
+    }
+    
+    /**
+     * Returns the name of this property
+     */  
+    public String getPropertyName() {
+	return "border-left-width";
+    }
+    
+    /**
+     * Add this property to the CssStyle.
+     *
+     * @param style The CssStyle
+     */
+    public void addToStyle(ApplContext ac, CssStyle style) {
+	CssBorderLeft left = ((Css1Style) style).cssBorder.left;
+	if (left.width != null)
+	    style.addRedefinitionWarning(ac, this);
+	left.width = this;
+    }
+    
+    /**
+     * Get this property in the style.
+     *
+     * @param style The style where the property is
+     * @param resolve if true, resolve the style to find this property
+     */  
+    public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
+	if (resolve) {
+	    return ((Css1Style) style).getBorderLeftWidth();
+	} else {
+	    return ((Css1Style) style).cssBorder.getLeft().width;
+	}
+    }
+    
+    /**
+     * Compares two properties for equality.
+     *
+     * @param value The other property.
+     */  
+    public boolean equals(CssProperty property) {
+	return (property instanceof CssBorderLeftWidth && 
+		face.equals(((CssBorderLeftWidth) property).face));
+    }
+    
 }

Index: CssBorderColor.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderColor.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CssBorderColor.java	22 Jul 2002 08:35:46 -0000	1.3
+++ CssBorderColor.java	8 Aug 2005 13:18:12 -0000	1.4
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.4  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.3  2002/07/22 08:35:46  sijtsche
  * transparent is no value anymore, but has become a color
  *
@@ -25,15 +35,13 @@
 
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssPrinterStyle;
 import org.w3c.css.parser.CssSelectors;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssOperator;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  *   <H4>
@@ -92,26 +100,25 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */
-    public CssBorderColor(ApplContext ac, CssExpression expression)
-	throws InvalidParamException {
+    public CssBorderColor(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
 
 	setByUser();
 
 	switch (expression.getCount()) {
 	case 1:
-	    CssValue val = expression.getValue();
+	    //CssValue val = expression.getValue();
 	    //if (val.equals(transparent)) { // obsolete, transparent is a color value now
 		//top = new CssBorderTopColor();
 		//top.face.face = transparent;
 		//expression.next();
 	    //} else
-	    if (val.equals(inherit)) {
+	    /*if (val.equals(inherit)) {
 		top = new CssBorderTopColor();
 		top.face.face = inherit;
 		expression.next();
-	    } else {
-		top = new CssBorderTopColor(ac, expression);
-	    }
+	    } else*/
+	    top = new CssBorderTopColor(ac, expression);	    
 	    bottom = new CssBorderBottomColor((CssBorderFaceColor) top.get());
 	    right = new CssBorderRightColor((CssBorderFaceColor) top.get());
 	    left = new CssBorderLeftColor((CssBorderFaceColor) top.get());
@@ -121,7 +128,13 @@
 		throw new InvalidParamException("operator",
 						((new Character(expression.getOperator())).toString()),
 						ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    top = new CssBorderTopColor(ac, expression);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    right = new CssBorderRightColor(ac, expression);
 	    bottom = new CssBorderBottomColor((CssBorderFaceColor) top.get());
 	    left = new CssBorderLeftColor((CssBorderFaceColor) right.get());
@@ -131,35 +144,66 @@
 		throw new InvalidParamException("operator",
 						((new Character(expression.getOperator())).toString()),
 						ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    top = new CssBorderTopColor(ac, expression);
 	    if (expression.getOperator() != SPACE)
 		throw new InvalidParamException("operator",
 						((new Character(expression.getOperator())).toString()), ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    right = new CssBorderRightColor(ac, expression);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    bottom = new CssBorderBottomColor(ac, expression);
 	    left = new CssBorderLeftColor((CssBorderFaceColor) right.get());
 	    break;
-	default:
+	case 4:
 	    if (expression.getOperator() != SPACE)
 		throw new InvalidParamException("operator",
 						((new Character(expression.getOperator())).toString()),
 						ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    top = new CssBorderTopColor(ac, expression);
 	    if (expression.getOperator() != SPACE)
 		throw new InvalidParamException("operator",
 						((new Character(expression.getOperator())).toString()),
 						ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    right = new CssBorderRightColor(ac, expression);
 	    if (expression.getOperator() != SPACE)
 		throw new InvalidParamException("operator",
 						((new Character(expression.getOperator())).toString()),
 						ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    bottom = new CssBorderBottomColor(ac, expression);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    left = new CssBorderLeftColor(ac, expression);
 	    break;
+	default:
+	    if(check) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    break;
 	}
     }
 
+    public CssBorderColor(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */
@@ -191,6 +235,7 @@
 	} else {
 	    return top + " " + right + " " + bottom + " " + left;
 	}
+	
     }
 
     /**
@@ -198,10 +243,18 @@
      * Overrides this method for a macro
      */
     public void setImportant() {
-	top.important = true;
-	right.important = true;
-	left.important = true;
-	bottom.important = true;
+	if(top != null) {
+	    top.important = true;
+	}
+	if(right != null) {
+	    right.important = true;
+	}
+	if(left != null) {
+	    left.important = true;
+	}
+	if(bottom != null) {
+	    bottom.important = true;
+	}
     }
 
     /**
@@ -275,10 +328,18 @@
      * @param style The CssStyle
      */
     public void addToStyle(ApplContext ac, CssStyle style) {
-	top.addToStyle(ac, style);
-	right.addToStyle(ac, style);
-	left.addToStyle(ac, style);
-	bottom.addToStyle(ac, style);
+	if(top != null) {
+	    top.addToStyle(ac, style);
+	}
+	if(right != null) {
+	    right.addToStyle(ac, style);
+	}
+	if(left != null) {
+	    left.addToStyle(ac, style);
+	}
+	if(bottom != null) {
+	    bottom.addToStyle(ac, style);
+	}
     }
 
     /**
@@ -301,10 +362,18 @@
      */
     public void setInfo(int line, String source) {
 	super.setInfo(line, source);
-	top.setInfo(line, source);
-	right.setInfo(line, source);
-	left.setInfo(line, source);
-	bottom.setInfo(line, source);
+	if(top != null) {
+	    top.setInfo(line, source);
+	}
+	if(right != null) {
+	    right.setInfo(line, source);
+	}
+	if(left != null) {
+	    left.setInfo(line, source);
+	}
+	if(bottom != null) {
+	    bottom.setInfo(line, source);
+	}
     }
 
     /**
@@ -313,7 +382,7 @@
      * @param value The other property.
      */
     public boolean equals(CssProperty property) {
-	return false;
+	return false; // FIXME
     }
 
 }

Index: CssPosition.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssPosition.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssPosition.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssPosition.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -9,11 +9,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  */
@@ -39,7 +39,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorect
      */  
-    public CssPosition(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssPosition(ApplContext ac, CssExpression expression, boolean check)
+    	throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	
 	setByUser();
@@ -58,6 +64,11 @@
 					getPropertyName(), ac);
     }
     
+    public CssPosition(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssBorderBottom.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderBottom.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CssBorderBottom.java	8 Jan 2003 10:24:47 -0000	1.3
+++ CssBorderBottom.java	8 Aug 2005 13:18:12 -0000	1.4
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.4  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.3  2003/01/08 10:24:47  sijtsche
  * changes for CSS3 border
  *
@@ -33,16 +43,16 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssPrinterStyle;
 import org.w3c.css.parser.CssSelectors;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssLength;
 import org.w3c.css.values.CssOperator;
 import org.w3c.css.values.CssURL;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -94,15 +104,20 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */
-    public CssBorderBottom(ApplContext ac, CssExpression expression)
-        throws InvalidParamException {
-
+    public CssBorderBottom(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {	
 	CssValue val = null;
 	char op = SPACE;
 	boolean find = true;
-
+	
+	if(check && expression.getCount() > 4) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
 
+	boolean manyValues = (expression.getCount() > 1);
+	
 	while (find) {
 	    find = false;
 	    val = expression.getValue();
@@ -111,50 +126,71 @@
 	    if (val == null)
 		break;
 
+	    // if there are many values, we can't have inherit as one of them
+	    if(manyValues && val.equals(inherit)) {
+		throw new InvalidParamException("unrecognize", null, null, ac);
+	    }
+	    
 	    if (op != SPACE)
 		throw new InvalidParamException("operator",
 						((new Character(op)).toString()),
 						ac);
 
 	    if (width == null) {
-			try {
-			    width = new CssBorderBottomWidth(ac, expression);
-			    find = true;
-			} catch (InvalidParamException e) {}
+		try {
+		    width = new CssBorderBottomWidth(ac, expression);
+		    find = true;
+		} catch (InvalidParamException e) {
+		    // nothing to do, style will test this value
+		}
 	    }
 
 	    if (!find && style == null) {
-			try {
-			    style = new CssBorderBottomStyle(ac, expression);
-			    find = true;
-			}
-			catch (InvalidParamException e) {}
+		try {
+		    style = new CssBorderBottomStyle(ac, expression);
+		    find = true;
+		}
+		catch (InvalidParamException e) {
+		    // nothing to do, color will test this value
+		}
 	    }
 
-	    if (!find && color == null) {
-			try {
-			    color = new CssBorderBottomColor(ac, expression);
-			    find = true;
-			}
-			catch (InvalidParamException e) {}
+	    if (!find && color == null) {	
+		try {
+		    color = new CssBorderBottomColor(ac, expression);
+		    find = true;
+		}
+		catch (InvalidParamException e) {
+		    // nothing to do, uri will test this value
+		}
 	    }
 
 	    if (!find && uri == null) {
-			if (val instanceof CssURL) {
-				uri = val;
-				find = true;
-			}
+		if (val instanceof CssURL) {
+		    uri = val;
+		    find = true;
 		}
+		else {
+		    // the value is invalid
+		    throw new InvalidParamException("unrecognize", ac);
+		}
+	    }
 	}
-
+	/*
 	if (width == null)
 	    width = new CssBorderBottomWidth();
 	if (style == null)
 	    style = new CssBorderBottomStyle();
 	if (color == null)
 	    color = new CssBorderBottomColor();
+	*/	
     }
 
+    public CssBorderBottom(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */
@@ -199,11 +235,27 @@
      * Returns a string representation of the object.
      */
     public String toString() {
-	String ret = width + " " + style;
-	if (!color.face.isDefault())
-	    ret += " " + color;
+	String ret = "";
+	if(width != null) {
+	    ret += width;
+	}
+	if(style != null) {
+	    if(!ret.equals("")) {
+		ret += " ";
+	    }
+	    ret += style;
+	}
+	if(color != null) {
+	    if(!ret.equals("")) {
+		ret += " ";
+	    }
+	    ret += color;
+	}
 	if (uri != null) {
-		ret += " " + uri.toString();
+	    if(!ret.equals("")) {
+		ret += " ";
+	    }
+	    ret += " " + uri.toString();
 	}
 	return ret;
     }
@@ -220,9 +272,15 @@
      * Overrides this method for a macro
      */
     public void setImportant() {
-	width.important = true;
-	style.important = true;
-	color.important = true;
+	if(width != null) {
+	    width.important = true;
+	}
+	if(style != null) {
+	    style.important = true;
+	}
+	if(color != null) {
+	    color.important = true;
+	}
     }
 
     /**
@@ -262,37 +320,23 @@
     }
 
     /**
-     * Set the context.
-     * Overrides this method for a macro
+     * Add this property to the CssStyle
      *
-     * @see org.w3c.css.css.CssCascadingOrder#order
-     * @see org.w3c.css.css.StyleSheetParser#handleRule
+     * @param style The CssStyle
      */
-    public void setSelectors(CssSelectors selector) {
-	super.setSelectors(selector);
-	if (width != null) {
-	    width.setSelectors(selector);
+    public void addToStyle(ApplContext ac, CssStyle style) {	
+	if(width != null) {
+	    width.addToStyle(ac, style);
 	}
-	if (style != null) {
-	    style.setSelectors(selector);
+	if(this.style != null) {
+	    this.style.addToStyle(ac, style);
 	}
-	if (color != null) {
-	    color.setSelectors(selector);
+	if(color != null) {
+	    color.addToStyle(ac, style);
 	}
     }
 
     /**
-     * Add this property to the CssStyle
-     *
-     * @param style The CssStyle
-     */
-    public void addToStyle(ApplContext ac, CssStyle style) {
-	width.addToStyle(ac, style);
-	this.style.addToStyle(ac, style);
-	color.addToStyle(ac, style);
-    }
-
-    /**
      * Get this property in the style.
      *
      * @param style The style where the property is
@@ -314,10 +358,36 @@
      * @param source The source file where this property is defined
      */
     public void setInfo(int line, String source) {
-	super.setInfo(line, source);
-	width.setInfo(line, source);
-	style.setInfo(line, source);
-	color.setInfo(line, source);
+	super.setInfo(line, source);	
+	if(width != null) {
+	    width.setInfo(line, source);
+	}
+	if(style != null) {
+	    style.setInfo(line, source);
+	}
+	if(color != null) {
+	    color.setInfo(line, source);
+	}
+    }
+    
+    /**
+     * Set the context.
+     * Overrides this method for a macro
+     *
+     * @see org.w3c.css.css.CssCascadingOrder#order
+     * @see org.w3c.css.css.StyleSheetParser#handleRule
+     */
+    public void setSelectors(CssSelectors selector) {
+	super.setSelectors(selector);
+	if (width != null) {
+	    width.setSelectors(selector);
+	}
+	if (style != null) {
+	    style.setSelectors(selector);
+	}
+	if (color != null) {
+	    color.setSelectors(selector);
+	}
     }
 
     /**
@@ -328,8 +398,9 @@
     public boolean equals(CssProperty property) {
 	if (property instanceof CssBorderBottom) {
 	    CssBorderBottom bottom = (CssBorderBottom) property;
-	    return (width.equals(bottom.width) && style.equals(bottom.style)
-		    && color.equals(bottom.color));
+	    return (width != null && width.equals(bottom.width) &&
+		    style != null && style.equals(bottom.style) &&
+		    color != null && color.equals(bottom.color));
 	} else {
 	    return false;
 	}

Index: CssFontStretch.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssFontStretch.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssFontStretch.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssFontStretch.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -13,11 +23,10 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  *
@@ -43,8 +52,14 @@
      * @param expression the font stretch
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssFontStretch(ApplContext ac, CssExpression expression) 
+    public CssFontStretch(ApplContext ac, CssExpression expression,
+	    boolean check) 
 	throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
 	if (expression.getValue() instanceof CssIdent) {
 	    int hash = expression.getValue().hashCode();
@@ -60,6 +75,11 @@
 					getPropertyName(), ac);
     }
     
+    public CssFontStretch(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the current value
      */  

Index: CssHeight.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssHeight.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssHeight.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssHeight.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -34,14 +44,14 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
+import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssLength;
-import org.w3c.css.values.CssPercentage;
 import org.w3c.css.values.CssNumber;
-import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssPercentage;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -92,7 +102,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssHeight(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssHeight(ApplContext ac, CssExpression expression, boolean check)
+    	throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	
 	setByUser();
@@ -117,6 +133,11 @@
 	expression.next();
     }
     
+    public CssHeight(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssBackgroundMob.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBackgroundMob.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBackgroundMob.java	8 Apr 2002 21:17:42 -0000	1.2
+++ CssBackgroundMob.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:42  plehegar
  * New
  *
@@ -36,15 +46,14 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssPrinterStyle;
 import org.w3c.css.parser.CssSelectors;
-import org.w3c.css.values.CssOperator;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
+import org.w3c.css.values.CssOperator;
 import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  *   <H4>
@@ -106,14 +115,23 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssBackgroundMob(ApplContext ac, CssExpression expression) 
-	    throws InvalidParamException {
+    public CssBackgroundMob(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
 	CssValue val = expression.getValue();
 	char op = SPACE;
 	boolean find = true;
+	
+	// too many values
+	if(check && expression.getCount() > 6) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
-
+	
 	if (val.equals(inherit)) {
+	    if(expression.getCount() > 1) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    color = new CssBackgroundColorMob();
 	    color.color = inherit;
 	    image = new CssBackgroundImageMob();
@@ -135,6 +153,10 @@
 	    val = expression.getValue();
 	    op = expression.getOperator();
 
+	    if(val.equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    
 	    if (val == null) {
 		break;
 	    }
@@ -168,11 +190,8 @@
 		}
 	    }
 	    if (!find && position == null) {
-		try {
-		    position = new CssBackgroundPositionMob(ac, expression);
-		    find = true;
-		} catch (InvalidParamException e) {
-		}
+		position = new CssBackgroundPositionMob(ac, expression);
+		find = true;
 	    }
 	    if (op != SPACE) {
 		throw new InvalidParamException("operator", 
@@ -180,7 +199,7 @@
 						ac);
 	    }
 	}
-
+	/*
 	if (color == null)
 	    color = new CssBackgroundColorMob();
 	if (image == null)
@@ -191,6 +210,12 @@
 	    attachment = new CssBackgroundAttachmentMob();
 	if (position == null)
 	    position = new CssBackgroundPositionMob();
+	*/
+    }
+    
+    public CssBackgroundMob(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
     }
     
     /**
@@ -226,15 +251,15 @@
 	    return inherit.toString();
 	} else {
 	    String ret = "";
-	    if (color.byUser)
+	    if (color != null)
 		ret += " " + color.toString();
-	    if (image.byUser)
+	    if (image != null)
 		ret += " " + image.toString();
-	    if (image.byUser)
+	    if (repeat != null)
 		ret += " " + repeat.toString();
-	    if (attachment.byUser)
+	    if (attachment != null)
 		ret += " " + attachment.toString();
-	    if (position.byUser)
+	    if (position != null)
 		ret += " " + position.toString();
 	    return ret.trim();
 	}
@@ -245,11 +270,21 @@
      * Overrides this method for a macro
      */  
     public void setImportant() {
-	color.important = true;
-	image.important = true;
-	repeat.important = true;
-	attachment.important = true;
-	position.important = true;
+	if(color != null) {
+	    color.important = true;
+	}
+	if(image != null) {
+	    image.important = true;
+	}
+	if(repeat != null) {
+	    repeat.important = true;
+	}
+	if(attachment != null) {
+	    attachment.important = true;
+	}
+	if(position != null) {
+	    position.important = true;
+	}
     }
     
     /**
@@ -334,11 +369,21 @@
 	((Css1Style) style).cssBackgroundMob.same = same;
 	((Css1Style) style).cssBackgroundMob.byUser = byUser;
 
-	color.addToStyle(ac, style);
-	image.addToStyle(ac, style);
-	repeat.addToStyle(ac, style);
-	attachment.addToStyle(ac, style);
-	position.addToStyle(ac, style);
+	if(color != null) {
+	    color.addToStyle(ac, style);
+	}
+	if(image != null) {
+	    image.addToStyle(ac, style);
+	}
+	if(repeat != null) {
+	    repeat.addToStyle(ac, style);
+	}
+	if(attachment != null) {
+	    attachment.addToStyle(ac, style);
+	}
+	if(position != null) {
+	    position.addToStyle(ac, style);
+	}
     }
     
     /**
@@ -373,11 +418,21 @@
      */  
     public void setInfo(int line, String source) {
 	super.setInfo(line, source);
-	color.setInfo(line, source);
-	image.setInfo(line, source);
-	repeat.setInfo(line, source);
-	attachment.setInfo(line, source);
-	position.setInfo(line, source);
+	if(color != null) {
+	    color.setInfo(line, source);
+	}
+	if(image != null) {
+	    image.setInfo(line, source);
+	}
+	if(repeat != null) {
+	    repeat.setInfo(line, source);
+	}
+	if(attachment != null) {
+	    attachment.setInfo(line, source);
+	}
+	if(position != null) {
+	    position.setInfo(line, source);
+	}
     }
     
 }

Index: CssMaxWidth.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssMaxWidth.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssMaxWidth.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssMaxWidth.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -9,14 +9,14 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssNumber;
+import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssLength;
+import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssPercentage;
-import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  */
@@ -39,7 +39,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssMaxWidth(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssMaxWidth(ApplContext ac, CssExpression expression, boolean check)
+    	throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	
 	setByUser();
@@ -65,6 +71,11 @@
 	expression.next();
     }
     
+    public CssMaxWidth(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property.
      */

Index: CssListStyleCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssListStyleCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssListStyleCSS1.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssListStyleCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -33,14 +43,14 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssPrinterStyle;
 import org.w3c.css.parser.CssSelectors;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssOperator;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -120,19 +130,28 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssListStyleCSS1(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssListStyleCSS1(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 3) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	char op = SPACE;
 	boolean find = true;
 	
 	setByUser();
-
+/*
 	if (val.equals(inherit)) {
+	    if(expression.getCount() > 1) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    inheritedValue = true;
 	    expression.next();
 	    return;
 	}
-	
+*/	
 	while (find) {
 	    find = false;
 	    val = expression.getValue();
@@ -158,11 +177,11 @@
 	    if (!find 
 		&& (val != null)
 		&& (listStylePosition == null)) {
-		try {
-		    listStylePosition = new CssListStylePositionCSS1(ac, expression);
-		    find = true;
-		} catch (InvalidParamException e) {
-		}
+		listStylePosition = new CssListStylePositionCSS1(ac, expression);
+		find = true;
+	    }
+	    if(val != null && !find) {
+		throw new InvalidParamException("unrecognize", ac);
 	    }
 	    if (op != SPACE) {
 		throw new InvalidParamException("operator", 
@@ -170,7 +189,7 @@
 						ac);
 	    }
 	}
-	
+	/*
 	if (listStyleType == null) {
 	    listStyleType = new CssListStyleTypeCSS1();
 	}
@@ -181,7 +200,12 @@
 	
 	if (listStylePosition == null) {
 	    listStylePosition = new CssListStylePositionCSS1();
-	}
+	}*/
+    }
+    
+    public CssListStyleCSS1(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
     }
     
     /**
@@ -213,14 +237,17 @@
 	if (inheritedValue) {
 	    return inherit.toString();
 	} else {
-	    String ret = listStyleType.toString();
-	    if (!listStyleImage.isDefault()) {
+	    String ret = "";
+	    if(listStyleType != null) {
+		ret = listStyleType.toString();
+	    }
+	    if (listStyleImage != null &&!listStyleImage.isDefault()) {
 		ret += " " + listStyleImage;
 	    }
-	    if (!listStylePosition.isDefault()) {
+	    if (listStyleImage != null && !listStylePosition.isDefault()) {
 		ret += " " + listStylePosition;
 	    }
-	    return ret;
+	    return ret.trim();
 	}
     }
     
@@ -232,9 +259,12 @@
      */  
     public void setImportant() {
 	if (!inheritedValue) {
-	    listStyleType.important = true;
-	    listStyleImage.important = true;
-	    listStylePosition.important = true;
+	    if(listStyleType != null)
+		listStyleType.important = true;
+	    if(listStyleImage != null)
+		listStyleImage.important = true;
+	    if(listStylePosition != null)
+		listStylePosition.important = true;
 	}
     }
     
@@ -305,9 +335,12 @@
      */
     public void addToStyle(ApplContext ac, CssStyle style) {
 	if (!inheritedValue) {
-	    listStyleType.addToStyle(ac, style);
-	    listStyleImage.addToStyle(ac, style);
-	    listStylePosition.addToStyle(ac, style);
+	    if(listStyleType != null)
+		listStyleType.addToStyle(ac, style);
+	    if(listStyleImage != null)
+		listStyleImage.addToStyle(ac, style);
+	    if(listStylePosition != null)
+		listStylePosition.addToStyle(ac, style);
 	} else {
 	    ((Css1Style) style).cssListStyleCSS1.inheritedValue = true;
 	}
@@ -337,9 +370,12 @@
     public void setInfo(int line, String source) {
 	super.setInfo(line, source);
 	if (!inheritedValue) {
-	    listStyleType.setInfo(line, source);
-	    listStyleImage.setInfo(line, source);
-	    listStylePosition.setInfo(line, source);
+	    if(listStyleType != null)
+		listStyleType.setInfo(line, source);
+	    if(listStyleImage != null)
+		listStyleImage.setInfo(line, source);
+	    if(listStylePosition != null)
+		listStylePosition.setInfo(line, source);
 	}
     }
     

Index: CssBackgroundColor.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBackgroundColor.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CssBackgroundColor.java	22 Jul 2002 09:03:10 -0000	1.3
+++ CssBackgroundColor.java	8 Aug 2005 13:18:12 -0000	1.4
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.4  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.3  2002/07/22 09:03:10  sijtsche
  * transparent is no value anymore, has become a color itself
  *
@@ -41,12 +51,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.values.CssColor;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -75,7 +84,7 @@
      * Create a new CssBackgroundColor
      */
     public CssBackgroundColor() {
-		color = transparent;
+	color = transparent;
     }
 
     /**
@@ -84,8 +93,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */
-    public CssBackgroundColor(ApplContext ac, CssExpression expression)
-	throws InvalidParamException {
+    public CssBackgroundColor(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+
 	setByUser();
 	CssValue val = expression.getValue();
 
@@ -110,6 +124,11 @@
 	}
     }
 
+    public CssBackgroundColor(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssTextDecoration.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssTextDecoration.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssTextDecoration.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssTextDecoration.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -34,11 +44,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -100,29 +110,45 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssTextDecoration(ApplContext ac, CssExpression expression) 
+    public CssTextDecoration(ApplContext ac, CssExpression expression, boolean check) 
 	    throws InvalidParamException {
+		
 	CssValue val = expression.getValue();
 	boolean find = true;
-	int computed = 0;
+	//int computed = 0;
 	int index = INVALID;
 	
 	setByUser();
 	
 	if (val.equals(none)) {
+	    if(expression.getCount() > 1) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    value = none;
 	    expression.next();
 	    return;
 	} else if (val.equals(inherit)) {
+	    if(expression.getCount() > 1) {
+		 throw new InvalidParamException("unrecognize", ac);
+	    }
 	    value = inherit;
 	    expression.next();
 	    return;
 	}
 	val = null;
 	
+	if(check && expression.getCount() > 4) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	while (find) {
 	    find = false;
 	    val = expression.getValue();
+	    
+	    if(val != null && val.equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    
 	    if (val instanceof CssIdent) {
 		index = getIndex((CssIdent) val, ac);
 		if (values[index] == true) {
@@ -140,6 +166,11 @@
 	}
     }
     
+    public CssTextDecoration(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssLineHeightCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssLineHeightCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssLineHeightCSS2.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssLineHeightCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -40,14 +50,14 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssLength;
+import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssPercentage;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /** 
  *   <H4>
@@ -95,8 +105,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssLineHeightCSS2(ApplContext ac, CssExpression expression) 
-	    throws InvalidParamException {
+    public CssLineHeightCSS2(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	
 	setByUser();
@@ -126,6 +141,11 @@
 					getPropertyName(), ac);
     }
     
+    public CssLineHeightCSS2(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssTextAlign.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssTextAlign.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssTextAlign.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssTextAlign.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -31,12 +41,12 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssString;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -87,7 +97,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssTextAlign(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssTextAlign(ApplContext ac, CssExpression expression, boolean check)
+    	throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	int hash = val.hashCode();
 	
@@ -117,6 +133,11 @@
 	throw new InvalidParamException("value", val.toString(), getPropertyName(), ac);
     }
     
+    public CssTextAlign(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssTextDecorationTV.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssTextDecorationTV.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CssTextDecorationTV.java	19 Aug 2002 07:38:04 -0000	1.1
+++ CssTextDecorationTV.java	8 Aug 2005 13:18:12 -0000	1.2
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.2  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.1  2002/08/19 07:38:04  sijtsche
  * new tv profile property variant
  *
@@ -37,11 +47,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -103,29 +113,45 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */
-    public CssTextDecorationTV(ApplContext ac, CssExpression expression)
-	    throws InvalidParamException {
+    public CssTextDecorationTV(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
 	CssValue val = expression.getValue();
 	boolean find = true;
-	int computed = 0;
+	//int computed = 0;
 	int index = INVALID;
 
 	setByUser();
 
 	if (val.equals(none)) {
+	    if(expression.getCount() > 1) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    value = none;
 	    expression.next();
 	    return;
 	} else if (val.equals(inherit)) {
+	    if(expression.getCount() > 1) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    value = inherit;
 	    expression.next();
 	    return;
 	}
 	val = null;
 
+	if(check && expression.getCount() > 4) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	while (find) {
 	    find = false;
 	    val = expression.getValue();
+	    
+	    if(val != null && val.equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    
 	    if (val instanceof CssIdent) {
 		index = getIndex((CssIdent) val, ac);
 		if (values[index] == true) {
@@ -143,6 +169,11 @@
 	}
     }
 
+    public CssTextDecorationTV(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssContent.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssContent.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- CssContent.java	18 Dec 2002 10:45:07 -0000	1.4
+++ CssContent.java	8 Aug 2005 13:18:12 -0000	1.5
@@ -12,15 +12,15 @@
 import java.util.Vector;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssURL;
-import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssFunction;
+import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssOperator;
 import org.w3c.css.values.CssString;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssURL;
+import org.w3c.css.values.CssValue;
 
 /**
  */
@@ -63,7 +63,8 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */
-    public CssContent(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssContent(ApplContext ac, CssExpression expression, boolean check)
+    	throws InvalidParamException {
 	CssValue val = expression.getValue();
 	int counter = 0;
 	char op = expression.getOperator();
@@ -71,6 +72,9 @@
 
 	setByUser();
 	if (val.equals(inherit)) {
+	    if(expression.getCount() > 1) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    values.addElement(inherit);
 	    expression.next();
 	    return;
@@ -202,6 +206,11 @@
 
     }
 
+    public CssContent(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssListStyleType.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssListStyleType.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CssListStyleType.java	20 Dec 2002 16:03:36 -0000	1.3
+++ CssListStyleType.java	8 Aug 2005 13:18:12 -0000	1.4
@@ -7,6 +7,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.4  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.3  2002/12/20 16:03:36  sijtsche
  * new values added
  *
@@ -35,11 +45,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -91,7 +101,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */
-    public CssListStyleType(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssListStyleType(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 
 	setByUser();
@@ -109,6 +125,11 @@
 	throw new InvalidParamException("value", val, getPropertyName(), ac);
     }
 
+    public CssListStyleType(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssDisplay.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssDisplay.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- CssDisplay.java	25 Jul 2003 11:00:58 -0000	1.4
+++ CssDisplay.java	8 Aug 2005 13:18:12 -0000	1.5
@@ -7,6 +7,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.5  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.4  2003/07/25 11:00:58  sijtsche
  * additional values for UI added
  *
@@ -38,11 +48,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *
@@ -74,7 +84,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorect
      */
-    public CssDisplay(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssDisplay(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 
 	setByUser();
@@ -94,6 +110,11 @@
 					getPropertyName(), ac);
     }
 
+    public CssDisplay(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssPaddingSide.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssPaddingSide.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssPaddingSide.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssPaddingSide.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -30,13 +40,13 @@
  */
 package org.w3c.css.properties;
 
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssLength;
-import org.w3c.css.values.CssPercentage;
 import org.w3c.css.values.CssNumber;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssPercentage;
+import org.w3c.css.values.CssValue;
 
 /**
  * @version $Revision$
@@ -67,7 +77,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssPaddingSide(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssPaddingSide(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	
 	setByUser();
@@ -91,6 +107,11 @@
 	}
     }
     
+    public CssPaddingSide(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssBackgroundTV.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBackgroundTV.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CssBackgroundTV.java	19 Aug 2002 07:41:03 -0000	1.1
+++ CssBackgroundTV.java	8 Aug 2005 13:18:12 -0000	1.2
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.2  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.1  2002/08/19 07:41:03  sijtsche
  * new TV profile property variant
  *
@@ -39,15 +49,14 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssPrinterStyle;
 import org.w3c.css.parser.CssSelectors;
-import org.w3c.css.values.CssOperator;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
+import org.w3c.css.values.CssOperator;
 import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  *   <H4>
@@ -107,14 +116,23 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */
-    public CssBackgroundTV(ApplContext ac, CssExpression expression)
-	    throws InvalidParamException {
+    public CssBackgroundTV(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
 	CssValue val = expression.getValue();
 	char op = SPACE;
 	boolean find = true;
+	
+	// too many values
+	if(check && expression.getCount() > 5) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
 
 	if (val.equals(inherit)) {
+	    if(expression.getCount() > 1) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    color = new CssBackgroundColorCSS2();
 	    color.color = inherit;
 	    image = new CssBackgroundImageCSS2();
@@ -122,8 +140,8 @@
 	    repeat = new CssBackgroundRepeatCSS2();
 	    repeat.repeat = REPEAT.length - 1;
 	    position = new CssBackgroundPositionCSS2();
-	    position.horizontal = inherit;
-	    position.vertical = inherit;
+	    position.first = inherit;
+	    position.second = inherit;
 	    same = true;
 	    expression.next();
 	    return;
@@ -160,11 +178,8 @@
 		}
 	    }
 	    if (!find && position == null) {
-		try {
-		    position = new CssBackgroundPositionCSS2(ac, expression);
-		    find = true;
-		} catch (InvalidParamException e) {
-		}
+		position = new CssBackgroundPositionCSS2(ac, expression);
+		find = true;
 	    }
 	    if (op != SPACE) {
 		throw new InvalidParamException("operator",
@@ -172,7 +187,7 @@
 						ac);
 	    }
 	}
-
+	/*
 	if (color == null)
 	    color = new CssBackgroundColorCSS2();
 	if (image == null)
@@ -181,8 +196,14 @@
 	    repeat = new CssBackgroundRepeatCSS2();
 	if (position == null)
 	    position = new CssBackgroundPositionCSS2();
+	*/
     }
 
+    public CssBackgroundTV(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */
@@ -233,10 +254,18 @@
      * Overrides this method for a macro
      */
     public void setImportant() {
-	color.important = true;
-	image.important = true;
-	repeat.important = true;
-	position.important = true;
+	if(color != null) {
+	    color.important = true;
+	}
+	if(image != null) {
+	    image.important = true;
+	}
+	if(repeat != null) {
+	    repeat.important = true;
+	}
+	if(position != null) {
+	    position.important = true;
+	}
     }
 
     /**
@@ -314,10 +343,18 @@
 	((Css1Style) style).cssBackgroundCSS2.same = same;
 	((Css1Style) style).cssBackgroundCSS2.byUser = byUser;
 
-	color.addToStyle(ac, style);
-	image.addToStyle(ac, style);
-	repeat.addToStyle(ac, style);
-	position.addToStyle(ac, style);
+	if(color != null) {
+	    color.addToStyle(ac, style);
+	}
+	if(image != null) {
+	    image.addToStyle(ac, style);
+	}
+	if(repeat != null) {
+	    repeat.addToStyle(ac, style);
+	}
+	if(position != null) {
+	    position.addToStyle(ac, style);
+	}
     }
 
     /**
@@ -352,10 +389,18 @@
      */
     public void setInfo(int line, String source) {
 	super.setInfo(line, source);
-	color.setInfo(line, source);
-	image.setInfo(line, source);
-	repeat.setInfo(line, source);
-	position.setInfo(line, source);
+	if(color != null) {
+	    color.setInfo(line, source);
+	}
+	if(image != null) {
+	    image.setInfo(line, source);
+	}
+	if(repeat != null) {
+	    repeat.setInfo(line, source);
+	}
+	if(position != null) {
+	    position.setInfo(line, source);
+	}
     }
 
 }

Index: CssListStyleImage.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssListStyleImage.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssListStyleImage.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssListStyleImage.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -31,12 +41,12 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssURL;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssURL;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -76,8 +86,13 @@
      * @param value The value for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssListStyleImage(ApplContext ac, CssExpression expression) 
-	    throws InvalidParamException {
+    public CssListStyleImage(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	
 	setByUser();
@@ -96,6 +111,11 @@
 	}
     }
     
+    public CssListStyleImage(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssBackgroundColorMob.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBackgroundColorMob.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBackgroundColorMob.java	8 Apr 2002 21:17:42 -0000	1.2
+++ CssBackgroundColorMob.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:42  plehegar
  * New
  *
@@ -38,12 +48,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.values.CssColor;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -81,8 +90,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */
-    public CssBackgroundColorMob(ApplContext ac, CssExpression expression) 
-	throws InvalidParamException {
+    public CssBackgroundColorMob(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+
 	setByUser();
 	CssValue val = expression.getValue();
 	
@@ -106,6 +120,11 @@
 	}
     }  
     
+    public CssBackgroundColorMob(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */
@@ -125,14 +144,20 @@
      * e.g. his value equals inherit
      */
     public boolean isSoftlyInherited() {
-	return color.equals(inherit);
+	if (color != null) {
+	    return color.equals(inherit);
+	}
+	return false;
     }
     
     /**
      * Returns a string representation of the object.
      */
     public String toString() {
-	return color.toString();
+	if (color != null) {
+	    return color.toString();
+	}
+	return "";
     }
     
     
@@ -168,7 +193,7 @@
      * @param value The other property.
      */  
     public boolean equals(CssProperty property) {
-	return (property instanceof CssBackgroundColorCSS2 && 
+	return (property instanceof CssBackgroundColorCSS2 && color != null &&
 		color.equals( ((CssBackgroundColorCSS2) property).color));
     }
     

Index: CssBorderTopStyle.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderTopStyle.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderTopStyle.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderTopStyle.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -22,9 +32,9 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
-import org.w3c.css.values.CssExpression;
-import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
+import org.w3c.css.values.CssExpression;
 
 /**
  * Be careful, this is not a CSS1 property !
@@ -58,13 +68,22 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */
-    public CssBorderTopStyle(ApplContext ac, CssExpression expression) 
-	throws InvalidParamException {
+    public CssBorderTopStyle(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
 	
 	setByUser();
 	face = new CssBorderFaceStyle(ac, expression);
     }
     
+    public CssBorderTopStyle(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression,false);
+    }
+    
     /**
      * Returns the value of this property
      */
@@ -76,14 +95,20 @@
      * Returns the value
      */
     public String getStyle() {
-	return face.getStyle();
+	if(face != null) {
+	    return face.getStyle();
+	}
+	return null;
     }
     
     /**
      * Returns a string representation of the object.
      */
     public String toString() {
-	return face.toString();
+	if(face != null) {
+	    return face.toString();
+	}
+	return "";
     }
     
     /**

Index: CssLineHeight.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssLineHeight.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- CssLineHeight.java	20 Aug 2002 09:06:01 -0000	1.4
+++ CssLineHeight.java	8 Aug 2005 13:18:12 -0000	1.5
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.5  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.4  2002/08/20 09:06:01  sijtsche
  * value initial added
  *
@@ -46,14 +56,14 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssLength;
+import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssPercentage;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -91,15 +101,15 @@
 
     private CssValue value;
     private static CssIdent normal = new CssIdent("normal");
-	private static CssIdent number = new CssIdent("number");
-	private static CssIdent none = new CssIdent("none");
-	private static CssIdent initial = new CssIdent("initial");
+    private static CssIdent number = new CssIdent("number");
+    private static CssIdent none = new CssIdent("none");
+    private static CssIdent initial = new CssIdent("initial");
 
     /**
      * Create a new CssLineHeight
      */
     public CssLineHeight() {
-		value = normal;
+	value = normal;
     }
 
     /**
@@ -108,8 +118,12 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */
-    public CssLineHeight(ApplContext ac, CssExpression expression)
-	    throws InvalidParamException {
+    public CssLineHeight(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
 
 	CssValue val = expression.getValue();
 
@@ -152,6 +166,11 @@
 					getPropertyName(), ac);
     }
 
+    public CssLineHeight(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssProperty.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssProperty.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- CssProperty.java	20 Oct 2003 13:15:49 -0000	1.4
+++ CssProperty.java	8 Aug 2005 13:18:12 -0000	1.5
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.5  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.4  2003/10/20 13:15:49  ylafon
  * formatting
  *
@@ -30,15 +40,13 @@
  */
 package org.w3c.css.properties;
 
+import org.w3c.css.css.StyleSheetOrigin;
+import org.w3c.css.parser.CssPrinterStyle;
 import org.w3c.css.parser.CssSelectors;
 import org.w3c.css.parser.CssStyle;
-import org.w3c.css.parser.CssPrinterStyle;
 import org.w3c.css.util.ApplContext;
-
 import org.w3c.css.values.CssIdent;
 
-import org.w3c.css.css.StyleSheetOrigin;
-
 /**
  * <DL>
  * <DT>
@@ -107,6 +115,11 @@
     public static final CssIdent inherit = new CssIdent("inherit");
 
     /**
+     * Used in all CSS versions
+     */
+    public static final CssIdent transparent = new CssIdent("transparent");
+    
+    /**
     * Value introduced in CSS3
     */
     public static final CssIdent initial = new CssIdent("initial");

Index: CssFontSize.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssFontSize.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssFontSize.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssFontSize.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -53,14 +63,14 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.values.CssPercentage;
-import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssLength;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssNumber;
+import org.w3c.css.values.CssPercentage;
+import org.w3c.css.values.CssValue;
 
 
 /**
@@ -137,7 +147,13 @@
      * @param expression the expression of the size
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssFontSize(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssFontSize(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	setByUser();
 	if (val instanceof CssIdent) {
@@ -182,6 +198,11 @@
 					val, getPropertyName(), ac);
     }
     
+    public CssFontSize(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the current value
      */  

Index: CssListStyleTypeTV.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssListStyleTypeTV.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CssListStyleTypeTV.java	19 Aug 2002 07:39:14 -0000	1.1
+++ CssListStyleTypeTV.java	8 Aug 2005 13:18:12 -0000	1.2
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.2  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.1  2002/08/19 07:39:14  sijtsche
  * new TV profile property variant
  *
@@ -34,11 +44,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -79,7 +89,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */
-    public CssListStyleTypeTV(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssListStyleTypeTV(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 
 	setByUser();
@@ -93,10 +109,14 @@
 		    return;
 		}
 	}
-
 	throw new InvalidParamException("value", val, getPropertyName(), ac);
     }
 
+    public CssListStyleTypeTV(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssBorderStyleCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderStyleCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderStyleCSS1.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderStyleCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -23,12 +33,12 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssPrinterStyle;
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssSelectors;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
 import org.w3c.css.values.CssOperator;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  *   <H4>
@@ -102,239 +112,274 @@
  * @version $Revision$ 
  */
 public class CssBorderStyleCSS1 extends CssProperty implements CssOperator {
-
-  CssBorderTopStyleCSS1 top;
-  CssBorderBottomStyleCSS1 bottom;
-  CssBorderRightStyleCSS1 right;
-  CssBorderLeftStyleCSS1 left;
-
-  /**
-   * Create a new CssBorderStyleCSS1
-   */
-  public CssBorderStyleCSS1(CssBorderTopStyleCSS1 top,
-			CssBorderBottomStyleCSS1 bottom,
-			CssBorderRightStyleCSS1 right,
-			CssBorderLeftStyleCSS1 left) {
-    this.top = top;
-    this.bottom = bottom;
-    this.left = left;
-    this.right = right;
-  }  
-
-  /**
-   * Create a new CssBorderStyleCSS1
-   *
-   * @param expression The expression for this property
-   * @exception InvalidParamException Values are incorrect
-   */  
-  public CssBorderStyleCSS1(ApplContext ac, CssExpression expression) throws InvalidParamException {
-
+    
+    CssBorderTopStyleCSS1 top;
+    CssBorderBottomStyleCSS1 bottom;
+    CssBorderRightStyleCSS1 right;
+    CssBorderLeftStyleCSS1 left;
+    
+    /**
+     * Create a new CssBorderStyleCSS1
+     */
+    public CssBorderStyleCSS1(CssBorderTopStyleCSS1 top,
+	    CssBorderBottomStyleCSS1 bottom,
+	    CssBorderRightStyleCSS1 right,
+	    CssBorderLeftStyleCSS1 left) {
+	
+	this.top = top;
+	this.bottom = bottom;
+	this.left = left;
+	this.right = right;
+    }  
+    
+    /**
+     * Create a new CssBorderStyleCSS1
+     *
+     * @param expression The expression for this property
+     * @exception InvalidParamException Values are incorrect
+     */  
+    public CssBorderStyleCSS1(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
 	setByUser();
-
-    switch (expression.getCount()) {
-    case 1:
-      top = new CssBorderTopStyleCSS1(ac, expression);
-      bottom = new CssBorderBottomStyleCSS1((CssBorderFaceStyleCSS1) top.get());
-      right = new CssBorderRightStyleCSS1((CssBorderFaceStyleCSS1) top.get());
-      left = new CssBorderLeftStyleCSS1((CssBorderFaceStyleCSS1) top.get());
-      break;
-    case 2:
-      if (expression.getOperator() != SPACE)
-	throw new InvalidParamException("operator", 
-					((new Character(expression.getOperator())).toString()),
-					ac);
-      top = new CssBorderTopStyleCSS1(ac, expression);
-      right = new CssBorderRightStyleCSS1(ac, expression);
-      bottom = new CssBorderBottomStyleCSS1((CssBorderFaceStyleCSS1) top.get());
-      left = new CssBorderLeftStyleCSS1((CssBorderFaceStyleCSS1) right.get());
-      break;
-    case 3:
-      if (expression.getOperator() != SPACE)
-	throw new InvalidParamException("operator", 
-					((new Character(expression.getOperator())).toString()),
-					ac);
-      top = new CssBorderTopStyleCSS1(ac, expression);
-      if (expression.getOperator() != SPACE)
-	throw new InvalidParamException("operator", 
-					((new Character(expression.getOperator())).toString()),
-					ac);
-      right = new CssBorderRightStyleCSS1(ac, expression);
-      bottom = new CssBorderBottomStyleCSS1(ac, expression);
-      left = new CssBorderLeftStyleCSS1((CssBorderFaceStyleCSS1) right.get());
-      break;
-    default:
-      if (expression.getOperator() != SPACE)
-	throw new InvalidParamException("operator", 
-					((new Character(expression.getOperator())).toString()),
-					ac);
-      top = new CssBorderTopStyleCSS1(ac, expression);
-      if (expression.getOperator() != SPACE)
-	throw new InvalidParamException("operator", 
-					((new Character(expression.getOperator())).toString()),
-					ac);
-      right = new CssBorderRightStyleCSS1(ac, expression);
-      if (expression.getOperator() != SPACE)
-	throw new InvalidParamException("operator", 
-					((new Character(expression.getOperator())).toString()),
-					ac);
-      bottom = new CssBorderBottomStyleCSS1(ac, expression);
-      left = new CssBorderLeftStyleCSS1(ac, expression);
-      break;
+	
+	switch (expression.getCount()) {
+	case 1:
+	    top = new CssBorderTopStyleCSS1(ac, expression);
+	    bottom = new CssBorderBottomStyleCSS1((CssBorderFaceStyleCSS1) top.get());
+	    right = new CssBorderRightStyleCSS1((CssBorderFaceStyleCSS1) top.get());
+	    left = new CssBorderLeftStyleCSS1((CssBorderFaceStyleCSS1) top.get());
+	    break;
+	case 2:
+	    if (expression.getOperator() != SPACE)
+		throw new InvalidParamException("operator", 
+			((new Character(expression.getOperator())).toString()),
+			ac);
+	    top = new CssBorderTopStyleCSS1(ac, expression);
+	    right = new CssBorderRightStyleCSS1(ac, expression);
+	    bottom = new CssBorderBottomStyleCSS1((CssBorderFaceStyleCSS1) top.get());
+	    left = new CssBorderLeftStyleCSS1((CssBorderFaceStyleCSS1) right.get());
+	    break;
+	case 3:
+	    if (expression.getOperator() != SPACE)
+		throw new InvalidParamException("operator", 
+			((new Character(expression.getOperator())).toString()),
+			ac);
+	    top = new CssBorderTopStyleCSS1(ac, expression);
+	    if (expression.getOperator() != SPACE)
+		throw new InvalidParamException("operator", 
+			((new Character(expression.getOperator())).toString()),
+			ac);
+	    right = new CssBorderRightStyleCSS1(ac, expression);
+	    bottom = new CssBorderBottomStyleCSS1(ac, expression);
+	    left = new CssBorderLeftStyleCSS1((CssBorderFaceStyleCSS1) right.get());
+	    break;
+	case 4:
+	    if (expression.getOperator() != SPACE)
+		throw new InvalidParamException("operator", 
+			((new Character(expression.getOperator())).toString()),
+			ac);
+	    top = new CssBorderTopStyleCSS1(ac, expression);
+	    if (expression.getOperator() != SPACE)
+		throw new InvalidParamException("operator", 
+			((new Character(expression.getOperator())).toString()),
+			ac);
+	    right = new CssBorderRightStyleCSS1(ac, expression);
+	    if (expression.getOperator() != SPACE)
+		throw new InvalidParamException("operator", 
+			((new Character(expression.getOperator())).toString()),
+			ac);
+	    bottom = new CssBorderBottomStyleCSS1(ac, expression);
+	    left = new CssBorderLeftStyleCSS1(ac, expression);
+	    break;
+	default:
+	    if(check) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	}
     }
-  }
-
-  /**
-   * Returns the value of this property
-   */
-  public Object get() {
-    return top;
-  }
-
-  /**
-   * Returns the name of this property
-   */  
-  public String getPropertyName() {
-    return "border-style";
-  }
-
-  /**
-   * Returns a string representation of the object.
-   */
-  public String toString() {
-    if (right.face.equals(left.face)) {
-      if (top.face.equals(bottom.face)) {
-	if (top.face.equals(right.face)) {
-	  return top.toString();
+    
+    public CssBorderStyleCSS1(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression,false);
+    }
+    
+    /**
+     * Returns the value of this property
+     */
+    public Object get() {
+	return top;
+    }
+    
+    /**
+     * Returns the name of this property
+     */  
+    public String getPropertyName() {
+	return "border-style";
+    }
+    
+    /**
+     * Returns a string representation of the object.
+     */
+    public String toString() {      
+	if (right.face.equals(left.face)) {
+	    if (top.face.equals(bottom.face)) {
+		if (top.face.equals(right.face)) {
+		    return top.toString();
+		} else {
+		    return top + " " + right;
+		}
+	    } else {
+		return top + " " + right + " " + bottom;
+	    }
 	} else {
-	  return top + " " + right;
+	    return top + " " + right + " " + bottom + " " + left;
 	}
-      } else {
-	return top + " " + right + " " + bottom;
-      }
-    } else {
-      return top + " " + right + " " + bottom + " " + left;
     }
-  }
-
-  /**
-   * Set this property to be important.
-   * Overrides this method for a macro
-   */  
-  public void setImportant() {
-    top.important = true;
-    right.important = true;
-    left.important = true;
-    bottom.important = true;
-  }
-
-  /**
-   * Returns true if this property is important.
-   * Overrides this method for a macro
-   */
-  public boolean getImportant() {
-    return ((top == null || top.important) &&
-	    (right == null || right.important) &&
-	    (left == null || left.important) &&
-	    (bottom == null || bottom.important));
-  }
-
-  /**
-   * Print this property.
-   *
-   * @param printer The printer.
-   * @see #toString()
-   * @see #getPropertyName()
-   */  
-  public void print(CssPrinterStyle printer) {
-    if ((top != null && right != null &&
-	  left != null && bottom != null) &&
-	(getImportant() ||
-	 (!top.important &&
-	  !right.important &&
-	  !left.important &&
-	  !bottom.important))) {
-      printer.print(this);
-    } else {
-      if (top != null)
-	top.print(printer);
-      if (right != null)
-	right.print(printer);
-      if (left != null)
-	left.print(printer);
-      if (bottom != null)
-	bottom.print(printer);
+    
+    /**
+     * Set this property to be important.
+     * Overrides this method for a macro
+     */  
+    public void setImportant() {
+	if(top != null) {
+	    top.important = true;
+	}
+	if(right != null) {
+	    right.important = true;
+	}
+	if(left != null) {
+	    left.important = true;
+	}
+	if(bottom != null) {
+	    bottom.important = true;
+	}
+    }
+    
+    /**
+     * Returns true if this property is important.
+     * Overrides this method for a macro
+     */
+    public boolean getImportant() {
+	return ((top == null || top.important) &&
+		(right == null || right.important) &&
+		(left == null || left.important) &&
+		(bottom == null || bottom.important));
     }
+    
+    /**
+     * Print this property.
+     *
+     * @param printer The printer.
+     * @see #toString()
+     * @see #getPropertyName()
+     */  
+    public void print(CssPrinterStyle printer) {
+	if ((top != null && right != null &&
+		left != null && bottom != null) &&
+		(getImportant() ||
+			(!top.important &&
+				!right.important &&
+				!left.important &&
+				!bottom.important))) {
+	    printer.print(this);
+	} else {
+	    if (top != null)
+		top.print(printer);
+	    if (right != null)
+		right.print(printer);
+	    if (left != null)
+		left.print(printer);
+	    if (bottom != null)
+		bottom.print(printer);
+	}
 	
-  }
-
-  /**
-   * Set the context.
-   * Overrides this method for a macro
-   *
-   * @see org.w3c.css.css.CssCascadingOrder#order
-   * @see org.w3c.css.css.StyleSheetParser#handleRule
-   */
-  public void setSelectors(CssSelectors selector) {
-    super.setSelectors(selector);
-    if (top != null) {
-      top.setSelectors(selector);
     }
-    if (right != null) {
-      right.setSelectors(selector);
+    
+    /**
+     * Set the context.
+     * Overrides this method for a macro
+     *
+     * @see org.w3c.css.css.CssCascadingOrder#order
+     * @see org.w3c.css.css.StyleSheetParser#handleRule
+     */
+    public void setSelectors(CssSelectors selector) {
+	super.setSelectors(selector);
+	if (top != null) {
+	    top.setSelectors(selector);
+	}
+	if (right != null) {
+	    right.setSelectors(selector);
+	}
+	if (bottom != null) {
+	    bottom.setSelectors(selector);
+	}
+	if (left != null) {
+	    left.setSelectors(selector);
+	}
     }
-    if (bottom != null) {
-      bottom.setSelectors(selector);
+    
+    /**
+     * Add this property to the CssStyle
+     *
+     * @param style The CssStyle
+     */
+    public void addToStyle(ApplContext ac, CssStyle style) {
+	if(top != null) {
+	    top.addToStyle(ac, style);
+	}
+	if(right != null) {
+	    right.addToStyle(ac, style);
+	}
+	if(left != null) {
+	    left.addToStyle(ac, style);
+	}
+	if(bottom != null) {
+	    bottom.addToStyle(ac, style);
+	}
     }
-    if (left != null) {
-      left.setSelectors(selector);
+    
+    /**
+     * Get this property in the style.
+     *
+     * @param style The style where the property is
+     * @param resolve if true, resolve the style to find this property
+     */  
+    public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
+	throw new IllegalStateException("Can't invoke this method on the property " + 
+		getPropertyName());
+    }
+    
+    /**
+     * Update the source file and the line.
+     * Overrides this method for a macro
+     *
+     * @param line The line number where this property is defined
+     * @param source The source file where this property is defined
+     */  
+    public void setInfo(int line, String source) {
+	super.setInfo(line, source);
+	if(top != null) {
+	    top.setInfo(line, source);
+	}
+	if(right != null) {
+	    right.setInfo(line, source);
+	}
+	if(left != null) {
+	    left.setInfo(line, source);
+	}
+	if(bottom != null) {
+	    bottom.setInfo(line, source);	
+	}
+    }
+    
+    /**
+     * Compares two properties for equality.
+     *
+     * @param value The other property.
+     */  
+    public boolean equals(CssProperty property) {
+	return false; // FIXME
     }
-  }
-  
-  /**
-   * Add this property to the CssStyle
-   *
-   * @param style The CssStyle
-   */
-  public void addToStyle(ApplContext ac, CssStyle style) {
-    top.addToStyle(ac, style);
-    right.addToStyle(ac, style);
-    left.addToStyle(ac, style);
-    bottom.addToStyle(ac, style);
-  }
-
-  /**
-   * Get this property in the style.
-   *
-   * @param style The style where the property is
-   * @param resolve if true, resolve the style to find this property
-   */  
-  public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
-    throw new IllegalStateException("Can't invoke this method on the property " + 
-				    getPropertyName());
-  }
-
-  /**
-   * Update the source file and the line.
-   * Overrides this method for a macro
-   *
-   * @param line The line number where this property is defined
-   * @param source The source file where this property is defined
-   */  
-  public void setInfo(int line, String source) {
-    super.setInfo(line, source);
-    top.setInfo(line, source);
-    right.setInfo(line, source);
-    left.setInfo(line, source);
-    bottom.setInfo(line, source);
-  }
-  
-  /**
-   * Compares two properties for equality.
-   *
-   * @param value The other property.
-   */  
-  public boolean equals(CssProperty property) {
-    return false;
-  }
 
 }

Index: CssColorCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssColorCSS1.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- CssColorCSS1.java	29 Aug 2003 12:31:59 -0000	1.4
+++ CssColorCSS1.java	8 Aug 2005 13:18:12 -0000	1.5
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.5  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.4  2003/08/29 12:31:59  plehegar
  * Fixed equals
  *
@@ -52,11 +62,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -85,7 +95,6 @@
      * Create a new CssColor
      */
     public CssColorCSS1() {
-	color = inherit;
     }
 
     /**
@@ -93,14 +102,16 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */
-    public CssColorCSS1(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssColorCSS1(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
 	CssValue val = expression.getValue();
 	setByUser();
 
-	if (val.equals(inherit)) {
-	    color = inherit;
-	    expression.next();
-	} else if (val instanceof org.w3c.css.values.CssColor) {
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
+	if (val instanceof org.w3c.css.values.CssColor) {
 	    color = val;
 	    expression.next();
 	} else if (val instanceof CssIdent) {
@@ -112,6 +123,11 @@
 	}
     }
 
+    public CssColorCSS1(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssBackgroundAttachment.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBackgroundAttachment.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBackgroundAttachment.java	8 Apr 2002 21:17:42 -0000	1.2
+++ CssBackgroundAttachment.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:42  plehegar
  * New
  *
@@ -31,11 +41,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -80,12 +90,17 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssBackgroundAttachment(ApplContext ac, CssExpression expression) 
-	throws InvalidParamException {
+    public CssBackgroundAttachment(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
 	
 	CssValue val = expression.getValue();
-	
+
 	if (val instanceof CssIdent) {
 	    int hash = val.hashCode();
 	    for (int i =0; i < ATTACHMENT.length; i++)
@@ -100,6 +115,11 @@
 					getPropertyName(), ac);
     }
     
+    public CssBackgroundAttachment(ApplContext ac, CssExpression expression) 
+    	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssBorderFaceColorCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderFaceColorCSS2.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CssBorderFaceColorCSS2.java	29 Aug 2003 15:23:39 -0000	1.3
+++ CssBorderFaceColorCSS2.java	8 Aug 2005 13:18:12 -0000	1.4
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.4  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.3  2003/08/29 15:23:39  plehegar
  * Fix from Sijtsche
  *
@@ -21,19 +31,18 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  * @version $Revision$
  */
 public class CssBorderFaceColorCSS2 {
 
-    CssValue face;
+    CssValue face;       
 
     /**
      * Create a new CssBorderFaceColor
@@ -66,8 +75,12 @@
      * @param expression The expression for this property.
      * @exception InvalidParamException color is not a color
      */
-    public CssBorderFaceColorCSS2(ApplContext ac, CssExpression expression)
-	throws InvalidParamException {
+    public CssBorderFaceColorCSS2(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
 
 	CssValue val = expression.getValue();
 
@@ -75,6 +88,8 @@
 	    face = val;
 	} else if (val.equals(CssProperty.inherit)) {
 	    face = CssProperty.inherit;
+	} else if(val.equals(CssProperty.transparent)) {	    
+	  face = CssProperty.transparent;  
 	} else if (val instanceof CssIdent) {
 	    face = new org.w3c.css.values.CssColorCSS2(ac, (String) val.get());
 	} else {
@@ -84,6 +99,11 @@
 	expression.next();
     }
 
+    public CssBorderFaceColorCSS2(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the internal color
      */
@@ -96,14 +116,20 @@
      * It is used by all macro for the function <code>print</code>
      */
     public boolean isDefault() {
-	return false; // @@ FIXME face.isDefault();
+	if(face != null) {
+	    return face.isDefault(); // @@ FIXME face.isDefault();
+	}
+	return false;
     }
 
     /**
      * Returns a string representation of the object.
      */
     public String toString() {
-	return face.toString();
+	if(face != null) {
+	    return face.toString();
+	}
+	return "";
     }
 
     /**
@@ -112,6 +138,6 @@
      * @param value The another faces.
      */
     public boolean equals(CssBorderFaceColorCSS2 color) {
-	return this.face.equals(color.face);
+	return this.face.equals(color.face); // FIXME
     }
 }

Index: CssBorderLeftWidthCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderLeftWidthCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderLeftWidthCSS1.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderLeftWidthCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -22,10 +32,10 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
 import org.w3c.css.values.CssValue;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  *   <H4>
@@ -59,102 +69,117 @@
  * @version $Revision$
  */
 public class CssBorderLeftWidthCSS1 extends CssProperty {
-
-  CssBorderFaceWidthCSS1 face;
-  
-  /**
-   * Create a new CssBorderLeftWidthCSS1
-   */
-  public CssBorderLeftWidthCSS1() {
-    face = new CssBorderFaceWidthCSS1();
-  }
-  
-  /**
-   * Create a new CssBorderLeftWidthCSS1 with an another CssBorderFaceWidthCSS1
-   *
-   * @param another The another side.
-   */
-  public CssBorderLeftWidthCSS1(CssBorderFaceWidthCSS1 another) {
+    
+    CssBorderFaceWidthCSS1 face;
+    
+    /**
+     * Create a new CssBorderLeftWidthCSS1
+     */
+    public CssBorderLeftWidthCSS1() {
+	face = new CssBorderFaceWidthCSS1();
+    }
+    
+    /**
+     * Create a new CssBorderLeftWidthCSS1 with an another CssBorderFaceWidthCSS1
+     *
+     * @param another The another side.
+     */
+    public CssBorderLeftWidthCSS1(CssBorderFaceWidthCSS1 another) {
 	setByUser();
-
-    face = another;
-  }
-  
-  /**
-   * Create a new CssBorderLeftWidthCSS1
-   *
-   * @param expression The expression for this property.
-   * @exception InvalidParamException Values are incorrect
-   */
-  public CssBorderLeftWidthCSS1(ApplContext ac, CssExpression expression)
-    throws InvalidParamException {
+	
+	face = another;
+    }
     
+    /**
+     * Create a new CssBorderLeftWidthCSS1
+     *
+     * @param expression The expression for this property.
+     * @exception InvalidParamException Values are incorrect
+     */
+    public CssBorderLeftWidthCSS1(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
-    face = new CssBorderFaceWidthCSS1(ac, expression);
-  }
-  
-  /**
-   * Returns the value of this property
-   */
-  public Object get() {
-    return face;
-  }
-
-  /**
-   * Return the value of this property
-   */
-  public CssValue getValue() {
-    return face.getValue();
-  }
-
-  /**
-   * Returns a string representation of the object.
-   */
-  public String toString() {
-    return face.toString();
-  }
-
-  /**
-   * Returns the name of this property
-   */  
-  public String getPropertyName() {
-    return "border-left-width";
-  }
-
-  /**
-   * Add this property to the CssStyle.
-   *
-   * @param style The CssStyle
-   */
-  public void addToStyle(ApplContext ac, CssStyle style) {
-    CssBorderLeftCSS1 left = ((Css1Style) style).cssBorderCSS1.left;
-    if (left.width != null)
-      style.addRedefinitionWarning(ac, this);
-    left.width = this;
-  }
-
-  /**
-   * Get this property in the style.
-   *
-   * @param style The style where the property is
-   * @param resolve if true, resolve the style to find this property
-   */  
-  public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
-    if (resolve) {
-      return ((Css1Style) style).getBorderLeftWidthCSS1();
-    } else {
-      return ((Css1Style) style).cssBorderCSS1.getLeft().width;
+	face = new CssBorderFaceWidthCSS1(ac, expression);
     }
-  }
-
-  /**
-   * Compares two properties for equality.
-   *
-   * @param value The other property.
-   */  
-  public boolean equals(CssProperty property) {
-    return (property instanceof CssBorderLeftWidthCSS1 && 
-	    face.equals(((CssBorderLeftWidthCSS1) property).face));
-  }
-
+    
+    public CssBorderLeftWidthCSS1(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression,false);
+    }
+    
+    /**
+     * Returns the value of this property
+     */
+    public Object get() {
+	return face;
+    }
+    
+    /**
+     * Return the value of this property
+     */
+    public CssValue getValue() {
+	if(face != null) {
+	    return face.getValue();
+	}
+	return null;
+    }
+    
+    /**
+     * Returns a string representation of the object.
+     */
+    public String toString() {
+	if(face != null) {
+	    return face.toString();
+	}
+	return "";
+    }
+    
+    /**
+     * Returns the name of this property
+     */  
+    public String getPropertyName() {
+	return "border-left-width";
+    }
+    
+    /**
+     * Add this property to the CssStyle.
+     *
+     * @param style The CssStyle
+     */
+    public void addToStyle(ApplContext ac, CssStyle style) {
+	CssBorderLeftCSS1 left = ((Css1Style) style).cssBorderCSS1.left;
+	if (left.width != null)
+	    style.addRedefinitionWarning(ac, this);
+	left.width = this;
+    }
+    
+    /**
+     * Get this property in the style.
+     *
+     * @param style The style where the property is
+     * @param resolve if true, resolve the style to find this property
+     */  
+    public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
+	if (resolve) {
+	    return ((Css1Style) style).getBorderLeftWidthCSS1();
+	} else {
+	    return ((Css1Style) style).cssBorderCSS1.getLeft().width;
+	}
+    }
+    
+    /**
+     * Compares two properties for equality.
+     *
+     * @param value The other property.
+     */  
+    public boolean equals(CssProperty property) {
+	return (property instanceof CssBorderLeftWidthCSS1 && 
+		face.equals(((CssBorderLeftWidthCSS1) property).face));
+    }
+    
 }

Index: CssListStyleImageCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssListStyleImageCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssListStyleImageCSS2.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssListStyleImageCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -31,12 +41,12 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssURL;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssURL;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -76,8 +86,13 @@
      * @param value The value for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssListStyleImageCSS2(ApplContext ac, CssExpression expression) 
-	    throws InvalidParamException {
+    public CssListStyleImageCSS2(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	
 	setByUser();
@@ -96,6 +111,11 @@
 	}
     }
     
+    public CssListStyleImageCSS2(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssFontWeightCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssFontWeightCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssFontWeightCSS1.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssFontWeightCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -19,12 +29,12 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssNumber;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -168,7 +178,13 @@
      * @param expr the expression
      * @exception InvalidParamException values are incorrect
      */  
-    public CssFontWeightCSS1(ApplContext ac, CssExpression expr) throws InvalidParamException {
+    public CssFontWeightCSS1(ApplContext ac, CssExpression expr, boolean check)
+    	throws InvalidParamException {
+	
+	if(check && expr.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expr.getValue();
 	
 	setByUser();
@@ -198,6 +214,11 @@
 					getPropertyName(), ac);
     }
     
+    public CssFontWeightCSS1(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the current value.
      */  

Index: Css1Style.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/Css1Style.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Css1Style.java	19 Aug 2002 07:41:36 -0000	1.3
+++ Css1Style.java	8 Aug 2005 13:18:12 -0000	1.4
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.4  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.3  2002/08/19 07:41:36  sijtsche
  * new properties added
  *
@@ -43,19 +53,18 @@
 
 package org.w3c.css.properties;
 
-import java.util.*;
+import java.util.Enumeration;
 
+import org.w3c.css.parser.CssPrinterStyle;
 import org.w3c.css.parser.CssSelectors;
 import org.w3c.css.parser.CssStyle;
-import org.w3c.css.parser.CssPrinterStyle;
-import org.w3c.css.values.CssPercentage;
-import org.w3c.css.values.CssLength;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.css.StyleSheet;
-import org.w3c.css.util.Warning;
+import org.w3c.css.util.ApplContext;
 import org.w3c.css.util.Util;
+import org.w3c.css.util.Warning;
 import org.w3c.css.util.Warnings;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssLength;
+import org.w3c.css.values.CssPercentage;
+import org.w3c.css.values.CssValue;
 
 /**
  * The Css1Style main class.
@@ -1656,7 +1665,7 @@
     /**
      * Get the border property
      */
-    public final CssBorder getBorder() {
+    public final CssBorder getBorder() {	
 	getBorderTop();
 	getBorderRight();
 	getBorderBottom();
@@ -2653,7 +2662,7 @@
 	    while (allSelectors.hasMoreElements()) {
 		// looking for inherited values.
 		Css1Style style =
-		    (Css1Style) ((CssSelectors) allSelectors.nextElement()).getStyle();
+		    (Css1Style) ((CssSelectors) allSelectors.nextElement()).getStyle();		
 		if (style.cssBackground.getColor() != null) {
 		    if (style.cssBackground.getColor().equals(cssColor.getColor())) {
 			warnings.addWarning(new Warning(cssColor, "same-colors2", 1,

Index: CssVerticalAlign.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssVerticalAlign.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssVerticalAlign.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssVerticalAlign.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -34,14 +44,14 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
+import org.w3c.css.values.CssLength;
 import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssPercentage;
-import org.w3c.css.values.CssLength;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -137,7 +147,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssVerticalAlign(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssVerticalAlign(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	int hash = val.hashCode();
 	
@@ -167,6 +183,11 @@
 	}
     }
     
+    public CssVerticalAlign(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssBorderRightColor.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderRightColor.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderRightColor.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderRightColor.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -26,122 +36,137 @@
 
 import org.w3c.css.parser.CssPrinterStyle;
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
 import org.w3c.css.values.CssValue;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  * Be careful, this is not a CSS1 property !
  * @version $Revision$
  */
 public class CssBorderRightColor extends CssProperty {
-
-  CssBorderFaceColor face;
-  
-  /**
-   * Create a new CssBorderRightColor
-   */
-  public CssBorderRightColor() {
-    face = new CssBorderFaceColor();
-  }
-  
-  /**
-   * Create a new CssBorderRightColor with an another CssBorderFaceColor
-   *
-   * @param anothewr The another side.
-   */
-  public CssBorderRightColor(CssBorderFaceColor another) {
-
-      setByUser();
-
-    face = another;
-  }
-  
-  /**
-   * Create a new CssBorderRightColor.
-   *
-   * @param expression The expression for this property.
-   * @exception InvalidParamException Values are incorrect
-   */
-  public CssBorderRightColor(ApplContext ac, CssExpression expression) 
-    throws InvalidParamException {
-
+    
+    CssBorderFaceColor face;
+    
+    /**
+     * Create a new CssBorderRightColor
+     */
+    public CssBorderRightColor() {
+	face = new CssBorderFaceColor();
+    }
+    
+    /**
+     * Create a new CssBorderRightColor with an another CssBorderFaceColor
+     *
+     * @param anothewr The another side.
+     */
+    public CssBorderRightColor(CssBorderFaceColor another) {
+	
 	setByUser();
-    face = new CssBorderFaceColor(ac, expression);
-  }
-  
-  /**
-   * Returns the value of this property
-   */
-  public Object get() {
-    return face;
-  }
-
-  /**
-   * Returns the color of this property
-   */
-  public CssValue getColor() {
-    return face.getColor();
-  }
-
-  /**
-   * Returns a string representation of the object.
-   */
-  public String toString() {
-    return face.toString();
-  }
-
-  /**
-   * Returns the name of this property
-   */  
-  public String getPropertyName() {
-    return "border-right-color";
-  }
-
-  /**
-   * Add this property to the CssStyle.
-   *
-   * @param style The CssStyle
-   */
-  public void addToStyle(ApplContext ac, CssStyle style) {
-    CssBorderRight right = ((Css1Style) style).cssBorder.right;
-    if (right.color != null)
-      style.addRedefinitionWarning(ac, this);
-    right.color = this;
-  }
-
-  /**
-   * Get this property in the style.
-   *
-   * @param style The style where the property is
-   * @param resolve if true, resolve the style to find this property
-   */  
-  public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
-    if (resolve) {
-      return ((Css1Style) style).getBorderRightColor();
-    } else {
-      return ((Css1Style) style).cssBorder.getRight().color;
+	
+	face = another;
+    }
+    
+    /**
+     * Create a new CssBorderRightColor.
+     *
+     * @param expression The expression for this property.
+     * @exception InvalidParamException Values are incorrect
+     */
+    public CssBorderRightColor(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
+	setByUser();
+	face = new CssBorderFaceColor(ac, expression);
+    }
+    
+    public CssBorderRightColor(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression,false);
+    }
+    
+    /**
+     * Returns the value of this property
+     */
+    public Object get() {
+	return face;
+    }
+    
+    /**
+     * Returns the color of this property
+     */
+    public CssValue getColor() {
+	if(face != null) {
+	    return face.getColor();
+	}
+	return null;
+    }
+    
+    /**
+     * Returns a string representation of the object.
+     */
+    public String toString() {
+	if(face != null) {
+	    return face.toString();
+	}
+	return "";
+    }
+    
+    /**
+     * Returns the name of this property
+     */  
+    public String getPropertyName() {
+	return "border-right-color";
+    }
+    
+    /**
+     * Add this property to the CssStyle.
+     *
+     * @param style The CssStyle
+     */
+    public void addToStyle(ApplContext ac, CssStyle style) {
+	CssBorderRight right = ((Css1Style) style).cssBorder.right;
+	if (right.color != null)
+	    style.addRedefinitionWarning(ac, this);
+	right.color = this;
+    }
+    
+    /**
+     * Get this property in the style.
+     *
+     * @param style The style where the property is
+     * @param resolve if true, resolve the style to find this property
+     */  
+    public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
+	if (resolve) {
+	    return ((Css1Style) style).getBorderRightColor();
+	} else {
+	    return ((Css1Style) style).cssBorder.getRight().color;
+	}
+    }
+    
+    /**
+     * Compares two properties for equality.
+     *
+     * @param value The other property.
+     */  
+    public boolean equals(CssProperty property) {
+	return (property instanceof CssBorderRightColor && 
+		face.equals(((CssBorderRightColor) property).face));
+    }
+    
+    /**
+     * Print this property.
+     *
+     * @param printer The printer.
+     */  
+    public void print(CssPrinterStyle printer) {
+	if (face != null && !face.isDefault())
+	    printer.print(this);
     }
-  }
-
-  /**
-   * Compares two properties for equality.
-   *
-   * @param value The other property.
-   */  
-  public boolean equals(CssProperty property) {
-    return (property instanceof CssBorderRightColor && 
-	    face.equals(((CssBorderRightColor) property).face));
-  }
-
-  /**
-   * Print this property.
-   *
-   * @param printer The printer.
-   */  
-  public void print(CssPrinterStyle printer) {
-    if (!face.isDefault())
-      printer.print(this);
-  }
 }

Index: CssBorderBottomWidthCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderBottomWidthCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderBottomWidthCSS1.java	8 Apr 2002 21:17:42 -0000	1.2
+++ CssBorderBottomWidthCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:42  plehegar
  * New
  *
@@ -22,10 +32,10 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
 import org.w3c.css.values.CssValue;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  *   <H4>
@@ -84,11 +94,20 @@
    * @param expression The expression for this property.
    * @exception InvalidParamException Values are incorrect
    */
-  public CssBorderBottomWidthCSS1(ApplContext ac, CssExpression expression) 
-    throws InvalidParamException {
+  public CssBorderBottomWidthCSS1(ApplContext ac, CssExpression expression,
+	  boolean check) throws InvalidParamException {
+      
+      if(check && expression.getCount() > 1) {
+	  throw new InvalidParamException("unrecognize", ac);
+      }
 
       setByUser();
-    face = new CssBorderFaceWidthCSS1(ac, expression);
+      face = new CssBorderFaceWidthCSS1(ac, expression);
+  }
+  
+  public CssBorderBottomWidthCSS1(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
   }
   
   /**
@@ -102,14 +121,20 @@
    * Return the value of this property
    */
   public CssValue getValue() {
-    return face.getValue();
+      if(face != null) {
+	  return face.getValue();
+      }
+      return null;
   }
 
   /**
    * Returns a string representation of the object.
    */
   public String toString() {
-    return face.toString();
+      if(face != null) {
+	  return face.toString();
+      }
+      return "";
   }
 
   /**

Index: CssDirection.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssDirection.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssDirection.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssDirection.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -9,13 +9,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssLength;
-import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  */
@@ -39,7 +37,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssDirection(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssDirection(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	
 	setByUser();
@@ -59,6 +63,11 @@
 	
     }
     
+    public CssDirection(ApplContext ac, CssExpression expression)
+    	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssListStyleTypeCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssListStyleTypeCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssListStyleTypeCSS1.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssListStyleTypeCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -31,11 +41,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -76,7 +86,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssListStyleTypeCSS1(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssListStyleTypeCSS1(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	
 	setByUser();
@@ -94,6 +110,11 @@
 	throw new InvalidParamException("value", val, getPropertyName(), ac);
     }
     
+    public CssListStyleTypeCSS1(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssMinHeight.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssMinHeight.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssMinHeight.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssMinHeight.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -9,14 +9,13 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssLength;
+import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssPercentage;
-import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  */
@@ -36,7 +35,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssMinHeight(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssMinHeight(ApplContext ac, CssExpression expression, boolean check)
+    	throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	
 	setByUser();
@@ -60,6 +65,11 @@
 	expression.next();
     }
     
+    public CssMinHeight(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property.
      */

Index: CssBorderColorCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderColorCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderColorCSS2.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderColorCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -22,15 +32,13 @@
 
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssPrinterStyle;
 import org.w3c.css.parser.CssSelectors;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssOperator;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  *   <H4>
@@ -66,9 +74,7 @@
     CssBorderTopColorCSS2 top;
     CssBorderBottomColorCSS2 bottom;
     CssBorderRightColorCSS2 right;
-    CssBorderLeftColorCSS2 left;
-
-    private static CssIdent transparent = new CssIdent("transparent");
+    CssBorderLeftColorCSS2 left;    
     
     /**
      * Create a new CssBorderColorCSS2 with all four sides
@@ -89,13 +95,14 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssBorderColorCSS2(ApplContext ac, CssExpression expression)
-	throws InvalidParamException {
+    public CssBorderColorCSS2(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
 	
 	setByUser();
 	
 	switch (expression.getCount()) {
 	case 1:
+	    /*
 	    CssValue val = expression.getValue();
 	    if (val.equals(transparent)) {
 		top = new CssBorderTopColorCSS2();
@@ -105,19 +112,24 @@
 		top = new CssBorderTopColorCSS2();
 		top.face.face = inherit;
 		expression.next();
-	    } else {
-		top = new CssBorderTopColorCSS2(ac, expression);
-	    }
+	    } else{*/
+	    top = new CssBorderTopColorCSS2(ac, expression);
 	    bottom = new CssBorderBottomColorCSS2((CssBorderFaceColorCSS2) top.get());
 	    right = new CssBorderRightColorCSS2((CssBorderFaceColorCSS2) top.get());
 	    left = new CssBorderLeftColorCSS2((CssBorderFaceColorCSS2) top.get());
 	    break;
-	case 2:
+	case 2:	    
 	    if (expression.getOperator() != SPACE)
 		throw new InvalidParamException("operator", 
 						((new Character(expression.getOperator())).toString()),
 						ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    top = new CssBorderTopColorCSS2(ac, expression);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    right = new CssBorderRightColorCSS2(ac, expression);
 	    bottom = new CssBorderBottomColorCSS2((CssBorderFaceColorCSS2) top.get());
 	    left = new CssBorderLeftColorCSS2((CssBorderFaceColorCSS2) right.get());
@@ -127,35 +139,65 @@
 		throw new InvalidParamException("operator", 
 						((new Character(expression.getOperator())).toString()), 
 						ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    top = new CssBorderTopColorCSS2(ac, expression);
 	    if (expression.getOperator() != SPACE)
 		throw new InvalidParamException("operator", 
 						((new Character(expression.getOperator())).toString()), ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    right = new CssBorderRightColorCSS2(ac, expression);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    bottom = new CssBorderBottomColorCSS2(ac, expression);
 	    left = new CssBorderLeftColorCSS2((CssBorderFaceColorCSS2) right.get());
 	    break;
-	default:
+	case 4:
 	    if (expression.getOperator() != SPACE)
 		throw new InvalidParamException("operator", 
 						((new Character(expression.getOperator())).toString()),
 						ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    top = new CssBorderTopColorCSS2(ac, expression);
 	    if (expression.getOperator() != SPACE)
 		throw new InvalidParamException("operator", 
 						((new Character(expression.getOperator())).toString()),
 						ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    right = new CssBorderRightColorCSS2(ac, expression);
 	    if (expression.getOperator() != SPACE)
 		throw new InvalidParamException("operator", 
 						((new Character(expression.getOperator())).toString()),
 						ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    bottom = new CssBorderBottomColorCSS2(ac, expression);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    left = new CssBorderLeftColorCSS2(ac, expression);
 	    break;
+	default:
+	    if(check) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	}
     }
     
+    public CssBorderColorCSS2(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */
@@ -174,6 +216,21 @@
      * Returns a string representation of the object.
      */
     public String toString() {
+	/*String ret = "";
+	if(top != null) {
+	    ret += top + " ";
+	}
+	if(right != null) {
+	    ret += right + " ";
+	}
+	if(bottom != null) {
+	    ret += bottom + " ";
+	}
+	if(left != null) {
+	    ret += left;
+	}
+	return ret.trim();*/
+	
 	if (right.face.equals(left.face)) {
 	    if (top.face.equals(bottom.face)) {
 		if (top.face.equals(right.face)) {
@@ -187,6 +244,7 @@
 	} else {
 	    return top + " " + right + " " + bottom + " " + left;
 	}
+	
     }
     
     /**
@@ -194,10 +252,18 @@
      * Overrides this method for a macro
      */  
     public void setImportant() {
-	top.important = true;
-	right.important = true;
-	left.important = true;
-	bottom.important = true;
+	if(top != null) {
+	    top.important = true;
+	}
+	if(right != null) {
+	    right.important = true;
+	}
+	if(left != null) {
+	    left.important = true;
+	}
+	if(bottom != null) {
+	    bottom.important = true;
+	}
     }
     
     /**
@@ -271,10 +337,18 @@
      * @param style The CssStyle
      */
     public void addToStyle(ApplContext ac, CssStyle style) {
-	top.addToStyle(ac, style);
-	right.addToStyle(ac, style);
-	left.addToStyle(ac, style);
-	bottom.addToStyle(ac, style);
+	if(top != null) {
+	    top.addToStyle(ac, style);
+	}
+	if(right != null) {
+	    right.addToStyle(ac, style);
+	}
+	if(left != null) {
+	    left.addToStyle(ac, style);
+	}
+	if(bottom != null) {
+	    bottom.addToStyle(ac, style);
+	}
     }
     
     /**
@@ -297,10 +371,18 @@
      */  
     public void setInfo(int line, String source) {
 	super.setInfo(line, source);
-	top.setInfo(line, source);
-	right.setInfo(line, source);
-	left.setInfo(line, source);
-	bottom.setInfo(line, source);
+	if(top != null) {
+	    top.setInfo(line, source);
+	}
+	if(right != null) {
+	    right.setInfo(line, source);
+	}
+	if(left != null) {
+	    left.setInfo(line, source);
+	}
+	if(bottom != null) {
+	    bottom.setInfo(line, source);
+	}
     }
     
     /**
@@ -309,7 +391,7 @@
      * @param value The other property.
      */  
     public boolean equals(CssProperty property) {
-	return false;
+	return false; // FIXME
     }
     
 }

Index: CssBackgroundRepeatMob.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBackgroundRepeatMob.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBackgroundRepeatMob.java	8 Apr 2002 21:17:42 -0000	1.2
+++ CssBackgroundRepeatMob.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:42  plehegar
  * New
  *
@@ -31,11 +41,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -65,7 +75,8 @@
  *   In the example above, the image will only be repeated vertically.
  * @version $Revision$
  */
-public class CssBackgroundRepeatMob extends CssProperty implements CssBackgroundConstants {
+public class CssBackgroundRepeatMob extends CssProperty 
+	implements CssBackgroundConstants {
     
     int repeat;
     
@@ -83,8 +94,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssBackgroundRepeatMob(ApplContext ac, CssExpression expression) 
-	    throws InvalidParamException {
+    public CssBackgroundRepeatMob(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	setByUser();
 	
@@ -98,12 +114,16 @@
 		}
 	    }
 	}
-
 	
 	throw new InvalidParamException("value", expression.getValue(), 
 					getPropertyName(), ac);
     }
     
+    public CssBackgroundRepeatMob(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssBorderFaceColorCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderFaceColorCSS1.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CssBorderFaceColorCSS1.java	29 Aug 2003 15:23:39 -0000	1.3
+++ CssBorderFaceColorCSS1.java	8 Aug 2005 13:18:12 -0000	1.4
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.4  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.3  2003/08/29 15:23:39  plehegar
  * Fix from Sijtsche
  *
@@ -21,12 +31,11 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  * @version $Revision$
@@ -66,15 +75,17 @@
      * @param expression The expression for this property.
      * @exception InvalidParamException color is not a color
      */
-    public CssBorderFaceColorCSS1(ApplContext ac, CssExpression expression)
-	throws InvalidParamException {
+    public CssBorderFaceColorCSS1(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
 
 	CssValue val = expression.getValue();
 
 	if (val instanceof org.w3c.css.values.CssColor) {
 	    face = val;
-	} else if (val.equals(CssProperty.inherit)) {
-	    face = CssProperty.inherit;
 	} else if (val instanceof CssIdent) {
 	    face = new org.w3c.css.values.CssColorCSS1(ac, (String) val.get());
 	} else {
@@ -84,6 +95,11 @@
 	expression.next();
     }
 
+    public CssBorderFaceColorCSS1(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the internal color
      */
@@ -103,7 +119,10 @@
      * Returns a string representation of the object.
      */
     public String toString() {
-	return face.toString();
+	if(face != null) {
+	    return face.toString();
+	}
+	return "";
     }
 
     /**
@@ -112,6 +131,6 @@
      * @param value The another faces.
      */
     public boolean equals(CssBorderFaceColorCSS1 color) {
-	return this.face.equals(color.face);
+	return this.face.equals(color.face); // FIXME
     }
 }

Index: CssFontVariant.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssFontVariant.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssFontVariant.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssFontVariant.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -49,11 +59,10 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  *   <H4>
@@ -109,8 +118,14 @@
      * @param expression the font variant
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssFontVariant(ApplContext ac, CssExpression expression) 
+    public CssFontVariant(ApplContext ac, CssExpression expression,
+	    boolean check) 
 	    throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
 	if (expression.getValue() instanceof CssIdent) {
 	    int hash = expression.getValue().hashCode();
@@ -126,6 +141,11 @@
 					getPropertyName(), ac);
     }
     
+    public CssFontVariant(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the current value
      */  

Index: CssPaddingRight.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssPaddingRight.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssPaddingRight.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssPaddingRight.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -28,9 +38,9 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
-import org.w3c.css.values.CssExpression;
-import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
+import org.w3c.css.values.CssExpression;
 
 /**
  *   <H4>
@@ -76,9 +86,14 @@
    * @param expression The expression for this property.
    * @exception InvalidParamException Values are incorrect
    */
-  public CssPaddingRight(ApplContext ac, CssExpression expression)
+  public CssPaddingRight(ApplContext ac, CssExpression expression, boolean check)
     throws InvalidParamException {
-    super(ac, expression);
+    super(ac, expression, check);
+  }
+  
+  public CssPaddingRight(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
   }
   
   /**

Index: CssBorderStyle.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderStyle.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderStyle.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderStyle.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -23,12 +33,12 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssPrinterStyle;
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssSelectors;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
 import org.w3c.css.values.CssOperator;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  *   <H4>
@@ -102,239 +112,302 @@
  * @version $Revision$ 
  */
 public class CssBorderStyle extends CssProperty implements CssOperator {
-
-  CssBorderTopStyle top;
-  CssBorderBottomStyle bottom;
-  CssBorderRightStyle right;
-  CssBorderLeftStyle left;
-
-  /**
-   * Create a new CssBorderStyle
-   */
-  public CssBorderStyle(CssBorderTopStyle top,
-			CssBorderBottomStyle bottom,
-			CssBorderRightStyle right,
-			CssBorderLeftStyle left) {
-    this.top = top;
-    this.bottom = bottom;
-    this.left = left;
-    this.right = right;
-  }  
-
-  /**
-   * Create a new CssBorder
-   *
-   * @param expression The expression for this property
-   * @exception InvalidParamException Values are incorrect
-   */  
-  public CssBorderStyle(ApplContext ac, CssExpression expression) throws InvalidParamException {
-
+    
+    CssBorderTopStyle top;
+    CssBorderBottomStyle bottom;
+    CssBorderRightStyle right;
+    CssBorderLeftStyle left;
+    
+    /**
+     * Create a new CssBorderStyle
+     */
+    public CssBorderStyle(CssBorderTopStyle top,
+	    CssBorderBottomStyle bottom,
+	    CssBorderRightStyle right,
+	    CssBorderLeftStyle left) {
+	this.top = top;
+	this.bottom = bottom;
+	this.left = left;
+	this.right = right;
+    }  
+    
+    /**
+     * Create a new CssBorder
+     *
+     * @param expression The expression for this property
+     * @exception InvalidParamException Values are incorrect
+     */  
+    public CssBorderStyle(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
 	setByUser();
-
-    switch (expression.getCount()) {
-    case 1:
-      top = new CssBorderTopStyle(ac, expression);
-      bottom = new CssBorderBottomStyle((CssBorderFaceStyle) top.get());
-      right = new CssBorderRightStyle((CssBorderFaceStyle) top.get());
-      left = new CssBorderLeftStyle((CssBorderFaceStyle) top.get());
-      break;
-    case 2:
-      if (expression.getOperator() != SPACE)
-	throw new InvalidParamException("operator", 
-					((new Character(expression.getOperator())).toString()),
-					ac);
-      top = new CssBorderTopStyle(ac, expression);
-      right = new CssBorderRightStyle(ac, expression);
-      bottom = new CssBorderBottomStyle((CssBorderFaceStyle) top.get());
-      left = new CssBorderLeftStyle((CssBorderFaceStyle) right.get());
-      break;
-    case 3:
-      if (expression.getOperator() != SPACE)
-	throw new InvalidParamException("operator", 
-					((new Character(expression.getOperator())).toString()),
-					ac);
-      top = new CssBorderTopStyle(ac, expression);
-      if (expression.getOperator() != SPACE)
-	throw new InvalidParamException("operator", 
-					((new Character(expression.getOperator())).toString()),
-					ac);
-      right = new CssBorderRightStyle(ac, expression);
-      bottom = new CssBorderBottomStyle(ac, expression);
-      left = new CssBorderLeftStyle((CssBorderFaceStyle) right.get());
-      break;
-    default:
-      if (expression.getOperator() != SPACE)
-	throw new InvalidParamException("operator", 
-					((new Character(expression.getOperator())).toString()),
-					ac);
-      top = new CssBorderTopStyle(ac, expression);
-      if (expression.getOperator() != SPACE)
-	throw new InvalidParamException("operator", 
-					((new Character(expression.getOperator())).toString()),
-					ac);
-      right = new CssBorderRightStyle(ac, expression);
-      if (expression.getOperator() != SPACE)
-	throw new InvalidParamException("operator", 
-					((new Character(expression.getOperator())).toString()),
-					ac);
-      bottom = new CssBorderBottomStyle(ac, expression);
-      left = new CssBorderLeftStyle(ac, expression);
-      break;
+	
+	switch (expression.getCount()) {
+	case 1:
+	    top = new CssBorderTopStyle(ac, expression);
+	    bottom = new CssBorderBottomStyle((CssBorderFaceStyle) top.get());
+	    right = new CssBorderRightStyle((CssBorderFaceStyle) top.get());
+	    left = new CssBorderLeftStyle((CssBorderFaceStyle) top.get());
+	    break;
+	case 2:
+	    if (expression.getOperator() != SPACE)
+		throw new InvalidParamException("operator", 
+			((new Character(expression.getOperator())).toString()),
+			ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    top = new CssBorderTopStyle(ac, expression);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    right = new CssBorderRightStyle(ac, expression);
+	    bottom = new CssBorderBottomStyle((CssBorderFaceStyle) top.get());
+	    left = new CssBorderLeftStyle((CssBorderFaceStyle) right.get());
+	    break;
+	case 3:
+	    if (expression.getOperator() != SPACE)
+		throw new InvalidParamException("operator", 
+			((new Character(expression.getOperator())).toString()),
+			ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    top = new CssBorderTopStyle(ac, expression);
+	    if (expression.getOperator() != SPACE)
+		throw new InvalidParamException("operator", 
+			((new Character(expression.getOperator())).toString()),
+			ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    right = new CssBorderRightStyle(ac, expression);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    bottom = new CssBorderBottomStyle(ac, expression);
+	    left = new CssBorderLeftStyle((CssBorderFaceStyle) right.get());
+	    break;
+	case 4:
+	    if (expression.getOperator() != SPACE) {
+		throw new InvalidParamException("operator", 
+			((new Character(expression.getOperator())).toString()),
+			ac);
+	    }
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    top = new CssBorderTopStyle(ac, expression);
+	    if (expression.getOperator() != SPACE)
+		throw new InvalidParamException("operator", 
+		    ((new Character(expression.getOperator())).toString()),
+		    ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    right = new CssBorderRightStyle(ac, expression);
+	    if (expression.getOperator() != SPACE)
+		throw new InvalidParamException("operator", 
+		    ((new Character(expression.getOperator())).toString()),
+		    ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    bottom = new CssBorderBottomStyle(ac, expression);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    left = new CssBorderLeftStyle(ac, expression);
+	    break;
+	    default:
+		if(check) {
+		    throw new InvalidParamException("unrecognize", ac);
+		}
+	    break;
+	}
     }
-  }
-
-  /**
-   * Returns the value of this property
-   */
-  public Object get() {
-    return top;
-  }
-
-  /**
-   * Returns the name of this property
-   */  
-  public String getPropertyName() {
-    return "border-style";
-  }
-
-  /**
-   * Returns a string representation of the object.
-   */
-  public String toString() {
-    if (right.face.equals(left.face)) {
-      if (top.face.equals(bottom.face)) {
-	if (top.face.equals(right.face)) {
-	  return top.toString();
+    
+    public CssBorderStyle(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression,false);
+    }
+    
+    /**
+     * Returns the value of this property
+     */
+    public Object get() {
+	return top;
+    }
+    
+    /**
+     * Returns the name of this property
+     */  
+    public String getPropertyName() {
+	return "border-style";
+    }
+    
+    /**
+     * Returns a string representation of the object.
+     */
+    public String toString() {
+	if (right.face.equals(left.face)) {
+	    if (top.face.equals(bottom.face)) {
+		if (top.face.equals(right.face)) {
+		    return top.toString();
+		} else {
+		    return top + " " + right;
+		}
+	    } else {
+		return top + " " + right + " " + bottom;
+	    }
 	} else {
-	  return top + " " + right;
+	    return top + " " + right + " " + bottom + " " + left;
 	}
-      } else {
-	return top + " " + right + " " + bottom;
-      }
-    } else {
-      return top + " " + right + " " + bottom + " " + left;
     }
-  }
-
-  /**
-   * Set this property to be important.
-   * Overrides this method for a macro
-   */  
-  public void setImportant() {
-    top.important = true;
-    right.important = true;
-    left.important = true;
-    bottom.important = true;
-  }
-
-  /**
-   * Returns true if this property is important.
-   * Overrides this method for a macro
-   */
-  public boolean getImportant() {
-    return ((top == null || top.important) &&
-	    (right == null || right.important) &&
-	    (left == null || left.important) &&
-	    (bottom == null || bottom.important));
-  }
-
-  /**
-   * Print this property.
-   *
-   * @param printer The printer.
-   * @see #toString()
-   * @see #getPropertyName()
-   */  
-  public void print(CssPrinterStyle printer) {
-    if ((top != null && right != null &&
-	  left != null && bottom != null) &&
-	(getImportant() ||
-	 (!top.important &&
-	  !right.important &&
-	  !left.important &&
-	  !bottom.important))) {
-      printer.print(this);
-    } else {
-      if (top != null)
-	top.print(printer);
-      if (right != null)
-	right.print(printer);
-      if (left != null)
-	left.print(printer);
-      if (bottom != null)
-	bottom.print(printer);
+    
+    /**
+     * Set this property to be important.
+     * Overrides this method for a macro
+     */  
+    public void setImportant() {
+	if(top != null) {
+	    top.important = true;
+	}
+	if(right != null) {
+	    right.important = true;
+	}
+	if(left != null) {
+	    left.important = true;
+	}
+	if(bottom != null) {
+	    bottom.important = true;
+	}
     }
+    
+    /**
+     * Returns true if this property is important.
+     * Overrides this method for a macro
+     */
+    public boolean getImportant() {
+	return ((top == null || top.important) &&
+		(right == null || right.important) &&
+		(left == null || left.important) &&
+		(bottom == null || bottom.important));
+    }
+    
+    /**
+     * Print this property.
+     *
+     * @param printer The printer.
+     * @see #toString()
+     * @see #getPropertyName()
+     */  
+    public void print(CssPrinterStyle printer) {
+	if ((top != null && right != null &&
+		left != null && bottom != null) &&
+		(getImportant() ||
+			(!top.important &&
+				!right.important &&
+				!left.important &&
+				!bottom.important))) {
+	    printer.print(this);
+	} else {
+	    if (top != null)
+		top.print(printer);
+	    if (right != null)
+		right.print(printer);
+	    if (left != null)
+		left.print(printer);
+	    if (bottom != null)
+		bottom.print(printer);
+	}
 	
-  }
-
-  /**
-   * Set the context.
-   * Overrides this method for a macro
-   *
-   * @see org.w3c.css.css.CssCascadingOrder#order
-   * @see org.w3c.css.css.StyleSheetParser#handleRule
-   */
-  public void setSelectors(CssSelectors selector) {
-    super.setSelectors(selector);
-    if (top != null) {
-      top.setSelectors(selector);
     }
-    if (right != null) {
-      right.setSelectors(selector);
+    
+    /**
+     * Set the context.
+     * Overrides this method for a macro
+     *
+     * @see org.w3c.css.css.CssCascadingOrder#order
+     * @see org.w3c.css.css.StyleSheetParser#handleRule
+     */
+    public void setSelectors(CssSelectors selector) {
+	super.setSelectors(selector);
+	if (top != null) {
+	    top.setSelectors(selector);
+	}
+	if (right != null) {
+	    right.setSelectors(selector);
+	}
+	if (bottom != null) {
+	    bottom.setSelectors(selector);
+	}
+	if (left != null) {
+	    left.setSelectors(selector);
+	}
     }
-    if (bottom != null) {
-      bottom.setSelectors(selector);
+    
+    /**
+     * Add this property to the CssStyle
+     *
+     * @param style The CssStyle
+     */
+    public void addToStyle(ApplContext ac, CssStyle style) {
+	if(top != null) {
+	    top.addToStyle(ac , style);
+	}
+	if(right != null) {
+	    right.addToStyle(ac, style);
+	}
+	if(left != null) {
+	    left.addToStyle(ac, style);
+	}
+	if(bottom != null) {
+	    bottom.addToStyle(ac, style);
+	}
     }
-    if (left != null) {
-      left.setSelectors(selector);
+    
+    /**
+     * Get this property in the style.
+     *
+     * @param style The style where the property is
+     * @param resolve if true, resolve the style to find this property
+     */  
+    public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
+	throw new IllegalStateException("Can't invoke this method on the property " + 
+		getPropertyName());
     }
-  }
-  
-  /**
-   * Add this property to the CssStyle
-   *
-   * @param style The CssStyle
-   */
-  public void addToStyle(ApplContext ac, CssStyle style) {
-    top.addToStyle(ac, style);
-    right.addToStyle(ac, style);
-    left.addToStyle(ac, style);
-    bottom.addToStyle(ac, style);
-  }
-
-  /**
-   * Get this property in the style.
-   *
-   * @param style The style where the property is
-   * @param resolve if true, resolve the style to find this property
-   */  
-  public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
-    throw new IllegalStateException("Can't invoke this method on the property " + 
-				    getPropertyName());
-  }
-
-  /**
-   * Update the source file and the line.
-   * Overrides this method for a macro
-   *
-   * @param line The line number where this property is defined
-   * @param source The source file where this property is defined
-   */  
-  public void setInfo(int line, String source) {
-    super.setInfo(line, source);
-    top.setInfo(line, source);
-    right.setInfo(line, source);
-    left.setInfo(line, source);
-    bottom.setInfo(line, source);
-  }
-  
-  /**
-   * Compares two properties for equality.
-   *
-   * @param value The other property.
-   */  
-  public boolean equals(CssProperty property) {
-    return false;
-  }
-
+    
+    /**
+     * Update the source file and the line.
+     * Overrides this method for a macro
+     *
+     * @param line The line number where this property is defined
+     * @param source The source file where this property is defined
+     */  
+    public void setInfo(int line, String source) {
+	super.setInfo(line, source);
+	if(top != null) {
+	    top.setInfo(line, source);
+	}
+	if(right != null) {
+	    right.setInfo(line, source);
+	}
+	if(left != null) {
+	    left.setInfo(line, source);
+	}
+	if(bottom != null) {
+	    bottom.setInfo(line, source);
+	}
+    }
+    
+    /**
+     * Compares two properties for equality.
+     *
+     * @param value The other property.
+     */  
+    public boolean equals(CssProperty property) {
+	return false; // FIXME
+    }
+    
 }

Index: CssBorderTopColorCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderTopColorCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderTopColorCSS2.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderTopColorCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -21,12 +31,12 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssPrinterStyle;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
 import org.w3c.css.values.CssValue;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  * Be careful, this is not a CSS1 property !
@@ -59,12 +69,22 @@
      * @param expression The expression fir this property
      * @exception InvalidParamException Values are incorrect
      */
-    public CssBorderTopColorCSS2(ApplContext ac, CssExpression expression) 
-	throws InvalidParamException {
+    public CssBorderTopColorCSS2(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
 	face = new CssBorderFaceColorCSS2(ac, expression);
     }
     
+    public CssBorderTopColorCSS2(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression,false);
+    }
+    
     /**
      * Returns the value of this property
      */
@@ -87,7 +107,10 @@
      * Returns a string representation of the object.
      */
     public String toString() {
-	return face.toString();
+	if(face != null) {
+	    return face.toString();
+	}
+	return "";
     }
     
     /**
@@ -129,7 +152,7 @@
      * @param value The other property.
      */  
     public boolean equals(CssProperty property) {
-	return (property instanceof CssBorderTopColorCSS2 && 
+	return (property instanceof CssBorderTopColorCSS2 &&
 		face.equals(((CssBorderTopColorCSS2) property).face));
     }
     
@@ -140,7 +163,7 @@
      * @see #print(CssPrinterStyle)
      */  
     public void print(CssPrinterStyle printer) {
-	if (!face.isDefault())
+	if (face != null && !face.isDefault())
 	    printer.print(this);
     }
     

Index: CssHeightMob.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssHeightMob.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssHeightMob.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssHeightMob.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -34,14 +44,13 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
+import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssLength;
-import org.w3c.css.values.CssPercentage;
 import org.w3c.css.values.CssNumber;
-import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -92,7 +101,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssHeightMob(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssHeightMob(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	
 	setByUser();
@@ -117,6 +132,11 @@
 	expression.next();
     }
     
+    public CssHeightMob(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssLeft.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssLeft.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssLeft.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssLeft.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -9,9 +9,9 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
-import org.w3c.css.values.CssExpression;
-import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
+import org.w3c.css.values.CssExpression;
 
 /**
  */
@@ -34,6 +34,11 @@
     super(ac, expression);
   }
   
+  public CssLeft(ApplContext ac, CssExpression expression, boolean check)
+  	throws InvalidParamException {
+      super(ac, expression, check);
+  }
+  
   /**
    * Returns the name of this property
    */  

Index: CssBackgroundColorCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBackgroundColorCSS2.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CssBackgroundColorCSS2.java	29 Aug 2003 15:23:39 -0000	1.3
+++ CssBackgroundColorCSS2.java	8 Aug 2005 13:18:12 -0000	1.4
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.4  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.3  2003/08/29 15:23:39  plehegar
  * Fix from Sijtsche
  *
@@ -41,12 +51,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.values.CssColor;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -84,8 +93,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */
-    public CssBackgroundColorCSS2(ApplContext ac, CssExpression expression)
-	throws InvalidParamException {
+    public CssBackgroundColorCSS2(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+
 	setByUser();
 	CssValue val = expression.getValue();
 
@@ -109,6 +123,11 @@
 	}
     }
 
+    public CssBackgroundColorCSS2(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */
@@ -135,7 +154,14 @@
      * Returns a string representation of the object.
      */
     public String toString() {
-	return color.toString();
+	if (color != null) {
+	    return color.toString();
+	}
+	else {
+	    return "";
+	}
+
+
     }
 
 

Index: CssMinHeightATSC.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssMinHeightATSC.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssMinHeightATSC.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssMinHeightATSC.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -9,14 +9,13 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssLength;
+import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssPercentage;
-import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  */
@@ -36,7 +35,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssMinHeightATSC(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssMinHeightATSC(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	
 	setByUser();
@@ -62,6 +67,11 @@
 	expression.next();
     }
     
+    public CssMinHeightATSC(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property.
      */

Index: CssBackgroundAttachmentCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBackgroundAttachmentCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBackgroundAttachmentCSS2.java	8 Apr 2002 21:17:42 -0000	1.2
+++ CssBackgroundAttachmentCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:42  plehegar
  * New
  *
@@ -31,11 +41,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -80,10 +90,15 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssBackgroundAttachmentCSS2(ApplContext ac, CssExpression expression) 
-	throws InvalidParamException {
-	setByUser();
+    public CssBackgroundAttachmentCSS2(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
 	
+	setByUser();
+
 	CssValue val = expression.getValue();
 	
 	if (val instanceof CssIdent) {
@@ -100,6 +115,11 @@
 					getPropertyName(), ac);
     }
     
+    public CssBackgroundAttachmentCSS2(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssFontWeightCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssFontWeightCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssFontWeightCSS2.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssFontWeightCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -19,12 +29,12 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssNumber;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -168,7 +178,13 @@
      * @param expr the expression
      * @exception InvalidParamException values are incorrect
      */  
-    public CssFontWeightCSS2(ApplContext ac, CssExpression expr) throws InvalidParamException {
+    public CssFontWeightCSS2(ApplContext ac, CssExpression expr, boolean check)
+    	throws InvalidParamException {
+	
+	if(check && expr.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expr.getValue();
 	
 	setByUser();
@@ -198,6 +214,11 @@
 					getPropertyName(), ac);
     }
     
+    public CssFontWeightCSS2(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the current value.
      */  

Index: CssBorderBottomStyleCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderBottomStyleCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderBottomStyleCSS1.java	8 Apr 2002 21:17:42 -0000	1.2
+++ CssBorderBottomStyleCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:42  plehegar
  * New
  *
@@ -22,11 +32,9 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
-import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
+import org.w3c.css.values.CssExpression;
 
 /**
  * Be careful, this is not a CSS1 property !
@@ -59,11 +67,20 @@
    * @param expression The expression for this property.
    * @exception InvalidParamException Values are incorrect
    */
-  public CssBorderBottomStyleCSS1(ApplContext ac, CssExpression expression) 
-    throws InvalidParamException {
+  public CssBorderBottomStyleCSS1(ApplContext ac, CssExpression expression,
+	  boolean check) throws InvalidParamException {
+      
+      if(check && expression.getCount() > 1) {
+	  throw new InvalidParamException("unrecognize", ac);
+      }
 
       setByUser();
-    face = new CssBorderFaceStyleCSS1(ac, expression);
+      face = new CssBorderFaceStyleCSS1(ac, expression);
+  }
+  
+  public CssBorderBottomStyleCSS1(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
   }
   
   /**
@@ -77,14 +94,20 @@
    * Returns the value
    */
   public String getStyle() {
-    return face.getStyle();
+      if(face != null) {
+	  return face.getStyle();
+      }
+      return null;
   }
 
   /**
    * Returns a string representation of the object.
    */
   public String toString() {
-    return face.toString();
+      if(face != null) {
+	  return face.toString();
+      }
+      return "";
   }
 
   /**
@@ -126,7 +149,8 @@
    * @param value The other property.
    */  
   public boolean equals(CssProperty property) {
-    return (property instanceof CssBorderBottomStyleCSS1 && face.equals(((CssBorderBottomStyleCSS1) property).face));
+    return (property instanceof CssBorderBottomStyleCSS1 &&
+	    face.equals(((CssBorderBottomStyleCSS1) property).face));
   }
 
 }

Index: CssBorderTopStyleCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderTopStyleCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderTopStyleCSS1.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderTopStyleCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -22,9 +32,9 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
-import org.w3c.css.values.CssExpression;
-import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
+import org.w3c.css.values.CssExpression;
 
 /**
  * Be careful, this is not a CSS1 property !
@@ -58,13 +68,22 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */
-    public CssBorderTopStyleCSS1(ApplContext ac, CssExpression expression) 
-	throws InvalidParamException {
+    public CssBorderTopStyleCSS1(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
 	
 	setByUser();
 	face = new CssBorderFaceStyleCSS1(ac, expression);
     }
     
+    public CssBorderTopStyleCSS1(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression,false);
+    }
+    
     /**
      * Returns the value of this property
      */
@@ -76,14 +95,20 @@
      * Returns the value
      */
     public String getStyle() {
-	return face.getStyle();
+	if(face != null) {
+	    return face.getStyle();
+	}
+	return null;
     }
     
     /**
      * Returns a string representation of the object.
      */
     public String toString() {
-	return face.toString();
+	if(face != null) {
+	    return face.toString();
+	}
+	return "";
     }
     
     /**

Index: CssFontFamilyCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssFontFamilyCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssFontFamilyCSS1.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssFontFamilyCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -22,17 +32,18 @@
 
 package org.w3c.css.properties;
 
-import java.util.Vector;
 import java.util.Enumeration;
-import org.w3c.css.util.Util;
-import org.w3c.css.values.CssOperator;
+import java.util.Vector;
+
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
+import org.w3c.css.util.Util;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
+import org.w3c.css.values.CssOperator;
 import org.w3c.css.values.CssString;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /** 
  *   <H4>
@@ -118,8 +129,10 @@
      * @param expression the font name
      * @exception InvalidParamException The expression is incorrect
      */
-    public CssFontFamilyCSS1(ApplContext ac, CssExpression expression) 
-	    throws InvalidParamException {
+    public CssFontFamilyCSS1(ApplContext ac, CssExpression expression,
+	    boolean check) 
+	    throws InvalidParamException {		
+	
 	boolean family = true;
 	CssValue val = expression.getValue();
 	char op;
@@ -129,15 +142,23 @@
 	
 
 	if (val.equals(inherit)) {
+	    if(expression.getCount() > 1) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    inheritedValue = true;
 	    expression.next();
 	    return;
 	}
 
+	// should pass here only if it's not 'inherit'
 	while (family) {
 	    val = expression.getValue();
 	    op = expression.getOperator();
 	    
+	    if(val.equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    
 	    if ((op != COMMA) && (op != SPACE)) {
 		throw new InvalidParamException("operator", 
 						((new Character(op)).toString()),
@@ -192,12 +213,20 @@
 		throw new InvalidParamException("value", expression.getValue(),
 						getPropertyName(), ac);
 	}
+	if(check && !expression.end()) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
 	if (!containsGenericFamily()) {
 	    ac.getFrame().addWarning("no-generic-family", "font-family");
 	}
 
     }
     
+    public CssFontFamilyCSS1(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns all fonts name
      */  

Index: CssBackgroundRepeatCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBackgroundRepeatCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBackgroundRepeatCSS1.java	8 Apr 2002 21:17:42 -0000	1.2
+++ CssBackgroundRepeatCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:42  plehegar
  * New
  *
@@ -31,11 +41,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -65,7 +75,8 @@
  *   In the example above, the image will only be repeated vertically.
  * @version $Revision$
  */
-public class CssBackgroundRepeatCSS1 extends CssProperty implements CssBackgroundConstants {
+public class CssBackgroundRepeatCSS1 extends CssProperty
+	implements CssBackgroundConstants {
     
     int repeat;
     
@@ -83,8 +94,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssBackgroundRepeatCSS1(ApplContext ac, CssExpression expression) 
-	    throws InvalidParamException {
+    public CssBackgroundRepeatCSS1(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	setByUser();
 	
@@ -98,12 +114,16 @@
 		}
 	    }
 	}
-
 	
 	throw new InvalidParamException("value", expression.getValue(), 
 					getPropertyName(), ac);
     }
     
+    public CssBackgroundRepeatCSS1(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssPadding.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssPadding.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- CssPadding.java	30 Mar 2004 13:44:40 -0000	1.4
+++ CssPadding.java	8 Aug 2005 13:18:12 -0000	1.5
@@ -7,14 +7,13 @@
 
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
-import org.w3c.css.parser.CssSelectors;
 import org.w3c.css.parser.CssPrinterStyle;
+import org.w3c.css.parser.CssSelectors;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
 import org.w3c.css.values.CssOperator;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  *   <H4>
@@ -71,13 +70,12 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssPadding(ApplContext ac, CssExpression expression)  
-	throws InvalidParamException 
-    {
-	CssValue val = expression.getValue();
+    public CssPadding(ApplContext ac, CssExpression expression, boolean check)  
+	throws InvalidParamException {
+	//CssValue val = expression.getValue();
 	setByUser();
 	
-	if (val.equals(inherit)) {
+	/*if (val.equals(inherit)) {
 	    inheritedValue = true;
 	    top = new CssPaddingTop();
 	    top.value = inherit;
@@ -87,9 +85,11 @@
 	    right.value = inherit;
 	    left = new CssPaddingLeft();
 	    left.value = inherit;
-	}
-
-	switch (expression.getCount()) {
+	}*/
+	
+	int count = expression.getCount();
+	
+	switch (count) {
 	case 1:
 	    top = new CssPaddingTop(ac, expression);
 	    bottom = new CssPaddingBottom(top);
@@ -98,39 +98,85 @@
 	    break;
 	case 2:
 	    if (expression.getOperator() != SPACE)
-		throw new InvalidParamException("unrecognize", val, ac);
+		throw new InvalidParamException("operator",
+			((new Character(expression.getOperator())).toString()),
+			ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    top = new CssPaddingTop(ac, expression);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    right = new CssPaddingRight(ac, expression);
 	    bottom = new CssPaddingBottom(top);
 	    left = new CssPaddingLeft(right);
 	    break;
 	case 3:
 	    if (expression.getOperator() != SPACE)
-		throw new InvalidParamException("unrecognize", val, ac);
+		throw new InvalidParamException("operator",
+			((new Character(expression.getOperator())).toString()),
+			ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    top = new CssPaddingTop(ac, expression);
 	    if (expression.getOperator() != SPACE)
-		throw new InvalidParamException("unrecognize", val, ac);
+		throw new InvalidParamException("operator",
+			((new Character(expression.getOperator())).toString()),
+			ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    right = new CssPaddingRight(ac, expression);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    bottom = new CssPaddingBottom(ac, expression);
 	    left = new CssPaddingLeft(right);
 	    break;
 	case 4:
 	    if (expression.getOperator() != SPACE)
-		throw new InvalidParamException("unrecognize", val, ac);
+		throw new InvalidParamException("operator",
+			((new Character(expression.getOperator())).toString()),
+			ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    top = new CssPaddingTop(ac, expression);
 	    if (expression.getOperator() != SPACE)
-		throw new InvalidParamException("unrecognize", val, ac);
+		throw new InvalidParamException("operator",
+			((new Character(expression.getOperator())).toString()),
+			ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    right = new CssPaddingRight(ac, expression);
 	    if (expression.getOperator() != SPACE)
-		throw new InvalidParamException("unrecognize", val, ac);
+		throw new InvalidParamException("operator",
+			((new Character(expression.getOperator())).toString()),
+			ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    bottom = new CssPaddingBottom(ac, expression);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    left = new CssPaddingLeft(ac, expression);
 	    break;
 	default:
-	    throw new InvalidParamException("unrecognize", ac);
+	    if(check) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	}
     }
     
+    public CssPadding(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssColorCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssColorCSS2.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- CssColorCSS2.java	30 Mar 2004 13:09:39 -0000	1.4
+++ CssColorCSS2.java	8 Aug 2005 13:18:12 -0000	1.5
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.5  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.4  2004/03/30 13:09:39  ylafon
  * fixed the too many values case
  *
@@ -52,11 +62,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -93,12 +103,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */
-    public CssColorCSS2(ApplContext ac, CssExpression expression)
-	throws InvalidParamException
-    {
-	if (expression.getCount() > 1 ) {
+    public CssColorCSS2(ApplContext ac, CssExpression expression, boolean check)
+	throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
 	    throw new InvalidParamException("unrecognize", ac);
 	}
+	
 	CssValue val = expression.getValue();
 	setByUser();
 	if (val.equals(inherit)) {
@@ -117,6 +128,11 @@
 	}
     }
 
+    public CssColorCSS2(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssBorderRightStyle.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderRightStyle.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderRightStyle.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderRightStyle.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -22,114 +32,129 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
-import org.w3c.css.values.CssExpression;
-import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
+import org.w3c.css.values.CssExpression;
 
 /**
  * Be careful, this is not a CSS1 property !
  * @version $Revision$
  */
 public class CssBorderRightStyle extends CssProperty {
-
-  CssBorderFaceStyle face;
-  
-  /**
-   * Create a new CssBorderRightStyle
-   */
-  public CssBorderRightStyle() {
+    
+    CssBorderFaceStyle face;
+    
+    /**
+     * Create a new CssBorderRightStyle
+     */
+    public CssBorderRightStyle() {
 	setByUser();
-
-    face = new CssBorderFaceStyle();
-  }
-  
-  /**
-   * Create a new CssBorderRightStyle with an another CssBorderFaceStyle
-   *
-   * @param another The another side.
-   */
-  public CssBorderRightStyle(CssBorderFaceStyle another) {
+	
+	face = new CssBorderFaceStyle();
+    }
+    
+    /**
+     * Create a new CssBorderRightStyle with an another CssBorderFaceStyle
+     *
+     * @param another The another side.
+     */
+    public CssBorderRightStyle(CssBorderFaceStyle another) {
 	setByUser();
-
-    face = another;
-  }
-  
-  /**
-   * Create a new CssBorderRightStyle.
-   *
-   * @param expression The expression for this property.
-   * @exception InvalidParamException Values are incorrect
-   */
-  public CssBorderRightStyle(ApplContext ac, CssExpression expression) 
-    throws InvalidParamException {
-
-      setByUser();
-
-    face = new CssBorderFaceStyle(ac, expression);
-  }
-  
-  /**
-   * Returns the value of this property
-   */
-  public Object get() {
-    return face;
-  }
-
-  /**
-   * Returns the value
-   */
-  public String getStyle() {
-    return face.getStyle();
-  }
-
-  /**
-   * Returns a string representation of the object.
-   */
-  public String toString() {
-    return face.toString();
-  }
-
-  /**
-   * Returns the name of this property
-   */  
-  public String getPropertyName() {
-    return "border-right-style";
-  }
-
-  /**
-   * Add this property to the CssStyle.
-   *
-   * @param style The CssStyle
-   */
-  public void addToStyle(ApplContext ac, CssStyle style) {
-    CssBorderRight right = ((Css1Style) style).cssBorder.right;
-    if (right.style != null)
-      style.addRedefinitionWarning(ac, this);
-    right.style = this;
-  }
-
-  /**
-   * Get this property in the style.
-   *
-   * @param style The style where the property is
-   * @param resolve if true, resolve the style to find this property
-   */  
-  public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
-    if (resolve) {
-      return ((Css1Style) style).getBorderRightStyle();
-    } else {
-      return ((Css1Style) style).cssBorder.getRight().style;
+	
+	face = another;
     }
-  }
-
-  /**
-   * Compares two properties for equality.
-   *
-   * @param value The other property.
-   */  
-  public boolean equals(CssProperty property) {
-    return (property instanceof CssBorderRightStyle && 
-	    face.equals(((CssBorderRightStyle) property).face));
-  }
-
+    
+    /**
+     * Create a new CssBorderRightStyle.
+     *
+     * @param expression The expression for this property.
+     * @exception InvalidParamException Values are incorrect
+     */
+    public CssBorderRightStyle(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
+	setByUser();
+	
+	face = new CssBorderFaceStyle(ac, expression);
+    }
+    
+    public CssBorderRightStyle(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression,false);
+    }
+    
+    /**
+     * Returns the value of this property
+     */
+    public Object get() {
+	return face;
+    }
+    
+    /**
+     * Returns the value
+     */
+    public String getStyle() {
+	if(face != null) {
+	    return face.getStyle();
+	}
+	return null;
+    }
+    
+    /**
+     * Returns a string representation of the object.
+     */
+    public String toString() {
+	if(face != null) {
+	    return face.toString();
+	}
+	return "";
+    }
+    
+    /**
+     * Returns the name of this property
+     */  
+    public String getPropertyName() {
+	return "border-right-style";
+    }
+    
+    /**
+     * Add this property to the CssStyle.
+     *
+     * @param style The CssStyle
+     */
+    public void addToStyle(ApplContext ac, CssStyle style) {
+	CssBorderRight right = ((Css1Style) style).cssBorder.right;
+	if (right.style != null)
+	    style.addRedefinitionWarning(ac, this);
+	right.style = this;
+    }
+    
+    /**
+     * Get this property in the style.
+     *
+     * @param style The style where the property is
+     * @param resolve if true, resolve the style to find this property
+     */  
+    public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
+	if (resolve) {
+	    return ((Css1Style) style).getBorderRightStyle();
+	} else {
+	    return ((Css1Style) style).cssBorder.getRight().style;
+	}
+    }
+    
+    /**
+     * Compares two properties for equality.
+     *
+     * @param value The other property.
+     */  
+    public boolean equals(CssProperty property) {
+	return (property instanceof CssBorderRightStyle && 
+		face.equals(((CssBorderRightStyle) property).face));
+    }
+    
 }

Index: CssBorderTopCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderTopCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderTopCSS1.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderTopCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -33,15 +43,15 @@
  */
 package org.w3c.css.properties;
 
+import org.w3c.css.parser.CssPrinterStyle;
 import org.w3c.css.parser.CssSelectors;
 import org.w3c.css.parser.CssStyle;
-import org.w3c.css.parser.CssPrinterStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssLength;
 import org.w3c.css.values.CssOperator;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -93,61 +103,69 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssBorderTopCSS1(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssBorderTopCSS1(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
 	CssValue val = null;
 	char op = SPACE;
 	boolean find = true;
 	
+	if(check && expression.getCount() > 3) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
 	
 	while (find) {
 	    find = false;
-	    val = expression.getValue();
-	    op = expression.getOperator();
-	    
+	    val = expression.getValue();	    
+	    op = expression.getOperator();	    
 	    if (val == null)
 		break;
 	    
 	    if (op != SPACE)
 		throw new InvalidParamException("operator", 
 						((new Character(op)).toString()),
-						ac);
-	    
+						ac);   
 	    if (width == null) {
 		try {
-		    width = new CssBorderTopWidthCSS1(ac, expression);
+		    width = new CssBorderTopWidthCSS1(ac, expression);		
 		    find = true;
-		} catch (InvalidParamException e) {
+		} catch(InvalidParamException e){
+		    //nothing to do, style will test this value
 		}
 	    }
 	    if (!find && style == null) {
 		try {
-		    style = new CssBorderTopStyleCSS1(ac, expression);
+		    style = new CssBorderTopStyleCSS1(ac, expression);		    
 		    find = true;
-		}
-		catch (InvalidParamException e) {
+		} catch(InvalidParamException e){
+		    //nothing to do, color will test this value
 		}
 	    }
 	    if (!find && color == null) {
-		try {
-		    color = new CssBorderTopColorCSS1(ac, expression);
-		    find = true;
-		}
-		catch (InvalidParamException e) {
-		}
+		// throws an exception if the value is not valid
+		color = new CssBorderTopColorCSS1(ac, expression);
+		find = true;		
 	    }
 	}
 	
+	//if some values have not been set, we set them with their default ones
+	/*
 	if (width == null) {
 	    width = new CssBorderTopWidthCSS1();
 	}
 	if (style == null) {
-	    style = new CssBorderTopStyleCSS1();
-	}
-	
+	    style = new CssBorderTopStyleCSS1();	    
+	}	
 	if (color == null) {
-	    color = new CssBorderTopColorCSS1();
+	    color = new CssBorderTopColorCSS1();	    
 	}
+	*/
+    }
+    
+    public CssBorderTopCSS1(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression,false);
     }
     
     /**
@@ -194,9 +212,22 @@
      * Returns a string representation of the object.
      */
     public String toString() {
-	String ret = width + " " + style;
-	if (!color.face.isDefault())
-	    ret += " " + color;
+	String ret = "";
+	if(width != null) {
+	    ret += width;
+	}
+	if(style != null) {
+	    if(!ret.equals("")) {
+		ret += " ";
+	    }
+	    ret += style;
+	}
+	if(color != null) {
+	    if(!ret.equals("")) {
+		ret += " ";
+	    }
+	    ret += color;
+	}
 	return ret;
     }
     
@@ -212,9 +243,15 @@
      * Overrides this method for a macro
      */  
     public void setImportant() {
-	width.important = true;
-	style.important = true;
-	color.important = true;
+	if(width != null) {
+	    width.important = true;
+	}
+	if(style != null) {
+	    style.important = true;
+	}
+	if(color != null) {
+	    color.important = true;
+	}
     }
     
     /**
@@ -258,11 +295,16 @@
      *
      * @param style The CssStyle
      */
-    public void addToStyle(ApplContext ac, CssStyle style) {
-	width.addToStyle(ac, style);
-	this.style.addToStyle(ac, style);
-	color.addToStyle(ac, style);
-
+    public void addToStyle(ApplContext ac, CssStyle style) {	
+	if(width != null) {
+	    width.addToStyle(ac, style);
+	}
+	if(this.style != null) {
+	    this.style.addToStyle(ac, style);
+	}
+	if(color != null) {
+	    color.addToStyle(ac, style);
+	}
     }
     
     /**
@@ -287,10 +329,16 @@
      * @param source The source file where this property is defined
      */  
     public void setInfo(int line, String source) {
-	super.setInfo(line, source);
-	width.setInfo(line, source);
-	style.setInfo(line, source);
-	color.setInfo(line, source);
+	super.setInfo(line, source);	
+	if(width != null) {
+	    width.setInfo(line, source);
+	}
+	if(style != null) {
+	    style.setInfo(line, source);
+	}
+	if(color != null) {
+	    color.setInfo(line, source);
+	}
     }
     
     /**
@@ -321,8 +369,9 @@
     public boolean equals(CssProperty property) {
 	if (property instanceof CssBorderTopCSS1) {
 	    CssBorderTopCSS1 top = (CssBorderTopCSS1) property;
-	    return (width.equals(top.width) 
-		    && style.equals(top.style) && color.equals(top.color));
+	    return (width != null && width.equals(top.width) && 
+		    style != null && style.equals(top.style) && 
+		    color != null && color.equals(top.color));
 	} else {
 	    return false;
 	}

Index: CssBorderLeftCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderLeftCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderLeftCSS1.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderLeftCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -30,15 +40,15 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssPrinterStyle;
 import org.w3c.css.parser.CssSelectors;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssLength;
 import org.w3c.css.values.CssOperator;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -90,11 +100,16 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssBorderLeftCSS1(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssBorderLeftCSS1(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
 	CssValue val = null;
 	char op = SPACE;
 	boolean find = true;
 	
+	if(check && expression.getCount() > 3) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
 	
 	while (find) {
@@ -115,6 +130,7 @@
 		    width = new CssBorderLeftWidthCSS1(ac, expression);
 		    find = true;
 		} catch (InvalidParamException e) {
+		    // nothing to do, style will test this value
 		}
 	    }
 	    if (!find && style == null) {
@@ -123,24 +139,27 @@
 		    find = true;
 		}
 		catch (InvalidParamException e) {
+		    // nothing to do, color will test this value
 		}
 	    }
 	    if (!find && color == null) {
-		try {
-		    color = new CssBorderLeftColorCSS1(ac, expression);
-		    find = true;
-		}
-		catch (InvalidParamException e) {
-		}
+		color = new CssBorderLeftColorCSS1(ac, expression);
+		find = true;
 	    }
 	}
-	
+	/*
 	if (width == null)
 	    width = new CssBorderLeftWidthCSS1();
 	if (style == null)
 	    style = new CssBorderLeftStyleCSS1();
 	if (color == null)
 	    color = new CssBorderLeftColorCSS1();
+	*/
+    }
+    
+    public CssBorderLeftCSS1(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
     }
     
     /**
@@ -187,9 +206,22 @@
      * Returns a string representation of the object.
      */
     public String toString() {
-	String ret = width + " " + style;
-	if (!color.face.isDefault())
-	    ret += " " + color;
+	String ret = "";
+	if(width != null) {
+	    ret += width;
+	}
+	if(style != null) {
+	    if(!ret.equals("")) {
+		ret += " ";
+	    }
+	    ret += style;
+	}
+	if(color != null) {
+	    if(!ret.equals("")) {
+		ret += " ";
+	    }
+	    ret += color;
+	}
 	return ret;
     }
     
@@ -205,9 +237,15 @@
      * Overrides this method for a macro
      */  
     public void setImportant() {
-	width.important = true;
-	style.important = true;
-	color.important = true;
+	if(width != null) {
+	    width.important = true;
+	}
+	if(style != null) {
+	    style.important = true;
+	}
+	if(color != null) {
+	    color.important = true;
+	}
     }
     
     /**
@@ -220,7 +258,6 @@
 		(color == null || color.important));
     }
     
-    
     /**
      * Print this property.
      *
@@ -248,37 +285,23 @@
     }
     
     /**
-     * Set the context.
-     * Overrides this method for a macro
+     * Add this property to the CssStyle
      *
-     * @see org.w3c.css.css.CssCascadingOrder#order
-     * @see org.w3c.css.css.StyleSheetParser#handleRule
+     * @param style The CssStyle
      */
-    public void setSelectors(CssSelectors selector) {
-	super.setSelectors(selector);
-	if (width != null) {
-	    width.setSelectors(selector);
+    public void addToStyle(ApplContext ac, CssStyle style) {	
+	if(width != null) {
+	    width.addToStyle(ac, style);
 	}
-	if (style != null) {
-	    style.setSelectors(selector);
+	if(this.style != null) {
+	    this.style.addToStyle(ac, style);
 	}
-	if (color != null) {
-	    color.setSelectors(selector);
+	if(color != null) {
+	    color.addToStyle(ac, style);
 	}
     }
     
     /**
-     * Add this property to the CssStyle
-     *
-     * @param style The CssStyle
-     */
-    public void addToStyle(ApplContext ac, CssStyle style) {
-	width.addToStyle(ac, style);
-	this.style.addToStyle(ac, style);
-	color.addToStyle(ac, style);
-    }
-    
-    /**
      * Get this property in the style.
      *
      * @param style The style where the property is
@@ -300,10 +323,36 @@
      * @param source The source file where this property is defined
      */  
     public void setInfo(int line, String source) {
-	super.setInfo(line, source);
-	width.setInfo(line, source);
-	style.setInfo(line, source);
-	color.setInfo(line, source);
+	super.setInfo(line, source);	
+	if(width != null) {
+	    width.setInfo(line, source);
+	}
+	if(style != null) {
+	    style.setInfo(line, source);
+	}
+	if(color != null) {
+	    color.setInfo(line, source);
+	}
+    }
+    
+    /**
+     * Set the context.
+     * Overrides this method for a macro
+     *
+     * @see org.w3c.css.css.CssCascadingOrder#order
+     * @see org.w3c.css.css.StyleSheetParser#handleRule
+     */
+    public void setSelectors(CssSelectors selector) {
+	super.setSelectors(selector);
+	if (width != null) {
+	    width.setSelectors(selector);
+	}
+	if (style != null) {
+	    style.setSelectors(selector);
+	}
+	if (color != null) {
+	    color.setSelectors(selector);
+	}
     }
     
     /**
@@ -314,8 +363,9 @@
     public boolean equals(CssProperty property) {
 	if (property instanceof CssBorderLeftCSS1) {
 	    CssBorderLeftCSS1 left = (CssBorderLeftCSS1) property;
-	    return (width.equals(left.width) && style.equals(left.style) 
-		    && color.equals(left.color));
+	    return (width != null && width.equals(left.width) &&
+		    style != null && style.equals(left.style) && 
+		    color != null && color.equals(left.color));
 	} else {
 	    return false;
 	}

Index: CssBorderBottomColorCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderBottomColorCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderBottomColorCSS2.java	8 Apr 2002 21:17:42 -0000	1.2
+++ CssBorderBottomColorCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:42  plehegar
  * New
  *
@@ -21,12 +31,12 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssPrinterStyle;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
 import org.w3c.css.values.CssValue;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  * Be careful, this is not a CSS1 property !
@@ -61,14 +71,22 @@
    * @param expression The expression for this property.
    * @exception InvalidParamException Values are incorrect
    */
-  public CssBorderBottomColorCSS2(ApplContext ac, CssExpression expression) 
-    throws InvalidParamException {
+  public CssBorderBottomColorCSS2(ApplContext ac, CssExpression expression,
+	  boolean check) throws InvalidParamException {
+      
+      if(check && expression.getCount() > 1) {
+	  throw new InvalidParamException("unrecognize", ac);
+      }
 
       setByUser();
-
-    face = new CssBorderFaceColorCSS2(ac, expression);
+      face = new CssBorderFaceColorCSS2(ac, expression);
   }
   
+  public CssBorderBottomColorCSS2(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+  }	
+  
   /**
    * Returns the value of this property
    */
@@ -140,7 +158,7 @@
    * @see #getPropertyName()
    */  
   public void print(CssPrinterStyle printer) {
-    if (!face.isDefault())
+    if (face != null && !face.isDefault())
       printer.print(this);
   }
 }

Index: CssTextIndent.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssTextIndent.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssTextIndent.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssTextIndent.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -31,13 +41,13 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssPercentage;
 import org.w3c.css.values.CssLength;
 import org.w3c.css.values.CssNumber;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssPercentage;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -77,7 +87,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssTextIndent(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssTextIndent(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	
 	setByUser();
@@ -96,6 +112,11 @@
 	expression.next();
     }
     
+    public CssTextIndent(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssVerticalAlignTV.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssVerticalAlignTV.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CssVerticalAlignTV.java	19 Aug 2002 07:38:04 -0000	1.1
+++ CssVerticalAlignTV.java	8 Aug 2005 13:18:12 -0000	1.2
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.2  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.1  2002/08/19 07:38:04  sijtsche
  * new tv profile property variant
  *
@@ -37,12 +47,12 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssPercentage;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -138,7 +148,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */
-    public CssVerticalAlignTV(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssVerticalAlignTV(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	int hash = val.hashCode();
 
@@ -162,6 +178,11 @@
 	}
     }
 
+    public CssVerticalAlignTV(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssFontStyleCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssFontStyleCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssFontStyleCSS1.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssFontStyleCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -55,11 +65,10 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  *   <H4>
@@ -110,7 +119,13 @@
      * @param expression the font style
      * @exception InvalidParamException values are incorrect
      */  
-    public CssFontStyleCSS1(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssFontStyleCSS1(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
 	if (expression.getValue() instanceof CssIdent) {
 	    int hash = ((CssIdent) expression.getValue()).hashCode();
@@ -126,6 +141,11 @@
 					getPropertyName(), ac);
     }
     
+    public CssFontStyleCSS1(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the current value
      */  

Index: CssBackgroundPositionCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBackgroundPositionCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBackgroundPositionCSS1.java	8 Apr 2002 21:17:42 -0000	1.2
+++ CssBackgroundPositionCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:42  plehegar
  * New
  *
@@ -40,15 +50,15 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.values.CssPercentage;
 import org.w3c.css.values.CssLength;
-import org.w3c.css.values.CssNumber;
+//import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssOperator;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssPercentage;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -80,7 +90,7 @@
  *   background image. Keywords cannot be combined with percentage values, or
  *   length values.  The possible combinations of keywords and their
  *   interpretations are as follows:
- 
+ *
  *   <UL>
  *     <LI>
  *       'top left' and 'left top' both mean the same as '0% 0%'.
@@ -127,17 +137,17 @@
  * @see CssBackgroundAttachment 
  */
 public class CssBackgroundPositionCSS1 extends CssProperty 
-        implements CssBackgroundConstants, CssOperator {
+implements CssBackgroundConstants, CssOperator {
     
-    CssValue horizontal;
-    CssValue vertical;
+    CssValue first;
+    CssValue second;
     
     /**
      * Create a new CssBackgroundPositionCSS1
      */
     public CssBackgroundPositionCSS1() {
-	horizontal = DefaultValue0;
-	vertical = DefaultValue0;
+	first = DefaultValue0;
+	second = DefaultValue0;
     }  
     
     /**
@@ -146,73 +156,104 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssBackgroundPositionCSS1(ApplContext ac, CssExpression expression) 
-	throws InvalidParamException {
+    public CssBackgroundPositionCSS1(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 2) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
 	CssValue val = expression.getValue();
 	char op  = expression.getOperator();
-	int index;
 	
 	if (op != SPACE)
 	    throw new  InvalidParamException("operator", 
-					     ((new Character(op)).toString()),
-					     ac);
+		    ((new Character(op)).toString()),
+		    ac);
 	
 	if (val.equals(inherit)) {
-	    horizontal = inherit;
-	    vertical = inherit;
+	    if(expression.getCount() > 1) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    first = inherit;
+	    second = inherit;
 	    expression.next();
 	    return;
-	} else if (val instanceof CssIdent 
-	    && (index=IndexOfIdent((String) val.get())) != INVALID) {
-	    CssValue next = expression.getNextValue();
-	    expression.next();
-	    if (next == null) {
-		getPercentageFromIdent(index, INVALID);
-	    } else if (next instanceof CssIdent) {
+	}
+	
+	CssValue next = expression.getNextValue();	
+	
+	if(val instanceof CssIdent) {
+	    int index1 = IndexOfIdent((String) val.get());
+	    // two keywords
+	    if(next instanceof CssIdent) {
 		int index2 = IndexOfIdent((String) next.get());
-		if (index2 != INVALID) {
-		    getPercentageFromIdent(index, index2);
-		    expression.next();
-		} else {
-		    getPercentageFromIdent(index, INVALID);
+		// one is vertical, the other is vertical
+		// or the two are 'center'
+		if((isHorizontal(index1) && isVertical(index2)) ||
+			(isHorizontal(index2) && isVertical(index1))) {
+		    first = val;
+		    second = next;		    
+		}
+		// both are horizontal or vertical but not 'center'
+		else if(check){		    
+		    throw new InvalidParamException("incompatible",
+			    val, next, ac);
+		}
+		else {
+		    first = val;
 		}
 	    }
-	} else if (val instanceof CssLength || 
-		   val instanceof CssPercentage || val instanceof CssNumber) {
-	    if (val instanceof CssNumber) {
-		val = ((CssNumber) val).getLength();
+	    // only one value
+	    else if(next == null) {
+		first = val;
 	    }
-	    horizontal = val;
-	    expression.next();
-	    val = expression.getValue();
-	    if (val instanceof CssLength || 
-		val instanceof CssPercentage || val instanceof CssNumber) {
-		if (val instanceof CssNumber) {
-		    try {
-			val = ((CssNumber) val).getLength();
-		    } catch (InvalidParamException e) {
-			vertical = DefaultValue50;
-			return;
-		    }
-		}
-		vertical = val;
-		expression.next();
-	    } else
-		vertical = DefaultValue50;
-	} else {
+	    // the second value is invalid
+	    else if(check) {		
+		throw new InvalidParamException("value", next, 
+			getPropertyName(), ac);
+	    }
+	    else {
+		first = val;
+	    }
+	}
+	else if(val instanceof CssLength || val instanceof CssPercentage) {
+	    if(next instanceof CssLength || next instanceof CssPercentage) {
+		first = val;
+		second = next;
+	    }
+	    else if(next == null || !check) {
+		first = val;
+	    }
+	    else {
+		throw new InvalidParamException("incompatible", val, next, ac);
+	    }
+	}
+	else if(check){
 	    throw new InvalidParamException("value", expression.getValue(), 
-					    getPropertyName(), ac);
+		    getPropertyName(), ac);
 	}
-
 	
+	// we only move the cursor if we found valid values
+	if(first != null) {	    
+	    expression.next();	    
+	}
+	if(second != null) {	    
+	    expression.next();	    
+	}
+    }
+    
+    public CssBackgroundPositionCSS1(ApplContext ac, CssExpression expression) 
+    throws InvalidParamException {
+	this(ac, expression, false);
     }
     
     /**
      * Returns the value of this property
      */
     public Object get() {
-	return horizontal;
+	return first;
     }
     
     /**
@@ -223,51 +264,72 @@
     }
     
     /**
-     * Returns the horizontal value of the position
+     * Returns the first value of the position
      */
     public CssValue getHorizontalPosition() {
-	return horizontal;
+	return first;
     }
     
     /**
-     * Returns the vertical value of the position
+     * Returns the second value of the position
      */
     public CssValue getVerticalPosition() {
-	return vertical;
+	return second;
     }
-
+    
     /**
      * Returns true if this property is "softly" inherited
      * e.g. his value equals inherit
      */
     public boolean isSoftlyInherited() {
-	return horizontal == inherit;
+	return first == inherit;
     }
     
     /**
      * Returns a string representation of the object.
      */
     public String toString() {
-	if (horizontal == inherit) {
+	if (first == inherit) {
 	    return inherit.toString();
-	} else {
-	    return horizontal + " " + vertical;
+	}
+	else {
+	    String ret = "";
+	    if (first != null) {
+		ret += first;
+	    }
+	    if (second != null) {
+		if (!ret.equals("")) {
+		    ret += " ";
+		}
+		ret += second;
+	    }
+	    return ret;
 	}
     }
     
-    private void getPercentageFromIdent(int first, int second) {
-	horizontal = DefaultValue50;
-	vertical = DefaultValue50;
-	if (first == POSITION_LEFT || second == POSITION_LEFT)
-	    horizontal = DefaultValue0;
-	if (first == POSITION_RIGHT || second == POSITION_RIGHT)
-	    horizontal = DefaultValue100;
-	if (first == POSITION_TOP || second == POSITION_TOP)
-	    vertical = DefaultValue0;
-	if (first == POSITION_BOTTOM || second == POSITION_BOTTOM)
-	    vertical = DefaultValue100;
+    private boolean isHorizontal(int index) {
+	return index == POSITION_LEFT || index == POSITION_RIGHT ||
+	index == POSITION_CENTER;
     }
     
+    private boolean isVertical(int index) {
+	return index == POSITION_TOP || index == POSITION_BOTTOM ||
+	index == POSITION_CENTER;
+    }
+    /*
+     private void getPercentageFromIdent(int first, int second) {
+     this.first = DefaultValue50;
+     this.second = DefaultValue50;
+     if (first == POSITION_LEFT || second == POSITION_LEFT)
+     this.first = DefaultValue0;
+     if (first == POSITION_RIGHT || second == POSITION_RIGHT)
+     this.first = DefaultValue100;
+     if (first == POSITION_TOP || second == POSITION_TOP)
+     this.second = DefaultValue0;
+     if (first == POSITION_BOTTOM || second == POSITION_BOTTOM)
+     this.second = DefaultValue100;
+     }
+     */
     /**
      * Add this property to the CssStyle.
      *
@@ -301,8 +363,8 @@
      */  
     public boolean equals(CssProperty property) {
 	return (property instanceof CssBackgroundPositionCSS1 && 
-		horizontal.equals(((CssBackgroundPositionCSS1) property).horizontal)
-		&& vertical.equals(((CssBackgroundPositionCSS1) property).vertical));
+		first.equals(((CssBackgroundPositionCSS1) property).first)
+		&& second.equals(((CssBackgroundPositionCSS1) property).second));
     }
     
     /**
@@ -310,7 +372,7 @@
      * It is used by all macro for the function <code>print</code>
      */  
     public boolean isDefault() {
-	return horizontal.equals(DefaultValue0) && vertical.equals(DefaultValue0);
+	return first.equals(DefaultValue0) && second.equals(DefaultValue0);
     }
     
     private int IndexOfIdent(String ident) throws InvalidParamException {
@@ -324,10 +386,10 @@
     
     private static int[] hash_values;
     
-    private static int INVALID = -1;
+    //private static int INVALID = -1;
     private static CssPercentage DefaultValue0 = new CssPercentage(0);
-    private static CssPercentage DefaultValue50 = new CssPercentage(50);
-    private static CssPercentage DefaultValue100 = new CssPercentage(100);
+    //private static CssPercentage DefaultValue50 = new CssPercentage(50);
+    //private static CssPercentage DefaultValue100 = new CssPercentage(100);
     
     static {
 	hash_values = new int[POSITION.length];

Index: CssMarginRight.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssMarginRight.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssMarginRight.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssMarginRight.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -28,9 +38,9 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
-import org.w3c.css.values.CssExpression;
-import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
+import org.w3c.css.values.CssExpression;
 
 /**
  *   <H4>
@@ -74,8 +84,14 @@
    * @param expression The expression for this property.
    * @exception InvalidParamException Values are incorrect
    */
-  public CssMarginRight(ApplContext ac, CssExpression expression) throws InvalidParamException {
-    super(ac, expression);
+  public CssMarginRight(ApplContext ac, CssExpression expression)
+  	throws InvalidParamException {
+      super(ac, expression);
+  }
+  
+  public CssMarginRight(ApplContext ac, CssExpression expression, boolean check)
+	throws InvalidParamException {
+      super(ac, expression, check);
   }
   
   /**

Index: CssBackgroundRepeatCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBackgroundRepeatCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBackgroundRepeatCSS2.java	8 Apr 2002 21:17:42 -0000	1.2
+++ CssBackgroundRepeatCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:42  plehegar
  * New
  *
@@ -31,11 +41,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -65,7 +75,8 @@
  *   In the example above, the image will only be repeated vertically.
  * @version $Revision$
  */
-public class CssBackgroundRepeatCSS2 extends CssProperty implements CssBackgroundConstants {
+public class CssBackgroundRepeatCSS2 extends CssProperty 
+	implements CssBackgroundConstants {
     
     int repeat;
     
@@ -83,8 +94,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssBackgroundRepeatCSS2(ApplContext ac, CssExpression expression) 
-	    throws InvalidParamException {
+    public CssBackgroundRepeatCSS2(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	setByUser();
 	
@@ -98,12 +114,16 @@
 		}
 	    }
 	}
-
 	
 	throw new InvalidParamException("value", expression.getValue(), 
 					getPropertyName(), ac);
     }
     
+    public CssBackgroundRepeatCSS2(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssMarkerOffset.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssMarkerOffset.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssMarkerOffset.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssMarkerOffset.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -9,13 +9,13 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
+import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssLength;
 import org.w3c.css.values.CssNumber;
-import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  */
@@ -38,8 +38,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssMarkerOffset(ApplContext ac, CssExpression expression) 
-	    throws InvalidParamException {
+    public CssMarkerOffset(ApplContext ac, CssExpression expression, 
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	
 	setByUser();
@@ -59,6 +64,11 @@
 	expression.next();
     }
     
+    public CssMarkerOffset(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssFontWeight.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssFontWeight.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssFontWeight.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssFontWeight.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -19,12 +29,12 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssNumber;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -168,7 +178,13 @@
      * @param expr the expression
      * @exception InvalidParamException values are incorrect
      */  
-    public CssFontWeight(ApplContext ac, CssExpression expr) throws InvalidParamException {
+    public CssFontWeight(ApplContext ac, CssExpression expr, boolean check)
+    	throws InvalidParamException {
+	
+	if(check && expr.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expr.getValue();
 	
 	setByUser();
@@ -198,6 +214,11 @@
 					getPropertyName(), ac);
     }
     
+    public CssFontWeight(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the current value.
      */  

Index: CssBorderTopWidth.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderTopWidth.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderTopWidth.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderTopWidth.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -22,10 +32,10 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
 import org.w3c.css.values.CssValue;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  *   <H4>
@@ -86,13 +96,22 @@
      * @param expression The expression for this property.
      * @exception InvalidParamException Values are incorrect
      */
-    public CssBorderTopWidth(ApplContext ac, CssExpression expression)
-	throws InvalidParamException {
+    public CssBorderTopWidth(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
 	
 	setByUser();
 	face = new CssBorderFaceWidth(ac, expression);
     }
     
+    public CssBorderTopWidth(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression,false);
+    }
+    
     /**
      * Returns the value of this property
      */
@@ -104,14 +123,20 @@
      * Return the value of this property
      */
     public CssValue getValue() {
-	return face.getValue();
+	if(face != null) {
+	    return face.getValue();
+	}
+	return null;
     }
     
     /**
      * Returns a string representation of the object.
      */
     public String toString() {
-	return face.toString();
+	if(face != null) {
+	    return face.toString();
+	}
+	return "";
     }
     
     /**

Index: CssUnicodeBidiATSC.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssUnicodeBidiATSC.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssUnicodeBidiATSC.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssUnicodeBidiATSC.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -9,13 +9,12 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssLength;
-import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssNumber;
+import org.w3c.css.values.CssValue;
 
 /**
  */
@@ -42,8 +41,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssUnicodeBidiATSC(ApplContext ac, CssExpression expression) 
-	    throws InvalidParamException {
+    public CssUnicodeBidiATSC(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	
 	setByUser();
@@ -79,6 +83,11 @@
 	
     }
     
+    public CssUnicodeBidiATSC(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+}
+    
     /**
      * Returns the value of this property
      */

Index: CssColor.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssColor.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- CssColor.java	30 May 2004 05:06:52 -0000	1.5
+++ CssColor.java	8 Aug 2005 13:18:12 -0000	1.6
@@ -7,16 +7,16 @@
 
 package org.w3c.css.properties;
 
+import java.util.Vector;
+
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssFunction;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssOperator;
-
-import java.util.Vector;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -55,12 +55,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */
-    public CssColor(ApplContext ac, CssExpression expression) 
-	throws InvalidParamException 
-    {
-	if (expression.getCount() > 1 ) {
-            throw new InvalidParamException("unrecognize", ac);
-        }
+    public CssColor(ApplContext ac, CssExpression expression, boolean check) 
+	throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	setByUser();
 	if (val.equals(inherit)) {
@@ -233,6 +234,11 @@
 	}
     }
 
+    public CssColor(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssBorderFaceWidthCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderFaceWidthCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderFaceWidthCSS2.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderFaceWidthCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -27,99 +37,110 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
+import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssLength;
 import org.w3c.css.values.CssNumber;
-import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  * @version $Revision$
  */
 public class CssBorderFaceWidthCSS2 {
-
-  CssValue value;
-
-  /**
-   * Create a new CssBorderFaceWidthCSS2
-   */
-  public CssBorderFaceWidthCSS2() {
-    value = medium;
-  }
-
-  /**
-   * Create a new CssBorderFaceWidthCSS2 from an another CssBorderFaceWidthCSS2
-   *
-   * @param another The another side.
-   */
-  public CssBorderFaceWidthCSS2(CssBorderFaceWidthCSS2 another) {
-    value = another.value;
-  }
-
-  /**
-   * Create a new CssBorderFaceWidth
-   *
-   * @param expression The expression for this property
-   * @exception InvalidParamException Values are incorrect
-   */
-  public CssBorderFaceWidthCSS2(ApplContext ac, CssExpression expression) 
-    throws InvalidParamException {
-
-    CssValue val = expression.getValue();
-
-    if (val instanceof CssLength) {
-      float f = ((Float) val.get()).floatValue();
-      if (f >= 0) 
-	this.value = val;
-      else
-	throw new InvalidParamException("negative-value", val.toString(), ac);
-    } else if (val instanceof CssNumber) {
-      value = ((CssNumber) val).getLength();
-    } else if (val.equals(thin)) {
-      value = thin;
-    } else if (val.equals(medium)) {
-      value = medium;
-    } else if (val.equals(thick)) {
-      value = thick;
-    } else if (val.equals(CssProperty.inherit)) {
-	value = CssProperty.inherit;
-    } else {
-      throw new InvalidParamException("value", val.toString(), "width", ac);
+    
+    CssValue value;
+    
+    /**
+     * Create a new CssBorderFaceWidthCSS2
+     */
+    public CssBorderFaceWidthCSS2() {
+	value = medium;
     }
-
-    expression.next();
-  }  
-
-  /**
-   * Returns the internal value
-   */  
-  public CssValue getValue() {
-    return value;
-  }
-
-  /**
-   * Returns a string representation of the object.
-   */
-  public String toString() {  
-    return value.toString();
-  }
-
-  /**
-   * Compares two sides for equality.
-   *
-   * @param value The another side.
-   */  
-  public boolean equals(CssBorderFaceWidthCSS2 another) {
-    return value.equals(another.value);
-  }
-  
-  private static CssIdent thin = new CssIdent("thin");
-  private static CssIdent medium = new CssIdent("medium");
-  private static CssIdent thick = new CssIdent("thick");
-  
+    
+    /**
+     * Create a new CssBorderFaceWidthCSS2 from an another CssBorderFaceWidthCSS2
+     *
+     * @param another The another side.
+     */
+    public CssBorderFaceWidthCSS2(CssBorderFaceWidthCSS2 another) {
+	value = another.value;
+    }
+    
+    /**
+     * Create a new CssBorderFaceWidth
+     *
+     * @param expression The expression for this property
+     * @exception InvalidParamException Values are incorrect
+     */
+    public CssBorderFaceWidthCSS2(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
+	CssValue val = expression.getValue();
+	
+	if (val instanceof CssLength) {
+	    float f = ((Float) val.get()).floatValue();
+	    if (f >= 0) 
+		this.value = val;
+	    else
+		throw new InvalidParamException("negative-value", val.toString(), ac);
+	} else if (val instanceof CssNumber) {
+	    value = ((CssNumber) val).getLength();
+	} else if (val.equals(thin)) {
+	    value = thin;
+	} else if (val.equals(medium)) {
+	    value = medium;
+	} else if (val.equals(thick)) {
+	    value = thick;
+	} else if (val.equals(CssProperty.inherit)) {
+	    value = CssProperty.inherit;
+	} else {
+	    throw new InvalidParamException("value", val.toString(), "width", ac);
+	}
+	
+	expression.next();
+    }  
+    
+    public CssBorderFaceWidthCSS2(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
+    /**
+     * Returns the internal value
+     */  
+    public CssValue getValue() {
+	return value;
+    }
+    
+    /**
+     * Returns a string representation of the object.
+     */
+    public String toString() {  
+	if(value != null) {
+	    return value.toString();
+	}
+	return "";
+    }
+    
+    /**
+     * Compares two sides for equality.
+     *
+     * @param value The another side.
+     */  
+    public boolean equals(CssBorderFaceWidthCSS2 another) {
+	return value.equals(another.value); // FIXME
+    }
+    
+    private static CssIdent thin = new CssIdent("thin");
+    private static CssIdent medium = new CssIdent("medium");
+    private static CssIdent thick = new CssIdent("thick");
+    
 }
 
 

Index: CssFontConstant.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssFontConstant.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CssFontConstant.java	18 Dec 2002 09:21:01 -0000	1.3
+++ CssFontConstant.java	8 Aug 2005 13:18:12 -0000	1.4
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.4  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.3  2002/12/18 09:21:01  sijtsche
  * values changed
  *
@@ -65,10 +75,10 @@
   /**
    * Array of font values
    */
-  static String[] FONT = { "icon", "window", "status-bar", "document", "workspace", "desktop",
-  						   "tooltip", "message-box", "dialog", "small-caption", "caption", "button",
-  						   "default-button", "hyperlink", "menu", "pull-down-menu", "pop-up-menu",
-  						   "list-menu", "field", "inherit"
-	  					 };
-
+  static String[] FONT = { "icon", "window", "status-bar", "document", 
+      "workspace", "desktop", "tooltip", "message-box", "dialog", 
+      "small-caption", "caption", "button", "default-button", "hyperlink",
+      "menu", "pull-down-menu", "pop-up-menu", "list-menu", "field", "inherit"
+  };
+  
 }

Index: CssBorderRightColorCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderRightColorCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderRightColorCSS1.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderRightColorCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -26,122 +36,138 @@
 
 import org.w3c.css.parser.CssPrinterStyle;
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
 import org.w3c.css.values.CssValue;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  * Be careful, this is not a CSS1 property !
  * @version $Revision$
  */
 public class CssBorderRightColorCSS1 extends CssProperty {
-
-  CssBorderFaceColorCSS1 face;
-  
-  /**
-   * Create a new CssBorderRightColorCSS1
-   */
-  public CssBorderRightColorCSS1() {
-    face = new CssBorderFaceColorCSS1();
-  }
-  
-  /**
-   * Create a new CssBorderRightColorCSS1 with an another CssBorderFaceColorCSS1
-   *
-   * @param another The another side.
-   */
-  public CssBorderRightColorCSS1(CssBorderFaceColorCSS1 another) {
-
-      setByUser();
-
-    face = another;
-  }
-  
-  /**
-   * Create a new CssBorderRightColorCSS1
-   *
-   * @param expression The expression for this property.
-   * @exception InvalidParamException Values are incorrect
-   */
-  public CssBorderRightColorCSS1(ApplContext ac, CssExpression expression) 
+    
+    CssBorderFaceColorCSS1 face;
+    
+    /**
+     * Create a new CssBorderRightColorCSS1
+     */
+    public CssBorderRightColorCSS1() {
+	face = new CssBorderFaceColorCSS1();
+    }
+    
+    /**
+     * Create a new CssBorderRightColorCSS1 with an another CssBorderFaceColorCSS1
+     *
+     * @param another The another side.
+     */
+    public CssBorderRightColorCSS1(CssBorderFaceColorCSS1 another) {
+	
+	setByUser();
+	
+	face = another;
+    }
+    
+    /**
+     * Create a new CssBorderRightColorCSS1
+     *
+     * @param expression The expression for this property.
+     * @exception InvalidParamException Values are incorrect
+     */
+    public CssBorderRightColorCSS1(ApplContext ac, CssExpression expression,
+	    boolean check) 
     throws InvalidParamException {
-
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
-    face = new CssBorderFaceColorCSS1(ac, expression);
-  }
-  
-  /**
-   * Returns the value of this property
-   */
-  public Object get() {
-    return face;
-  }
-
-  /**
-   * Returns the color of this property
-   */
-  public CssValue getColor() {
-    return face.getColor();
-  }
-
-  /**
-   * Returns a string representation of the object.
-   */
-  public String toString() {
-    return face.toString();
-  }
-
-  /**
-   * Returns the name of this property
-   */  
-  public String getPropertyName() {
-    return "border-right-color";
-  }
-
-  /**
-   * Add this property to the CssStyle.
-   *
-   * @param style The CssStyle
-   */
-  public void addToStyle(ApplContext ac, CssStyle style) {
-    CssBorderRightCSS1 right = ((Css1Style) style).cssBorderCSS1.right;
-    if (right.color != null)
-      style.addRedefinitionWarning(ac, this);
-    right.color = this;
-  }
-
-  /**
-   * Get this property in the style.
-   *
-   * @param style The style where the property is
-   * @param resolve if true, resolve the style to find this property
-   */  
-  public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
-    if (resolve) {
-      return ((Css1Style) style).getBorderRightColorCSS1();
-    } else {
-      return ((Css1Style) style).cssBorderCSS1.getRight().color;
+	face = new CssBorderFaceColorCSS1(ac, expression);
+    }
+    
+    public CssBorderRightColorCSS1(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression,false);
+    }
+    
+    /**
+     * Returns the value of this property
+     */
+    public Object get() {
+	return face;
+    }
+    
+    /**
+     * Returns the color of this property
+     */
+    public CssValue getColor() {
+	if(face != null) {
+	    return face.getColor();
+	}
+	return null;
+    }
+    
+    /**
+     * Returns a string representation of the object.
+     */
+    public String toString() {
+	if(face != null) {
+	    return face.toString();
+	}
+	return "";
+    }
+    
+    /**
+     * Returns the name of this property
+     */  
+    public String getPropertyName() {
+	return "border-right-color";
+    }
+    
+    /**
+     * Add this property to the CssStyle.
+     *
+     * @param style The CssStyle
+     */
+    public void addToStyle(ApplContext ac, CssStyle style) {
+	CssBorderRightCSS1 right = ((Css1Style) style).cssBorderCSS1.right;
+	if (right.color != null)
+	    style.addRedefinitionWarning(ac, this);
+	right.color = this;
+    }
+    
+    /**
+     * Get this property in the style.
+     *
+     * @param style The style where the property is
+     * @param resolve if true, resolve the style to find this property
+     */  
+    public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
+	if (resolve) {
+	    return ((Css1Style) style).getBorderRightColorCSS1();
+	} else {
+	    return ((Css1Style) style).cssBorderCSS1.getRight().color;
+	}
+    }
+    
+    /**
+     * Compares two properties for equality.
+     *
+     * @param value The other property.
+     */  
+    public boolean equals(CssProperty property) {
+	return (property instanceof CssBorderRightColorCSS1 && 
+		face.equals(((CssBorderRightColorCSS1) property).face));
+    }
+    
+    /**
+     * Print this property.
+     *
+     * @param printer The printer.
+     */  
+    public void print(CssPrinterStyle printer) {
+	if (face != null && !face.isDefault())
+	    printer.print(this);
     }
-  }
-
-  /**
-   * Compares two properties for equality.
-   *
-   * @param value The other property.
-   */  
-  public boolean equals(CssProperty property) {
-    return (property instanceof CssBorderRightColorCSS1 && 
-	    face.equals(((CssBorderRightColorCSS1) property).face));
-  }
-
-  /**
-   * Print this property.
-   *
-   * @param printer The printer.
-   */  
-  public void print(CssPrinterStyle printer) {
-    if (!face.isDefault())
-      printer.print(this);
-  }
 }

Index: CssWordSpacing.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssWordSpacing.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssWordSpacing.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssWordSpacing.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -31,13 +41,13 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
+import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssLength;
 import org.w3c.css.values.CssNumber;
-import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -65,6 +75,9 @@
  */
 public class CssWordSpacing extends CssProperty {
     
+    private CssValue length;
+    private static CssIdent normal = new CssIdent("normal");
+    
     /**
      * Create a new CssWordSpacing.
      */
@@ -78,7 +91,13 @@
      * @param expression The expression
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssWordSpacing(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssWordSpacing(ApplContext ac, CssExpression expression,
+	boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	
 	setByUser();
@@ -101,6 +120,11 @@
 	}
     }
     
+    public CssWordSpacing(ApplContext ac, CssExpression expression) 
+    throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */
@@ -164,8 +188,5 @@
     public boolean equals(CssProperty property) {
 	return (property instanceof CssWordSpacing && 
 		length.equals(((CssWordSpacing) property).length));
-    }
-    
-    private CssValue length;
-    private static CssIdent normal = new CssIdent("normal");
+    }    
 }

Index: CssMaxHeight.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssMaxHeight.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssMaxHeight.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssMaxHeight.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -9,14 +9,14 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssNumber;
+import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssLength;
+import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssPercentage;
-import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  */
@@ -39,7 +39,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssMaxHeight(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssMaxHeight(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	
 	setByUser();
@@ -65,6 +71,11 @@
 	expression.next();
     }
     
+    public CssMaxHeight(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property.
      */

Index: CssLineHeightCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssLineHeightCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssLineHeightCSS1.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssLineHeightCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -40,14 +50,14 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssLength;
+import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssPercentage;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /** 
  *   <H4>
@@ -95,8 +105,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssLineHeightCSS1(ApplContext ac, CssExpression expression) 
-	    throws InvalidParamException {
+    public CssLineHeightCSS1(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	
 	setByUser();
@@ -126,6 +141,11 @@
 					getPropertyName(), ac);
     }
     
+    public CssLineHeightCSS1(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssBorderBottomStyle.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderBottomStyle.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderBottomStyle.java	8 Apr 2002 21:17:42 -0000	1.2
+++ CssBorderBottomStyle.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:42  plehegar
  * New
  *
@@ -22,11 +32,9 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
-import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
+import org.w3c.css.values.CssExpression;
 
 /**
  * Be careful, this is not a CSS1 property !
@@ -59,11 +67,20 @@
    * @param expression The expression for this property.
    * @exception InvalidParamException Values are incorrect
    */
-  public CssBorderBottomStyle(ApplContext ac, CssExpression expression) 
-    throws InvalidParamException {
+  public CssBorderBottomStyle(ApplContext ac, CssExpression expression,
+	  boolean check) throws InvalidParamException {
+      
+      if(check && expression.getCount() > 1) {
+	  throw new InvalidParamException("unrecognize", ac);
+      }
 
       setByUser();
-    face = new CssBorderFaceStyle(ac, expression);
+      face = new CssBorderFaceStyle(ac, expression);
+  }
+  
+  public CssBorderBottomStyle(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
   }
   
   /**
@@ -77,14 +94,20 @@
    * Returns the value
    */
   public String getStyle() {
-    return face.getStyle();
+      if(face != null) {
+	  return face.getStyle();
+      }
+      return null;
   }
 
   /**
    * Returns a string representation of the object.
    */
   public String toString() {
-    return face.toString();
+      if(face != null) {
+	  return face.toString();
+      }
+      return "";
   }
 
   /**
@@ -126,7 +149,8 @@
    * @param value The other property.
    */  
   public boolean equals(CssProperty property) {
-    return (property instanceof CssBorderBottomStyle && face.equals(((CssBorderBottomStyle) property).face));
+    return (property instanceof CssBorderBottomStyle &&
+	    face.equals(((CssBorderBottomStyle) property).face));
   }
 
 }

Index: CssBackgroundColorCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBackgroundColorCSS1.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CssBackgroundColorCSS1.java	29 Aug 2003 15:23:39 -0000	1.3
+++ CssBackgroundColorCSS1.java	8 Aug 2005 13:18:12 -0000	1.4
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.4  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.3  2003/08/29 15:23:39  plehegar
  * Fix from Sijtsche
  *
@@ -41,12 +51,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.values.CssColor;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -84,8 +93,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */
-    public CssBackgroundColorCSS1(ApplContext ac, CssExpression expression)
-	throws InvalidParamException {
+    public CssBackgroundColorCSS1(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+
 	setByUser();
 	CssValue val = expression.getValue();
 
@@ -109,6 +123,11 @@
 	}
     }
 
+    public CssBackgroundColorCSS1(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssPositionTV.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssPositionTV.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CssPositionTV.java	19 Aug 2002 07:38:04 -0000	1.1
+++ CssPositionTV.java	8 Aug 2005 13:18:12 -0000	1.2
@@ -9,11 +9,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  */
@@ -39,7 +39,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorect
      */
-    public CssPositionTV(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssPositionTV(ApplContext ac, CssExpression expression, boolean check)
+    	throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 
 	setByUser();
@@ -57,6 +63,11 @@
 	throw new InvalidParamException("value", expression.getValue(),
 					getPropertyName(), ac);
     }
+    
+    public CssPositionTV(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
 
     /**
      * Returns the value of this property

Index: CssBackgroundImage.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBackgroundImage.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBackgroundImage.java	8 Apr 2002 21:17:42 -0000	1.2
+++ CssBackgroundImage.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:42  plehegar
  * New
  *
@@ -38,12 +48,12 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssURL;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -83,8 +93,12 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssBackgroundImage(ApplContext ac, CssExpression expression) 
-	throws InvalidParamException {
+    public CssBackgroundImage(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
 	
 	setByUser();
 
@@ -104,6 +118,11 @@
 	}
     }
     
+    public CssBackgroundImage(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */
@@ -116,14 +135,20 @@
      * e.g. his value equals inherit
      */
     public boolean isSoftlyInherited() {
-	return url.equals(inherit);
+	if (url != null) {
+	    return url.equals(inherit);
+	}
+	return false;
     }
     
     /**
      * Returns a string representation of the object.
      */
     public String toString() {
-	return url.toString();
+	if (url != null) {
+	    return url.toString();
+	}
+	return "";
     }
     
     /**
@@ -165,7 +190,7 @@
      * @param value The other property.
      */  
     public boolean equals(CssProperty property) {
-	return (property instanceof CssBackgroundImage && 
+	return (property instanceof CssBackgroundImage && url != null &&
 		url.equals(((CssBackgroundImage) property).url));
     }
     

Index: CssFontSizeAdjust.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssFontSizeAdjust.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssFontSizeAdjust.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssFontSizeAdjust.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -13,12 +23,12 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssNumber;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *
@@ -44,8 +54,14 @@
      * @param expression the font size-adjust
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssFontSizeAdjust(ApplContext ac, CssExpression expression) 
+    public CssFontSizeAdjust(ApplContext ac, CssExpression expression,
+	    boolean check) 
 	throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	setByUser();
 
@@ -63,6 +79,11 @@
 	expression.next();
     }
     
+    public CssFontSizeAdjust(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the current value
      */  

Index: CssBorderTop.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderTop.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CssBorderTop.java	8 Jan 2003 10:24:47 -0000	1.3
+++ CssBorderTop.java	8 Aug 2005 13:18:12 -0000	1.4
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.4  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.3  2003/01/08 10:24:47  sijtsche
  * changes for CSS3 border
  *
@@ -36,16 +46,16 @@
  */
 package org.w3c.css.properties;
 
+import org.w3c.css.parser.CssPrinterStyle;
 import org.w3c.css.parser.CssSelectors;
 import org.w3c.css.parser.CssStyle;
-import org.w3c.css.parser.CssPrinterStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssLength;
 import org.w3c.css.values.CssOperator;
 import org.w3c.css.values.CssURL;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -98,13 +108,20 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */
-    public CssBorderTop(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssBorderTop(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
 	CssValue val = null;
 	char op = SPACE;
 	boolean find = true;
 
+	if(check && expression.getCount() > 4) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
 
+	boolean manyValues = (expression.getCount() > 1);
+	
 	while (find) {
 	    find = false;
 	    val = expression.getValue();
@@ -113,42 +130,55 @@
 	    if (val == null)
 		break;
 
+	    // if there are many values, we can't have inherit as one of them
+	    if(manyValues && val.equals(inherit)) {
+		throw new InvalidParamException("unrecognize", null, null, ac);
+	    }
+	    
 	    if (op != SPACE)
 			throw new InvalidParamException("operator",
 						((new Character(op)).toString()), ac);
 
 	    if (width == null) {
-			try {
-			    width = new CssBorderTopWidth(ac, expression);
-			    find = true;
-			} catch (InvalidParamException e) {}
+		try {
+		    width = new CssBorderTopWidth(ac, expression);
+		    find = true;
+		} catch (InvalidParamException e) {
+		    // nothing to do, style will test this value
+		}
 	    }
 
 	    if (!find && style == null) {
-			try {
-			    style = new CssBorderTopStyle(ac, expression);
-			    find = true;
-			}
-			catch (InvalidParamException e) {}
+		try {
+		    style = new CssBorderTopStyle(ac, expression);
+		    find = true;
+		}
+		catch (InvalidParamException e) {
+		    // nothing to do, color will test this value
+		}
 	    }
 
 	    if (!find && color == null) {
-
-			try {
-			    color = new CssBorderTopColor(ac, expression);
-			    find = true;
-			}
-			catch (InvalidParamException e) {}
+		try {
+		    color = new CssBorderTopColor(ac, expression);
+		    find = true;
+		}
+		catch (InvalidParamException e) {
+		    // nothing to do, color will test this value
+		}
 	    }
 
 	    if (!find && uri == null) {
-			if (val instanceof CssURL) {
-				uri = val;
-				find = true;
-			}
+		if (val instanceof CssURL) {
+		    uri = val;
+		    find = true;
 		}
+		else {
+		    throw new InvalidParamException("unrecognize", ac);
+		}
+	    }
 	}
-
+	/*
 	if (width == null) {
 	    width = new CssBorderTopWidth();
 	}
@@ -159,8 +189,14 @@
 	if (color == null) {
 	    color = new CssBorderTopColor();
 	}
+	*/
     }
 
+    public CssBorderTop(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression,false);
+    }
+    
     /**
      * Returns the value of this property
      */
@@ -205,11 +241,27 @@
      * Returns a string representation of the object.
      */
     public String toString() {
-	String ret = width + " " + style;
-	if (!color.face.isDefault())
-	    ret += " " + color;
+	String ret = "";
+	if(width != null) {
+	    ret += width;
+	}
+	if(style != null) {
+	    if(!ret.equals("")) {
+		ret += " ";
+	    }
+	    ret += style;
+	}
+	if(color != null) {
+	    if(!ret.equals("")) {
+		ret += " ";
+	    }
+	    ret += color;
+	}
 	if (uri != null) {
-		ret += " " + uri.toString();
+	    if(!ret.equals("")) {
+		ret += " ";
+	    }
+	    ret += " " + uri;
 	}
 	return ret;
     }
@@ -226,9 +278,15 @@
      * Overrides this method for a macro
      */
     public void setImportant() {
-	width.important = true;
-	style.important = true;
-	color.important = true;
+	if(width != null) {
+	    width.important = true;
+	}
+	if(style != null) {
+	    style.important = true;
+	}
+	if(color != null) {
+	    color.important = true;
+	}
     }
 
     /**
@@ -272,11 +330,16 @@
      *
      * @param style The CssStyle
      */
-    public void addToStyle(ApplContext ac, CssStyle style) {
-	width.addToStyle(ac, style);
-	this.style.addToStyle(ac, style);
-	color.addToStyle(ac, style);
-
+    public void addToStyle(ApplContext ac, CssStyle style) {	
+	if(width != null) {
+	    width.addToStyle(ac, style);
+	}
+	if(this.style != null) {
+	    this.style.addToStyle(ac, style);
+	}
+	if(color != null) {
+	    color.addToStyle(ac, style);
+	}
     }
 
     /**
@@ -301,12 +364,18 @@
      * @param source The source file where this property is defined
      */
     public void setInfo(int line, String source) {
-	super.setInfo(line, source);
-	width.setInfo(line, source);
-	style.setInfo(line, source);
-	color.setInfo(line, source);
+	super.setInfo(line, source);	
+	if(width != null) {
+	    width.setInfo(line, source);
+	}
+	if(style != null) {
+	    style.setInfo(line, source);
+	}
+	if(color != null) {
+	    color.setInfo(line, source);
+	}
     }
-
+    
     /**
      * Set the context.
      * Overrides this method for a macro
@@ -335,8 +404,9 @@
     public boolean equals(CssProperty property) {
 	if (property instanceof CssBorderTop) {
 	    CssBorderTop top = (CssBorderTop) property;
-	    return (width.equals(top.width)
-		    && style.equals(top.style) && color.equals(top.color));
+	    return (width != null && width.equals(top.width) &&
+		    style != null && style.equals(top.style) &&
+		    color != null && color.equals(top.color));
 	} else {
 	    return false;
 	}

Index: TextShadowFace.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/TextShadowFace.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- TextShadowFace.java	8 Apr 2002 21:17:44 -0000	1.2
+++ TextShadowFace.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -13,16 +13,15 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
-import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssOperator;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssColor;
-import org.w3c.css.values.CssValue;
+import org.w3c.css.values.CssExpression;
 import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssLength;
 import org.w3c.css.values.CssNumber;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssOperator;
+import org.w3c.css.values.CssValue;
 
 public class TextShadowFace implements CssOperator {
 
@@ -32,10 +31,16 @@
     CssValue val;
     char op;
 
-    TextShadowFace(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    TextShadowFace(ApplContext ac, CssExpression expression, boolean check)
+    	throws InvalidParamException {
+	
+	if(check && expression.getCount() > 4) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}	
+	
 	val = expression.getValue();
 	op = expression.getOperator();
-	
+
 	if (val instanceof CssColor) {
 	    color = (CssColor) val;
 	    expression.next();
@@ -66,6 +71,11 @@
 	}
     }
 
+    TextShadowFace(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);	
+    }
+    
     void getLengths(ApplContext ac, CssExpression expression) throws InvalidParamException {
 	CssLength le = getLength(expression.getValue());
 	op = expression.getOperator();

Index: CssBorderLeftColor.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderLeftColor.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderLeftColor.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderLeftColor.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -21,12 +31,12 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssPrinterStyle;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
 import org.w3c.css.values.CssValue;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 
 /**
@@ -35,109 +45,125 @@
  * @version $Revision$
  */
 public class CssBorderLeftColor extends CssProperty {
-
-  CssBorderFaceColor face;
-  
-  /**
-   * Create a new CssBorderLeftColor
-   */
-  public CssBorderLeftColor() {
-    face = new CssBorderFaceColor();
-  }
-  
-  /**
-   * Create a new CssBorderLeftColor with an another CssBorderFaceColor
-   * @param another The another side.
-   */
-  public CssBorderLeftColor(CssBorderFaceColor another) {
-
-      setByUser();
-
-    face = another;
-  }
-  
-  /**
-   * Create a new CssBorderLeftColor
-   *
-   * @param expression The expression for this property.
-   * @exception InvalidParamException Values are incorrect
-   */
-  public CssBorderLeftColor(ApplContext ac, CssExpression expression) throws InvalidParamException {
-
+    
+    CssBorderFaceColor face;
+    
+    /**
+     * Create a new CssBorderLeftColor
+     */
+    public CssBorderLeftColor() {
+	face = new CssBorderFaceColor();
+    }
+    
+    /**
+     * Create a new CssBorderLeftColor with an another CssBorderFaceColor
+     * @param another The another side.
+     */
+    public CssBorderLeftColor(CssBorderFaceColor another) {
+	
 	setByUser();
-    face = new CssBorderFaceColor(ac, expression);
-  }
-  
-  /**
-   * Returns the value of this property
-   */
-  public Object get() {
-    return face;
-  }
-
-  /**
-   * Returns the color of this property
-   */
-  public CssValue getColor() {
-    return face.getColor();
-  }
-
-  /**
-   * Returns a string representation of the object.
-   */
-  public String toString() {
-    return face.toString();
-  }
-
-  /**
-   * Returns the name of this property
-   */  
-  public String getPropertyName() {
-    return "border-left-color";
-  }
-
-  /**
-   * Add this property to the CssStyle.
-   *
-   * @param style The CssStyle
-   */
-  public void addToStyle(ApplContext ac, CssStyle style) {
-    CssBorderLeft left = ((Css1Style) style).cssBorder.left;
-    if (left.color != null)
-      style.addRedefinitionWarning(ac, this);
-    left.color = this;
-  }
-
-  /**
-   * Get this property in the style.
-   *
-   * @param style The style where the property is
-   * @param resolve if true, resolve the style to find this property
-   */  
-  public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
-    if (resolve) {
-      return ((Css1Style) style).getBorderLeftColor();
-    } else {
-      return ((Css1Style) style).cssBorder.getLeft().color;
+	
+	face = another;
+    }
+    
+    /**
+     * Create a new CssBorderLeftColor
+     *
+     * @param expression The expression for this property.
+     * @exception InvalidParamException Values are incorrect
+     */
+    public CssBorderLeftColor(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
+	setByUser();
+	face = new CssBorderFaceColor(ac, expression);
+    }
+    
+    public CssBorderLeftColor(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
+    /**
+     * Returns the value of this property
+     */
+    public Object get() {
+	return face;
+    }
+    
+    /**
+     * Returns the color of this property
+     */
+    public CssValue getColor() {
+	if(face != null) {
+	    return face.getColor();
+	}
+	return null;
+    }
+    
+    /**
+     * Returns a string representation of the object.
+     */
+    public String toString() {
+	if(face != null) {
+	    return face.toString();
+	}
+	return "";
+    }
+    
+    /**
+     * Returns the name of this property
+     */  
+    public String getPropertyName() {
+	return "border-left-color";
+    }
+    
+    /**
+     * Add this property to the CssStyle.
+     *
+     * @param style The CssStyle
+     */
+    public void addToStyle(ApplContext ac, CssStyle style) {
+	CssBorderLeft left = ((Css1Style) style).cssBorder.left;
+	if (left.color != null)
+	    style.addRedefinitionWarning(ac, this);
+	left.color = this;
+    }
+    
+    /**
+     * Get this property in the style.
+     *
+     * @param style The style where the property is
+     * @param resolve if true, resolve the style to find this property
+     */  
+    public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
+	if (resolve) {
+	    return ((Css1Style) style).getBorderLeftColor();
+	} else {
+	    return ((Css1Style) style).cssBorder.getLeft().color;
+	}
+    }
+    
+    /**
+     * Compares two properties for equality.
+     *
+     * @param value The other property.
+     */  
+    public boolean equals(CssProperty property) {
+	return (property instanceof CssBorderLeftColor && face.equals(((CssBorderLeftColor) property).face));
+    }
+    
+    /**
+     * Print this property
+     *
+     * @param printer The printer.
+     */  
+    public void print(CssPrinterStyle printer) {
+	if (face != null && !face.isDefault())
+	    printer.print(this);
     }
-  }
-
-  /**
-   * Compares two properties for equality.
-   *
-   * @param value The other property.
-   */  
-  public boolean equals(CssProperty property) {
-    return (property instanceof CssBorderLeftColor && face.equals(((CssBorderLeftColor) property).face));
-  }
-
-  /**
-   * Print this property
-   *
-   * @param printer The printer.
-   */  
-  public void print(CssPrinterStyle printer) {
-    if (!face.isDefault())
-      printer.print(this);
-  }
 }

Index: CssPaddingLeft.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssPaddingLeft.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssPaddingLeft.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssPaddingLeft.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -28,9 +38,9 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
-import org.w3c.css.values.CssExpression;
-import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
+import org.w3c.css.values.CssExpression;
 
 /**
  *   <H4>
@@ -74,8 +84,14 @@
    * @param expression The expression for this property.
    * @exception InvalidParamException Values are incorrect
    */
-  public CssPaddingLeft(ApplContext ac, CssExpression expression) throws InvalidParamException {
-    super(ac, expression);
+  public CssPaddingLeft(ApplContext ac, CssExpression expression, boolean check)
+  	throws InvalidParamException {
+    super(ac, expression, check);
+  }
+  
+  public CssPaddingLeft(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
   }
   
   /**

Index: CssFontCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssFontCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssFontCSS1.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssFontCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -22,14 +32,15 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssPrinterStyle;
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssSelectors;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssIdent;
+import org.w3c.css.values.CssLength;
 import org.w3c.css.values.CssOperator;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssPercentage;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -101,7 +112,7 @@
     CssFontFamilyCSS1  fontFamily;
     
     // internal hack for strings comparaison
-    private static int[] hash_values;
+    //private static int[] hash_values;
     
     /**
      * Create a new CssFontCSS1
@@ -115,12 +126,14 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssFontCSS1(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssFontCSS1(ApplContext ac, CssExpression expression, boolean check)
+    	throws InvalidParamException {
+	
 	CssValue val = expression.getValue();
 	char op = SPACE;
 	boolean find = true;
 	int max_values = 3;
-	int normal = "normal".hashCode();
+	//int normal = "normal".hashCode();
 
 	while (find && max_values-- > 0) {
 	    find = false;
@@ -158,7 +171,7 @@
 	    }
 	    
 	}
-	
+	/*
 	if (fontStyle == null) {
 	    fontStyle = new CssFontStyleCSS1();
 	}
@@ -168,7 +181,7 @@
 	if (fontWeight == null) {
 	    fontWeight = new CssFontWeightCSS1();
 	}
-	
+	*/
 	val = expression.getValue();
 	op = expression.getOperator();
 	
@@ -182,12 +195,13 @@
 	if (op == SLASH) {
 	    op = expression.getOperator();
 	    lineHeight = new CssLineHeightCSS1(ac, expression);
-	} else {
-	    lineHeight = new CssLineHeightCSS1();
 	}
+//	else {
+//	    lineHeight = new CssLineHeightCSS1();
+//	}
 	
 	if (op == SPACE && expression.getValue() != null) {
-	    fontFamily = new CssFontFamilyCSS1(ac, expression);
+	    fontFamily = new CssFontFamilyCSS1(ac, expression, true);
 	} else {
 	    expression.starts();
 	    throw new InvalidParamException("few-value", expression.toString(), ac);
@@ -196,6 +210,11 @@
 	setByUser();
     }
     
+    public CssFontCSS1(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */
@@ -211,17 +230,19 @@
 	    return value.toString();
 	} else {
 	    String ret = "";
-	    if (fontStyle.isByUser()) {
+	    if (fontStyle != null) {
 		ret += " " + fontStyle;
 	    }
-	    if (fontVariant.isByUser()) {
+	    if (fontVariant != null) {
 		ret += " " + fontVariant;
 	    }
-	    if (fontWeight.isByUser()) {
+	    if (fontWeight != null) {
 		ret += " " + fontWeight;
 	    }
-	    ret += " " + fontSize;
-	    if (lineHeight.isByUser()) {
+	    if(fontSize != null) {
+		ret += " " + fontSize;
+	    }
+	    if (lineHeight != null) {
 		ret += "/" + lineHeight;
 	    }
 	    if (fontFamily.size() != 0) {
@@ -238,12 +259,18 @@
     public void setImportant() {
 	super.setImportant();
 	if (value == null) {
-	    fontStyle.important = true;
-	    fontVariant.important = true;
-	    fontWeight.important = true;
-	    fontSize.important = true;
-	    lineHeight.important = true;
-	    fontFamily.important = true;
+	    if(fontStyle != null)
+		fontStyle.important = true;
+	    if(fontVariant != null)
+		fontVariant.important = true;
+	    if(fontWeight != null)
+		fontWeight.important = true;
+	    if(fontSize != null)
+		fontSize.important = true;
+	    if(lineHeight != null)
+		lineHeight.important = true;
+	    if(fontFamily != null)
+		fontFamily.important = true;
 	}
     }
     
@@ -317,12 +344,18 @@
 	if (value != null) {
 	    ((Css1Style) style).cssFontCSS1.value = value;
 	} else {
-	    fontStyle.addToStyle(ac, style);
-	    fontVariant.addToStyle(ac, style);
-	    fontSize.addToStyle(ac, style);
-	    fontWeight.addToStyle(ac, style);
-	    lineHeight.addToStyle(ac, style);
-	    fontFamily.addToStyle(ac, style);
+	    if(fontStyle != null)
+		fontStyle.addToStyle(ac, style);
+	    if(fontVariant != null)
+		fontVariant.addToStyle(ac, style);
+	    if(fontSize != null)
+		fontSize.addToStyle(ac, style);
+	    if(fontWeight != null)
+		fontWeight.addToStyle(ac, style);
+	    if(lineHeight != null)
+		lineHeight.addToStyle(ac, style);
+	    if(fontFamily != null)
+		fontFamily.addToStyle(ac, style);
 	}
     }
     
@@ -336,12 +369,18 @@
     public void setInfo(int line, String source) {
 	super.setInfo(line, source);
 	if (value == null) {
-	    fontStyle.setInfo(line, source);
-	    fontVariant.setInfo(line, source);
-	    fontWeight.setInfo(line, source);
-	    fontSize.setInfo(line, source);
-	    lineHeight.setInfo(line, source);
-	    fontFamily.setInfo(line, source);
+	    if(fontStyle != null)
+		fontStyle.setInfo(line, source);
+	    if(fontVariant != null)
+		fontVariant.setInfo(line, source);
+	    if(fontWeight != null)
+		fontWeight.setInfo(line, source);
+	    if(fontSize != null)
+		fontSize.setInfo(line, source);
+	    if(lineHeight != null)
+		lineHeight.setInfo(line, source);
+	    if(fontFamily != null)
+		fontFamily.setInfo(line, source);
 	}
     }
     

Index: CssBackgroundRepeat.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBackgroundRepeat.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBackgroundRepeat.java	8 Apr 2002 21:17:42 -0000	1.2
+++ CssBackgroundRepeat.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:42  plehegar
  * New
  *
@@ -31,11 +41,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -65,7 +75,8 @@
  *   In the example above, the image will only be repeated vertically.
  * @version $Revision$
  */
-public class CssBackgroundRepeat extends CssProperty implements CssBackgroundConstants {
+public class CssBackgroundRepeat extends CssProperty 
+	implements CssBackgroundConstants {
     
     int repeat;
     
@@ -83,8 +94,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssBackgroundRepeat(ApplContext ac, CssExpression expression) 
-	    throws InvalidParamException {
+    public CssBackgroundRepeat(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	setByUser();
 	
@@ -97,13 +113,16 @@
 		    return;
 		}
 	    }
-	}
-
-	
+	}	
 	throw new InvalidParamException("value", expression.getValue(), 
 					getPropertyName(), ac);
     }
     
+    public CssBackgroundRepeat(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */
@@ -122,7 +141,7 @@
     /**
      * Returns a string representation of the object.
      */
-    public String toString() {
+    public String toString() {	
 	return REPEAT[repeat];
     }
     

Index: CssCounterIncrement.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssCounterIncrement.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssCounterIncrement.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssCounterIncrement.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -11,16 +11,13 @@
 import java.util.Vector;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssNumber;
-import org.w3c.css.values.CssURL;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.values.CssFunction;
+import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssOperator;
-import org.w3c.css.values.CssString;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  */
@@ -43,23 +40,61 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssCounterIncrement(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssCounterIncrement(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
 	CssValue val = expression.getValue();
 	int counter = 0;
 	char op = expression.getOperator();
 	
 	setByUser();
 	if (val.equals(inherit)) {
+	    if(expression.getCount() > 1) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    values.addElement(inherit);
 	    expression.next();
 	    return;
 	} else if (val.equals(none)) {
+	    if(expression.getCount() > 1) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    values.addElement(none);
 	    expression.next();
 	    return;
 	}
 
-
+	while(counter < expression.getCount()) {
+	    
+	    if(val.equals(inherit) || val.equals(none)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    
+	    // the operator must be a space
+	    if(op != CssOperator.SPACE) {
+		throw new InvalidParamException("operator",
+			new Character(op), ac);
+	    }
+	    // an ident
+	    if(val instanceof CssIdent) {
+		values.addElement(val);		
+	    }	    
+	    // a number associated to the previous ident
+	    else if(val instanceof CssNumber
+		    && ((CssNumber) val).isInteger()
+		    && (values.get(values.size() - 1) instanceof CssIdent)) {
+		values.add(val);
+	    }
+	    else {
+		throw new InvalidParamException("value", 
+			expression.getValue(), 
+			getPropertyName(), ac);
+	    }
+	    expression.next();		
+	    counter++;
+	    
+	    val = expression.getValue();
+	    op = expression.getOperator();
+	}/*
 	while ((op == CssOperator.SPACE)
 	       && (counter < expression.getCount())) {
 	    if (val instanceof CssIdent) {
@@ -89,10 +124,15 @@
 	    counter++;
 	    val = expression.getValue();
 	    op = expression.getOperator();
-	}
+	}*/
 
     }
     
+    public CssCounterIncrement(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssZIndex.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssZIndex.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssZIndex.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssZIndex.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -9,13 +9,12 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssLength;
-import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssNumber;
+import org.w3c.css.values.CssValue;
 
 /**
  */
@@ -36,9 +35,16 @@
      * Create a new CssZIndex
      *
      * @param expression The expression for this property
+     * @param check true will test the number of parameters
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssZIndex(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssZIndex(ApplContext ac, CssExpression expression, boolean check)
+    	throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	
 	setByUser();
@@ -66,6 +72,17 @@
     }
     
     /**
+     * Create a new CssZIndex
+     *
+     * @param expression The expression for this property
+     * @exception InvalidParamException The expression is incorrect
+     */  
+    public CssZIndex(ApplContext ac, CssExpression expression)
+    	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
+    /**
      * Returns the value of this property
      */
     public Object get() {

Index: CssDirectionATSC.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssDirectionATSC.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssDirectionATSC.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssDirectionATSC.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -9,13 +9,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssLength;
-import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  */
@@ -39,7 +37,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssDirectionATSC(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssDirectionATSC(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	
 	ac.getFrame().addWarning("atsc", val.toString());
@@ -61,6 +65,11 @@
 	
     }
     
+    public CssDirectionATSC(ApplContext ac, CssExpression expression)
+    	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssBorderLeftWidthCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderLeftWidthCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderLeftWidthCSS2.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderLeftWidthCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -22,10 +32,10 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
 import org.w3c.css.values.CssValue;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  *   <H4>
@@ -59,102 +69,117 @@
  * @version $Revision$
  */
 public class CssBorderLeftWidthCSS2 extends CssProperty {
-
-  CssBorderFaceWidthCSS2 face;
-  
-  /**
-   * Create a new CssBorderLeftWidthCSS2
-   */
-  public CssBorderLeftWidthCSS2() {
-    face = new CssBorderFaceWidthCSS2();
-  }
-  
-  /**
-   * Create a new CssBorderLeftWidthCSS2 with an another CssBorderFaceWidthCSS2
-   *
-   * @param another The another side.
-   */
-  public CssBorderLeftWidthCSS2(CssBorderFaceWidthCSS2 another) {
+    
+    CssBorderFaceWidthCSS2 face;
+    
+    /**
+     * Create a new CssBorderLeftWidthCSS2
+     */
+    public CssBorderLeftWidthCSS2() {
+	face = new CssBorderFaceWidthCSS2();
+    }
+    
+    /**
+     * Create a new CssBorderLeftWidthCSS2 with an another CssBorderFaceWidthCSS2
+     *
+     * @param another The another side.
+     */
+    public CssBorderLeftWidthCSS2(CssBorderFaceWidthCSS2 another) {
 	setByUser();
-
-    face = another;
-  }
-  
-  /**
-   * Create a new CssBorderLeftWidthCSS2
-   *
-   * @param expression The expression for this property.
-   * @exception InvalidParamException Values are incorrect
-   */
-  public CssBorderLeftWidthCSS2(ApplContext ac, CssExpression expression)
-    throws InvalidParamException {
+	
+	face = another;
+    }
     
+    /**
+     * Create a new CssBorderLeftWidthCSS2
+     *
+     * @param expression The expression for this property.
+     * @exception InvalidParamException Values are incorrect
+     */
+    public CssBorderLeftWidthCSS2(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
-    face = new CssBorderFaceWidthCSS2(ac, expression);
-  }
-  
-  /**
-   * Returns the value of this property
-   */
-  public Object get() {
-    return face;
-  }
-
-  /**
-   * Return the value of this property
-   */
-  public CssValue getValue() {
-    return face.getValue();
-  }
-
-  /**
-   * Returns a string representation of the object.
-   */
-  public String toString() {
-    return face.toString();
-  }
-
-  /**
-   * Returns the name of this property
-   */  
-  public String getPropertyName() {
-    return "border-left-width";
-  }
-
-  /**
-   * Add this property to the CssStyle.
-   *
-   * @param style The CssStyle
-   */
-  public void addToStyle(ApplContext ac, CssStyle style) {
-    CssBorderLeftCSS2 left = ((Css1Style) style).cssBorderCSS2.left;
-    if (left.width != null)
-      style.addRedefinitionWarning(ac, this);
-    left.width = this;
-  }
-
-  /**
-   * Get this property in the style.
-   *
-   * @param style The style where the property is
-   * @param resolve if true, resolve the style to find this property
-   */  
-  public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
-    if (resolve) {
-      return ((Css1Style) style).getBorderLeftWidthCSS2();
-    } else {
-      return ((Css1Style) style).cssBorderCSS2.getLeft().width;
+	face = new CssBorderFaceWidthCSS2(ac, expression);
     }
-  }
-
-  /**
-   * Compares two properties for equality.
-   *
-   * @param value The other property.
-   */  
-  public boolean equals(CssProperty property) {
-    return (property instanceof CssBorderLeftWidthCSS2 && 
-	    face.equals(((CssBorderLeftWidthCSS2) property).face));
-  }
-
+    
+    public CssBorderLeftWidthCSS2(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression,false);
+    }
+    
+    /**
+     * Returns the value of this property
+     */
+    public Object get() {
+	return face;
+    }
+    
+    /**
+     * Return the value of this property
+     */
+    public CssValue getValue() {
+	if(face != null) {
+	    return face.getValue();
+	}
+	return null;
+    }
+    
+    /**
+     * Returns a string representation of the object.
+     */
+    public String toString() {
+	if(face != null) {
+	    return face.toString();
+	}
+	return "";
+    }
+    
+    /**
+     * Returns the name of this property
+     */  
+    public String getPropertyName() {
+	return "border-left-width";
+    }
+    
+    /**
+     * Add this property to the CssStyle.
+     *
+     * @param style The CssStyle
+     */
+    public void addToStyle(ApplContext ac, CssStyle style) {
+	CssBorderLeftCSS2 left = ((Css1Style) style).cssBorderCSS2.left;
+	if (left.width != null)
+	    style.addRedefinitionWarning(ac, this);
+	left.width = this;
+    }
+    
+    /**
+     * Get this property in the style.
+     *
+     * @param style The style where the property is
+     * @param resolve if true, resolve the style to find this property
+     */  
+    public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
+	if (resolve) {
+	    return ((Css1Style) style).getBorderLeftWidthCSS2();
+	} else {
+	    return ((Css1Style) style).cssBorderCSS2.getLeft().width;
+	}
+    }
+    
+    /**
+     * Compares two properties for equality.
+     *
+     * @param value The other property.
+     */  
+    public boolean equals(CssProperty property) {
+	return (property instanceof CssBorderLeftWidthCSS2 && 
+		face.equals(((CssBorderLeftWidthCSS2) property).face));
+    }
+    
 }

Index: CssContentCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssContentCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssContentCSS2.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssContentCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -11,15 +11,15 @@
 import java.util.Vector;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssURL;
-import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssFunction;
+import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssOperator;
 import org.w3c.css.values.CssString;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssURL;
+import org.w3c.css.values.CssValue;
 
 /**
  */
@@ -45,13 +45,18 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssContentCSS2(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssContentCSS2(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
 	CssValue val = expression.getValue();
 	int counter = 0;
 	char op = expression.getOperator();
 	
 	setByUser();
 	if (val.equals(inherit)) {
+	    if(expression.getCount() > 1) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    values.addElement(inherit);
 	    expression.next();
 	    return;
@@ -165,6 +170,11 @@
 
     }
     
+    public CssContentCSS2(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssBorderColorCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderColorCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderColorCSS1.java	8 Apr 2002 21:17:42 -0000	1.2
+++ CssBorderColorCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:42  plehegar
  * New
  *
@@ -22,15 +32,13 @@
 
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssPrinterStyle;
 import org.w3c.css.parser.CssSelectors;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssOperator;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  *   <H4>
@@ -68,8 +76,6 @@
     CssBorderRightColorCSS1 right;
     CssBorderLeftColorCSS1 left;
 
-    private static CssIdent transparent = new CssIdent("transparent");
-    
     /**
      * Create a new CssBorderColorCSS1 with all four sides
      */
@@ -89,25 +95,14 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssBorderColorCSS1(ApplContext ac, CssExpression expression)
-	throws InvalidParamException {
+    public CssBorderColorCSS1(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
 	
 	setByUser();
 	
 	switch (expression.getCount()) {
 	case 1:
-	    CssValue val = expression.getValue();
-	    if (val.equals(transparent)) {
-		top = new CssBorderTopColorCSS1();
-		top.face.face = transparent;
-		expression.next();
-	    } else if (val.equals(inherit)) {
-		top = new CssBorderTopColorCSS1();
-		top.face.face = inherit;
-		expression.next();
-	    } else {
-		top = new CssBorderTopColorCSS1(ac, expression);
-	    }
+	    top = new CssBorderTopColorCSS1(ac, expression);
 	    bottom = new CssBorderBottomColorCSS1((CssBorderFaceColorCSS1) top.get());
 	    right = new CssBorderRightColorCSS1((CssBorderFaceColorCSS1) top.get());
 	    left = new CssBorderLeftColorCSS1((CssBorderFaceColorCSS1) top.get());
@@ -115,9 +110,15 @@
 	case 2:
 	    if (expression.getOperator() != SPACE)
 		throw new InvalidParamException("operator", 
-						((new Character(expression.getOperator())).toString()),
-						ac);
+			((new Character(expression.getOperator())).toString()),
+			ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    top = new CssBorderTopColorCSS1(ac, expression);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    right = new CssBorderRightColorCSS1(ac, expression);
 	    bottom = new CssBorderBottomColorCSS1((CssBorderFaceColorCSS1) top.get());
 	    left = new CssBorderLeftColorCSS1((CssBorderFaceColorCSS1) right.get());
@@ -125,37 +126,68 @@
 	case 3:
 	    if (expression.getOperator() != SPACE)
 		throw new InvalidParamException("operator", 
-						((new Character(expression.getOperator())).toString()), 
-						ac);
+			((new Character(expression.getOperator())).toString()), 
+			ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    top = new CssBorderTopColorCSS1(ac, expression);
 	    if (expression.getOperator() != SPACE)
 		throw new InvalidParamException("operator", 
-						((new Character(expression.getOperator())).toString()), ac);
+			((new Character(expression.getOperator())).toString()), ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    right = new CssBorderRightColorCSS1(ac, expression);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    bottom = new CssBorderBottomColorCSS1(ac, expression);
 	    left = new CssBorderLeftColorCSS1((CssBorderFaceColorCSS1) right.get());
 	    break;
-	default:
+	case 4:
 	    if (expression.getOperator() != SPACE)
 		throw new InvalidParamException("operator", 
-						((new Character(expression.getOperator())).toString()),
-						ac);
+			((new Character(expression.getOperator())).toString()),
+			ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    top = new CssBorderTopColorCSS1(ac, expression);
 	    if (expression.getOperator() != SPACE)
 		throw new InvalidParamException("operator", 
-						((new Character(expression.getOperator())).toString()),
-						ac);
+			((new Character(expression.getOperator())).toString()),
+			ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    right = new CssBorderRightColorCSS1(ac, expression);
 	    if (expression.getOperator() != SPACE)
 		throw new InvalidParamException("operator", 
-						((new Character(expression.getOperator())).toString()),
-						ac);
+			((new Character(expression.getOperator())).toString()),
+			ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    bottom = new CssBorderBottomColorCSS1(ac, expression);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    left = new CssBorderLeftColorCSS1(ac, expression);
 	    break;
+	default:
+	    if(check) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    break;
 	}
     }
     
+    public CssBorderColorCSS1(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */
@@ -174,6 +206,21 @@
      * Returns a string representation of the object.
      */
     public String toString() {
+	String ret = "";
+	if(top != null) {
+	    ret += top + " ";
+	}
+	if(right != null) {
+	    ret += right + " ";
+	}
+	if(bottom != null) {
+	    ret += bottom + " ";
+	}
+	if(left != null) {
+	    ret += left;
+	}
+	return ret.trim();
+	/*
 	if (right.face.equals(left.face)) {
 	    if (top.face.equals(bottom.face)) {
 		if (top.face.equals(right.face)) {
@@ -187,6 +234,7 @@
 	} else {
 	    return top + " " + right + " " + bottom + " " + left;
 	}
+	*/
     }
     
     /**
@@ -194,10 +242,18 @@
      * Overrides this method for a macro
      */  
     public void setImportant() {
-	top.important = true;
-	right.important = true;
-	left.important = true;
-	bottom.important = true;
+	if(top != null) {
+	    top.important = true;
+	}
+	if(right != null) {
+	    right.important = true;
+	}
+	if(left != null) {
+	    left.important = true;
+	}
+	if(bottom != null) {
+	    bottom.important = true;
+	}
     }
     
     /**
@@ -271,10 +327,18 @@
      * @param style The CssStyle
      */
     public void addToStyle(ApplContext ac, CssStyle style) {
-	top.addToStyle(ac, style);
-	right.addToStyle(ac, style);
-	left.addToStyle(ac, style);
-	bottom.addToStyle(ac, style);
+	if(top != null) {
+	    top.addToStyle(ac, style);
+	}
+	if(right != null) {
+	    right.addToStyle(ac, style);
+	}
+	if(left != null) {
+	    left.addToStyle(ac, style);
+	}
+	if(bottom != null) {
+	    bottom.addToStyle(ac, style);
+	}
     }
     
     /**
@@ -297,10 +361,18 @@
      */  
     public void setInfo(int line, String source) {
 	super.setInfo(line, source);
-	top.setInfo(line, source);
-	right.setInfo(line, source);
-	left.setInfo(line, source);
-	bottom.setInfo(line, source);
+	if(top != null) {
+	    top.setInfo(line, source);
+	}
+	if(right != null) {
+	    right.setInfo(line, source);
+	}
+	if(left != null) {
+	    left.setInfo(line, source);
+	}
+	if(bottom != null) {
+	    bottom.setInfo(line, source);
+	}
     }
     
     /**
@@ -309,7 +381,7 @@
      * @param value The other property.
      */  
     public boolean equals(CssProperty property) {
-	return false;
+	return false; // FIXME
     }
     
 }

Index: CssBorderLeftStyleCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderLeftStyleCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderLeftStyleCSS1.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderLeftStyleCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -22,111 +32,125 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
-import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
+import org.w3c.css.values.CssExpression;
 
 /**
  * Be careful, this is not a CSS1 property !
  * @version $Revision$
  */
 public class CssBorderLeftStyleCSS1 extends CssProperty {
-
-  CssBorderFaceStyleCSS1 face;
-  
-  /**
-   * Create a new CssBorderLeftStyleCSS1
-   */
-  public CssBorderLeftStyleCSS1() {
-    face = new CssBorderFaceStyleCSS1();
-  }
-  
-  /**
-   * Create a new CssBorderLeftStyleCSS1 with an another CssBorderFaceStyleCSS1
-   *
-   * @param another The another side.
-   */
-  public CssBorderLeftStyleCSS1(CssBorderFaceStyleCSS1 another) {
+    
+    CssBorderFaceStyleCSS1 face;
+    
+    /**
+     * Create a new CssBorderLeftStyleCSS1
+     */
+    public CssBorderLeftStyleCSS1() {
+	face = new CssBorderFaceStyleCSS1();
+    }
+    
+    /**
+     * Create a new CssBorderLeftStyleCSS1 with an another CssBorderFaceStyleCSS1
+     *
+     * @param another The another side.
+     */
+    public CssBorderLeftStyleCSS1(CssBorderFaceStyleCSS1 another) {
 	setByUser();
-
-    face = another;
-  }
-  
-  /**
-   * Create a new CssBorderLeftStyleCSS1
-   *
-   * @param expression The expression for this property.
-   * @exception InvalidParamException Values are incorrect
-   */
-  public CssBorderLeftStyleCSS1(ApplContext ac, CssExpression expression) 
-    throws InvalidParamException {
-
+	
+	face = another;
+    }
+    
+    /**
+     * Create a new CssBorderLeftStyleCSS1
+     *
+     * @param expression The expression for this property.
+     * @exception InvalidParamException Values are incorrect
+     */
+    public CssBorderLeftStyleCSS1(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
-    face = new CssBorderFaceStyleCSS1(ac, expression);
-  }
-  
-  /**
-   * Returns the value of this property
-   */
-  public Object get() {
-    return face;
-  }
-
-  /**
-   * Returns the value
-   */
-  public String getStyle() {
-    return face.getStyle();
-  }
-
-  /**
-   * Returns a string representation of the object.
-   */
-  public String toString() {
-    return face.toString();
-  }
-
-  /**
-   * Returns the name of this property
-   */  
-  public String getPropertyName() {
-    return "border-left-style";
-  }
-
-  /**
-   * Add this property to the CssStyle.
-   *
-   * @param style The CssStyle
-   */
-  public void addToStyle(ApplContext ac, CssStyle style) {
-    CssBorderLeftCSS1 left = ((Css1Style) style).cssBorderCSS1.left;
-    if (left.style != null)
-      style.addRedefinitionWarning(ac, this);
-    left.style = this;
-  }
-
-  /**
-   * Get this property in the style.
-   *
-   * @param style The style where the property is
-   * @param resolve if true, resolve the style to find this property
-   */  
-  public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
-    if (resolve) {
-      return ((Css1Style) style).getBorderLeftStyleCSS1();
-    } else {
-      return ((Css1Style) style).cssBorderCSS1.getLeft().style;
+	face = new CssBorderFaceStyleCSS1(ac, expression);
     }
-  }
-
-  /**
-   * Compares two properties for equality.
-   *
-   * @param value The other property.
-   */  
-  public boolean equals(CssProperty property) {
-    return (property instanceof CssBorderLeftStyleCSS1 && face.equals(((CssBorderLeftStyleCSS1) property).face));
-  }
-
+    
+    public CssBorderLeftStyleCSS1(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression,false);
+    }
+    
+    /**
+     * Returns the value of this property
+     */
+    public Object get() {
+	return face;
+    }
+    
+    /**
+     * Returns the value
+     */
+    public String getStyle() {
+	if(face != null) {
+	    return face.getStyle();
+	}
+	return null;
+    }
+    
+    /**
+     * Returns a string representation of the object.
+     */
+    public String toString() {
+	if(face != null) {
+	    return face.toString();
+	}
+	return "";
+    }
+    
+    /**
+     * Returns the name of this property
+     */  
+    public String getPropertyName() {
+	return "border-left-style";
+    }
+    
+    /**
+     * Add this property to the CssStyle.
+     *
+     * @param style The CssStyle
+     */
+    public void addToStyle(ApplContext ac, CssStyle style) {
+	CssBorderLeftCSS1 left = ((Css1Style) style).cssBorderCSS1.left;
+	if (left.style != null)
+	    style.addRedefinitionWarning(ac, this);
+	left.style = this;
+    }
+    
+    /**
+     * Get this property in the style.
+     *
+     * @param style The style where the property is
+     * @param resolve if true, resolve the style to find this property
+     */  
+    public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
+	if (resolve) {
+	    return ((Css1Style) style).getBorderLeftStyleCSS1();
+	} else {
+	    return ((Css1Style) style).cssBorderCSS1.getLeft().style;
+	}
+    }
+    
+    /**
+     * Compares two properties for equality.
+     *
+     * @param value The other property.
+     */  
+    public boolean equals(CssProperty property) {
+	return (property instanceof CssBorderLeftStyleCSS1 && face.equals(((CssBorderLeftStyleCSS1) property).face));
+    }
+    
 }

Index: CssBorderBottomCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderBottomCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderBottomCSS2.java	8 Apr 2002 21:17:42 -0000	1.2
+++ CssBorderBottomCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:42  plehegar
  * New
  *
@@ -30,15 +40,15 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssPrinterStyle;
 import org.w3c.css.parser.CssSelectors;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssLength;
 import org.w3c.css.values.CssOperator;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -89,59 +99,77 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssBorderBottomCSS2(ApplContext ac, CssExpression expression) 
-        throws InvalidParamException {
-	
+    public CssBorderBottomCSS2(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+
 	CssValue val = null;
 	char op = SPACE;
 	boolean find = true;
 	
+	if(expression.getCount() > 3) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
+	boolean manyValues = (expression.getCount() > 1);
+	
 	setByUser();
 	
 	while (find) {
 	    find = false;
-	    val = expression.getValue();
-	    op = expression.getOperator();
-	    
+	    val = expression.getValue();	    
+	    op = expression.getOperator();	    
 	    if (val == null)
 		break;
 	    
+	    // if there are many values, we can't have inherit as one of them
+	    if(manyValues && val.equals(inherit)) {
+		throw new InvalidParamException("unrecognize", null, null, ac);
+	    }
+	    
 	    if (op != SPACE)
 		throw new InvalidParamException("operator", 
 						((new Character(op)).toString()),
-						ac);
-	    
+						ac);   
 	    if (width == null) {
 		try {
-		    width = new CssBorderBottomWidthCSS2(ac, expression);
+		    width = new CssBorderBottomWidthCSS2(ac, expression);		
 		    find = true;
-		} catch (InvalidParamException e) {
+		} catch(InvalidParamException e){
+		    // nothing to do, style will test this value		    
 		}
 	    }
 	    if (!find && style == null) {
 		try {
-		    style = new CssBorderBottomStyleCSS2(ac, expression);
+		    style = new CssBorderBottomStyleCSS2(ac, expression);		    
 		    find = true;
-		}
-		catch (InvalidParamException e) {
+		} catch(InvalidParamException e){
+		    // nothing to do, color will test this value
 		}
 	    }
 	    if (!find && color == null) {
-		try {
-		    color = new CssBorderBottomColorCSS2(ac, expression);
-		    find = true;
-		}
-		catch (InvalidParamException e) {
-		}
+		// throws an exception if the value is not valid
+		color = new CssBorderBottomColorCSS2(ac, expression);
+		find = true;		
 	    }
 	}
 	
-	if (width == null)
+	//if some values have not been set, we set them with their default ones
+	/*
+	if (width == null) {
 	    width = new CssBorderBottomWidthCSS2();
-	if (style == null)
+	}
+	if (style == null) {
 	    style = new CssBorderBottomStyleCSS2();
-	if (color == null)
+	}
+	if (color == null) {
 	    color = new CssBorderBottomColorCSS2();
+	}
+	*/
+    }
+    
+    public CssBorderBottomCSS2(ApplContext ac, CssExpression expression)
+	    throws InvalidParamException {
+	this(ac, expression, false);
     }
     
     /**
@@ -188,9 +216,22 @@
      * Returns a string representation of the object.
      */
     public String toString() {
-	String ret = width + " " + style;
-	if (!color.face.isDefault())
-	    ret += " " + color;
+	String ret = "";
+	if(width != null) {
+	    ret += width;
+	}
+	if(style != null) {
+	    if(!ret.equals("")) {
+		ret += " ";
+	    }
+	    ret += style;
+	}
+	if(color != null) {
+	    if(!ret.equals("")) {
+		ret += " ";
+	    }
+	    ret += color;
+	}
 	return ret;
     }
     
@@ -206,9 +247,15 @@
      * Overrides this method for a macro
      */  
     public void setImportant() {
-	width.important = true;
-	style.important = true;
-	color.important = true;
+	if(width != null) {
+	    width.important = true;
+	}
+	if(style != null) {
+	    style.important = true;
+	}
+	if(color != null) {
+	    color.important = true;
+	}
     }
     
     /**
@@ -248,37 +295,23 @@
     }
     
     /**
-     * Set the context.
-     * Overrides this method for a macro
+     * Add this property to the CssStyle
      *
-     * @see org.w3c.css.css.CssCascadingOrder#order
-     * @see org.w3c.css.css.StyleSheetParser#handleRule
+     * @param style The CssStyle
      */
-    public void setSelectors(CssSelectors selector) {
-	super.setSelectors(selector);
-	if (width != null) {
-	    width.setSelectors(selector);
+    public void addToStyle(ApplContext ac, CssStyle style) {	
+	if(width != null) {
+	    width.addToStyle(ac, style);
 	}
-	if (style != null) {
-	    style.setSelectors(selector);
+	if(this.style != null) {
+	    this.style.addToStyle(ac, style);
 	}
-	if (color != null) {
-	    color.setSelectors(selector);
+	if(color != null) {
+	    color.addToStyle(ac, style);
 	}
     }
     
     /**
-     * Add this property to the CssStyle
-     *
-     * @param style The CssStyle
-     */
-    public void addToStyle(ApplContext ac, CssStyle style) {
-	width.addToStyle(ac, style);
-	this.style.addToStyle(ac, style);
-	color.addToStyle(ac, style);
-    }
-    
-    /**
      * Get this property in the style.
      *
      * @param style The style where the property is
@@ -300,10 +333,36 @@
      * @param source The source file where this property is defined
      */  
     public void setInfo(int line, String source) {
-	super.setInfo(line, source);
-	width.setInfo(line, source);
-	style.setInfo(line, source);
-	color.setInfo(line, source);
+	super.setInfo(line, source);	
+	if(width != null) {
+	    width.setInfo(line, source);
+	}
+	if(style != null) {
+	    style.setInfo(line, source);
+	}
+	if(color != null) {
+	    color.setInfo(line, source);
+	}
+    }
+    
+    /**
+     * Set the context.
+     * Overrides this method for a macro
+     *
+     * @see org.w3c.css.css.CssCascadingOrder#order
+     * @see org.w3c.css.css.StyleSheetParser#handleRule
+     */
+    public void setSelectors(CssSelectors selector) {
+	super.setSelectors(selector);
+	if (width != null) {
+	    width.setSelectors(selector);
+	}
+	if (style != null) {
+	    style.setSelectors(selector);
+	}
+	if (color != null) {
+	    color.setSelectors(selector);
+	}
     }
     
     /**
@@ -311,11 +370,12 @@
      *
      * @param value The other property.
      */  
-    public boolean equals(CssProperty property) {
+    public boolean equals(CssProperty property) {	
 	if (property instanceof CssBorderBottomCSS2) {
 	    CssBorderBottomCSS2 bottom = (CssBorderBottomCSS2) property;
-	    return (width.equals(bottom.width) && style.equals(bottom.style) 
-		    && color.equals(bottom.color));
+	    return (width != null && width.equals(bottom.width) 
+		    && style != null && style.equals(bottom.style)  
+		    && color != null && color.equals(bottom.color));
 	} else {
 	    return false;
 	}

Index: CssBorderWidthCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderWidthCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderWidthCSS1.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderWidthCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -33,14 +43,13 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssPrinterStyle;
 import org.w3c.css.parser.CssSelectors;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssOperator;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  *   <H4>
@@ -109,7 +118,8 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssBorderWidthCSS1(ApplContext ac, CssExpression expression)  throws InvalidParamException {
+    public CssBorderWidthCSS1(ApplContext ac, CssExpression expression,
+	    boolean check)  throws InvalidParamException {
 
 	setByUser();
 	switch (expression.getCount()) {
@@ -124,7 +134,13 @@
 		throw new InvalidParamException("operator", 
 						((new Character(expression.getOperator())).toString()),
 						ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    top = new CssBorderTopWidthCSS1(ac, expression);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    right = new CssBorderRightWidthCSS1(ac, expression);
 	    bottom = new CssBorderBottomWidthCSS1((CssBorderFaceWidthCSS1) top.get());
 	    left = new CssBorderLeftWidthCSS1((CssBorderFaceWidthCSS1) right.get());
@@ -134,36 +150,66 @@
 		throw new InvalidParamException("operator", 
 						((new Character(expression.getOperator())).toString()),
 						ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    top = new CssBorderTopWidthCSS1(ac, expression);
 	    if (expression.getOperator() != SPACE)
 		throw new InvalidParamException("operator", 
 						((new Character(expression.getOperator())).toString()),
 						ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    right = new CssBorderRightWidthCSS1(ac, expression);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    bottom = new CssBorderBottomWidthCSS1(ac, expression);
 	    left = new CssBorderLeftWidthCSS1((CssBorderFaceWidthCSS1) right.get());
 	    break;
-	default:
+	case 4:
 	    if (expression.getOperator() != SPACE)
 		throw new InvalidParamException("operator", 
 						((new Character(expression.getOperator())).toString()),
 						ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    top = new CssBorderTopWidthCSS1(ac, expression);
 	    if (expression.getOperator() != SPACE)
 		throw new InvalidParamException("operator", 
 						((new Character(expression.getOperator())).toString()),
 						ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    right = new CssBorderRightWidthCSS1(ac, expression);
 	    if (expression.getOperator() != SPACE)
 		throw new InvalidParamException("operator", 
 						((new Character(expression.getOperator())).toString()),
 						ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    bottom = new CssBorderBottomWidthCSS1(ac, expression);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    left = new CssBorderLeftWidthCSS1(ac, expression);
 	    break;
+	default:
+	    if(check) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	}
     }
     
+    CssBorderWidthCSS1(ApplContext ac, CssExpression expression) 
+    	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */
@@ -202,10 +248,18 @@
      * Overrides this method for a macro
      */  
     public void setImportant() {
-	top.important = true;
-	right.important = true;
-	left.important = true;
-	bottom.important = true;
+	if(top != null) {
+	    top.important = true;
+	}
+	if(right != null) {
+	    right.important = true;
+	}
+	if(left != null) {
+	    left.important = true;
+	}
+	if(bottom != null) {
+	    bottom.important = true;
+	}
     }
     
     /**
@@ -277,10 +331,18 @@
      * @param style The CssStyle
      */
     public void addToStyle(ApplContext ac, CssStyle style) {
-	top.addToStyle(ac, style);
-	right.addToStyle(ac, style);
-	left.addToStyle(ac, style);
-	bottom.addToStyle(ac, style);
+	if(top != null) {
+	    top.addToStyle(ac, style);
+	}
+	if(right != null) {
+	    right.addToStyle(ac, style);
+	}
+	if(left != null) {
+	    left.addToStyle(ac, style);
+	}
+	if(bottom != null) {
+	    bottom.addToStyle(ac, style);
+	}
     }
     
     /**
@@ -303,10 +365,18 @@
      */  
     public void setInfo(int line, String source) {
 	super.setInfo(line, source);
-	top.setInfo(line, source);
-	right.setInfo(line, source);
-	left.setInfo(line, source);
-	bottom.setInfo(line, source);
+	if(top != null) {
+	    top.setInfo(line, source);
+	}
+	if(right != null) {
+	    right.setInfo(line, source);
+	}
+	if(left != null) {
+	    left.setInfo(line, source);
+	}
+	if(bottom != null) {
+	    bottom.setInfo(line, source);
+	}
     }
     
     /**
@@ -315,7 +385,7 @@
      * @param value The other property.
      */  
     public boolean equals(CssProperty property) {
-	return false;
+	return false; // FIXME
     }
     
 }

Index: CssWidth.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssWidth.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssWidth.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssWidth.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -34,14 +44,14 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssNumber;
+import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssLength;
+import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssPercentage;
-import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -89,7 +99,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssWidth(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssWidth(ApplContext ac, CssExpression expression, boolean check)
+    	throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	
 	setByUser();
@@ -108,13 +124,18 @@
 	} else if (val instanceof CssNumber) {
 	    value = ((CssNumber) val).getLength();
 	} else {
-	    throw new InvalidParamException("value", expression.getValue(), 
+	    throw new InvalidParamException("value", val, 
 					    getPropertyName(), ac);
 	}
 	
 	expression.next();
     }
     
+    public CssWidth(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property.
      */

Index: CssBorderTopCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderTopCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderTopCSS2.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderTopCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -33,15 +43,15 @@
  */
 package org.w3c.css.properties;
 
+import org.w3c.css.parser.CssPrinterStyle;
 import org.w3c.css.parser.CssSelectors;
 import org.w3c.css.parser.CssStyle;
-import org.w3c.css.parser.CssPrinterStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssLength;
 import org.w3c.css.values.CssOperator;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -93,61 +103,76 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssBorderTopCSS2(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssBorderTopCSS2(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+		
 	CssValue val = null;
 	char op = SPACE;
 	boolean find = true;
 	
+	if(check && expression.getCount() > 3) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
+	boolean manyValues = (expression.getCount() > 1);
+	
 	setByUser();
 	
 	while (find) {
 	    find = false;
-	    val = expression.getValue();
-	    op = expression.getOperator();
-	    
+	    val = expression.getValue();	    
+	    op = expression.getOperator();	    
 	    if (val == null)
 		break;
 	    
+	    // if there are many values, we can't have inherit as one of them
+	    if(manyValues && val.equals(inherit)) {
+		throw new InvalidParamException("unrecognize", null, null, ac);
+	    }
+	    
 	    if (op != SPACE)
 		throw new InvalidParamException("operator", 
 						((new Character(op)).toString()),
-						ac);
-	    
+						ac);   
 	    if (width == null) {
 		try {
-		    width = new CssBorderTopWidthCSS2(ac, expression);
+		    width = new CssBorderTopWidthCSS2(ac, expression);		
 		    find = true;
-		} catch (InvalidParamException e) {
+		} catch(InvalidParamException e){
+		    //nothing to do, style will test this value
 		}
 	    }
 	    if (!find && style == null) {
 		try {
-		    style = new CssBorderTopStyleCSS2(ac, expression);
+		    style = new CssBorderTopStyleCSS2(ac, expression);		    
 		    find = true;
-		}
-		catch (InvalidParamException e) {
+		} catch(InvalidParamException e){
+		    //nothing to do, color will test this value
 		}
 	    }
 	    if (!find && color == null) {
-		try {
-		    color = new CssBorderTopColorCSS2(ac, expression);
-		    find = true;
-		}
-		catch (InvalidParamException e) {
-		}
+		// throws an exception if the value is not valid
+		color = new CssBorderTopColorCSS2(ac, expression);
+		find = true;		
 	    }
 	}
 	
+	//if some values have not been set, we set them with their default ones
+	/*
 	if (width == null) {
 	    width = new CssBorderTopWidthCSS2();
 	}
 	if (style == null) {
-	    style = new CssBorderTopStyleCSS2();
+	    style = new CssBorderTopStyleCSS2();	    
 	}
-	
 	if (color == null) {
-	    color = new CssBorderTopColorCSS2();
-	}
+	    color = new CssBorderTopColorCSS2();	    
+	}*/	
+    }
+    
+    public CssBorderTopCSS2(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression,false);
     }
     
     /**
@@ -194,11 +219,24 @@
      * Returns a string representation of the object.
      */
     public String toString() {
-	String ret = width + " " + style;
-	if (!color.face.isDefault())
-	    ret += " " + color;
+	String ret = "";	
+	if(width != null) {
+	    ret += width;
+	}
+	if(style != null) {
+	    if(!ret.equals("")) {
+		ret += " ";
+	    }
+	    ret += style;
+	}
+	if(color != null) {
+	    if(!ret.equals("")) {
+		ret += " ";
+	    }
+	    ret += color;
+	}	
 	return ret;
-    }
+    }	
     
     /**
      * Returns the name of this property
@@ -212,9 +250,15 @@
      * Overrides this method for a macro
      */  
     public void setImportant() {
-	width.important = true;
-	style.important = true;
-	color.important = true;
+	if(width != null) {
+	    width.important = true;
+	}
+	if(style != null) {
+	    style.important = true;
+	}
+	if(color != null) {
+	    color.important = true;
+	}
     }
     
     /**
@@ -258,11 +302,16 @@
      *
      * @param style The CssStyle
      */
-    public void addToStyle(ApplContext ac, CssStyle style) {
-	width.addToStyle(ac, style);
-	this.style.addToStyle(ac, style);
-	color.addToStyle(ac, style);
-
+    public void addToStyle(ApplContext ac, CssStyle style) {	
+	if(width != null) {
+	    width.addToStyle(ac, style);
+	}
+	if(this.style != null) {
+	    this.style.addToStyle(ac, style);
+	}
+	if(color != null) {
+	    color.addToStyle(ac, style);
+	}
     }
     
     /**
@@ -287,10 +336,16 @@
      * @param source The source file where this property is defined
      */  
     public void setInfo(int line, String source) {
-	super.setInfo(line, source);
-	width.setInfo(line, source);
-	style.setInfo(line, source);
-	color.setInfo(line, source);
+	super.setInfo(line, source);	
+	if(width != null) {
+	    width.setInfo(line, source);
+	}
+	if(style != null) {
+	    style.setInfo(line, source);
+	}
+	if(color != null) {
+	    color.setInfo(line, source);
+	}
     }
     
     /**
@@ -318,11 +373,12 @@
      *
      * @param value The other property.
      */  
-    public boolean equals(CssProperty property) {
+    public boolean equals(CssProperty property) {	
 	if (property instanceof CssBorderTopCSS2) {
 	    CssBorderTopCSS2 top = (CssBorderTopCSS2) property;
-	    return (width.equals(top.width) 
-		    && style.equals(top.style) && color.equals(top.color));
+	    return (width != null && width.equals(top.width) 
+		    && style != null && style.equals(top.style)  
+		    && color != null && color.equals(top.color));
 	} else {
 	    return false;
 	}

Index: CssListStyle.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssListStyle.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssListStyle.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssListStyle.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -33,14 +43,14 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssPrinterStyle;
 import org.w3c.css.parser.CssSelectors;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssOperator;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -120,7 +130,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssListStyle(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssListStyle(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 3) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	char op = SPACE;
 	boolean find = true;
@@ -128,6 +144,9 @@
 	setByUser();
 
 	if (val.equals(inherit)) {
+	    if(expression.getCount() > 1) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    inheritedValue = true;
 	    expression.next();
 	    return;
@@ -138,6 +157,10 @@
 	    val = expression.getValue();
 	    op = expression.getOperator();
 	    
+	    if(val != null && val.equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    
 	    if ((listStyleType == null)
 		&& (val != null)) {
 		try {
@@ -158,11 +181,11 @@
 	    if (!find 
 		&& (val != null)
 		&& (listStylePosition == null)) {
-		try {
-		    listStylePosition = new CssListStylePosition(ac, expression);
-		    find = true;
-		} catch (InvalidParamException e) {
-		}
+		listStylePosition = new CssListStylePosition(ac, expression);
+		find = true;
+	    }
+	    if(val != null && !find) {
+		throw new InvalidParamException("unrecognize", ac);
 	    }
 	    if (op != SPACE) {
 		throw new InvalidParamException("operator", 
@@ -170,7 +193,7 @@
 						ac);
 	    }
 	}
-	
+	/*
 	if (listStyleType == null) {
 	    listStyleType = new CssListStyleType();
 	}
@@ -181,7 +204,12 @@
 	
 	if (listStylePosition == null) {
 	    listStylePosition = new CssListStylePosition();
-	}
+	}*/
+    }
+    
+    public CssListStyle(ApplContext ac, CssExpression expression)
+    	throws InvalidParamException {
+	this(ac, expression, false);
     }
     
     /**
@@ -213,14 +241,17 @@
 	if (inheritedValue) {
 	    return inherit.toString();
 	} else {
-	    String ret = listStyleType.toString();
-	    if (!listStyleImage.isDefault()) {
+	    String ret = "";
+	    if(listStyleType != null) {
+		ret = listStyleType.toString();
+	    }
+	    if (listStyleImage != null &&!listStyleImage.isDefault()) {
 		ret += " " + listStyleImage;
 	    }
-	    if (!listStylePosition.isDefault()) {
+	    if (listStyleImage != null && !listStylePosition.isDefault()) {
 		ret += " " + listStylePosition;
 	    }
-	    return ret;
+	    return ret.trim();
 	}
     }
     
@@ -232,9 +263,12 @@
      */  
     public void setImportant() {
 	if (!inheritedValue) {
-	    listStyleType.important = true;
-	    listStyleImage.important = true;
-	    listStylePosition.important = true;
+	    if(listStyleType != null)
+		listStyleType.important = true;
+	    if(listStyleImage != null)
+		listStyleImage.important = true;
+	    if(listStylePosition != null)
+		listStylePosition.important = true;
 	}
     }
     
@@ -305,9 +339,12 @@
      */
     public void addToStyle(ApplContext ac, CssStyle style) {
 	if (!inheritedValue) {
-	    listStyleType.addToStyle(ac, style);
-	    listStyleImage.addToStyle(ac, style);
-	    listStylePosition.addToStyle(ac, style);
+	    if(listStyleType != null)
+		listStyleType.addToStyle(ac, style);
+	    if(listStyleImage != null)
+		listStyleImage.addToStyle(ac, style);
+	    if(listStylePosition != null)
+		listStylePosition.addToStyle(ac, style);
 	} else {
 	    ((Css1Style) style).cssListStyle.inheritedValue = true;
 	}
@@ -337,9 +374,12 @@
     public void setInfo(int line, String source) {
 	super.setInfo(line, source);
 	if (!inheritedValue) {
-	    listStyleType.setInfo(line, source);
-	    listStyleImage.setInfo(line, source);
-	    listStylePosition.setInfo(line, source);
+	    if(listStyleType != null)
+		listStyleType.setInfo(line, source);
+	    if(listStyleImage != null)
+		listStyleImage.setInfo(line, source);
+	    if(listStylePosition != null)
+		listStylePosition.setInfo(line, source);
 	}
     }
     

Index: CssFontSizeCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssFontSizeCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssFontSizeCSS1.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssFontSizeCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -53,14 +63,14 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.values.CssPercentage;
-import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssLength;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssNumber;
+import org.w3c.css.values.CssPercentage;
+import org.w3c.css.values.CssValue;
 
 
 /**
@@ -137,7 +147,13 @@
      * @param expression the expression of the size
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssFontSizeCSS1(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssFontSizeCSS1(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	setByUser();
 	if (val instanceof CssIdent) {
@@ -182,6 +198,11 @@
 					val, getPropertyName(), ac);
     }
     
+    public CssFontSizeCSS1(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the current value
      */  

Index: CssDisplayCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssDisplayCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssDisplayCSS1.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssDisplayCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -31,11 +41,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -102,7 +112,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorect
      */  
-    public CssDisplayCSS1(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssDisplayCSS1(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	
 	setByUser();
@@ -122,6 +138,11 @@
 					getPropertyName(), ac);
     }
     
+    public CssDisplayCSS1(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssCounterReset.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssCounterReset.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssCounterReset.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssCounterReset.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -11,16 +11,13 @@
 import java.util.Vector;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssNumber;
-import org.w3c.css.values.CssURL;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.values.CssFunction;
+import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssOperator;
-import org.w3c.css.values.CssString;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  */
@@ -43,23 +40,62 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssCounterReset(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssCounterReset(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
 	CssValue val = expression.getValue();
 	int counter = 0;
 	char op = expression.getOperator();
 	
 	setByUser();
 	if (val.equals(inherit)) {
+	    if(expression.getCount() > 1) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    values.addElement(inherit);
 	    expression.next();
 	    return;
 	} else if (val.equals(none)) {
+	    if(expression.getCount() > 1) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    values.addElement(none);
 	    expression.next();
 	    return;
 	}
-
-
+	
+	while(counter < expression.getCount()) {
+	    
+	    if(val.equals(inherit) || val.equals(none)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    
+	    // the operator must be a space
+	    if(op != CssOperator.SPACE) {
+		throw new InvalidParamException("operator",
+			new Character(op), ac);
+	    }
+	    // an ident
+	    if(val instanceof CssIdent) {
+		values.addElement(val);		
+	    }
+	    // a number associated to the previous ident
+	    else if(val instanceof CssNumber
+		    && ((CssNumber) val).isInteger()
+		    && (values.get(values.size() - 1) instanceof CssIdent)) {
+		values.add(val);
+	    }
+	    else {
+		throw new InvalidParamException("value", 
+			expression.getValue(), 
+			getPropertyName(), ac);
+	    }
+	    expression.next();		
+	    counter++;
+	    
+	    val = expression.getValue();
+	    op = expression.getOperator();
+	}
+	/*
 	while ((op == CssOperator.SPACE)
 	       && (counter < expression.getCount())) {
 	    if (val instanceof CssIdent) {
@@ -89,8 +125,12 @@
 	    counter++;
 	    val = expression.getValue();
 	    op = expression.getOperator();
-	}
-
+	}*/
+    }
+    
+    public CssCounterReset(ApplContext ac, CssExpression expression)
+    	throws InvalidParamException {
+	this(ac, expression, false);
     }
     
     /**

Index: CssListStyleConstants.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssListStyleConstants.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- CssListStyleConstants.java	24 Dec 2002 12:32:47 -0000	1.6
+++ CssListStyleConstants.java	8 Aug 2005 13:18:12 -0000	1.7
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.7  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.6  2002/12/24 12:32:47  sijtsche
  * new values added
  *
@@ -34,37 +44,42 @@
  * @version $Revision$
  */
 public interface CssListStyleConstants {
-
-  public static String[] LISTSTYLETYPE = {
+    
+    public static String[] LISTSTYLETYPE = {
 	"box", "check", "circle", "diamond", "disc", "hyphen", "square",
 	"armenian", "cjk-ideographic", "ethiopic-numeric", "georgian", "hebrew",
-    "japanese-formal", "japanese-informal", "lower-armenian", "lower-roman",
-    "simp-chinese-formal", "simp-chinese-informal", "syriac", "tamil", "trad-chinese-formal",
-    "trad-chinese-informal", "upper-armenian", "upper-roman",
-	"arabic-indic", "binary", "bengali", "cambodian", "decimal", "decimal-leading-zero",
-	"devanagari", "gujarati", "gurmukhi", "kannada", "khmer", "lao", "lower-hexadecimal",
-	"malayalam", "mongolian", "myanmar", "octal", "oriya", "persian", "telugu", "tibetan",
-	"thai", "upper-hexadecimal", "urdu",
-	"afar", "amharic", "amharic-abegede", "cjk-earthly-branch", "cjk-heavenly-stem", "ethiopic",
-	"ethiopic-abegede", "ethiopic-abegede-am-et", "ethiopic-abegede-gez", "ethiopic-abegede-ti-er",
-	"ethiopic-abegede-ti-et", "ethiopic-halehame-aa-er", "ethiopic-halehame-aa-et",
-	"ethiopic-halehame-am-et", "ethiopic-halehame-gez", "ethiopic-halehame-om-et", "ethiopic-halehame-sid-et",
-	"ethiopic-halehame-so-et", "ethiopic-halehame-ti-er", "ethiopic-halehame-ti-et", "ethiopic-halehame-tig",
-	"hangul", "hangul-consonant", "hiragana", "hiragana-iroha", "katakana", "katakana-iroha", "lower-alpha",
-	"lower-greek", "lower-norwegian", "lower-latin", "oromo", "sidama", "somali", "tigre", "tigrinya-er",
-	"tigrinya-er-abegede", "tigrinya-et", "tigrinya-et-abegede", "upper-alpha", "upper-greek",
-	"upper-norwegian", "upper-latin",
-	"asterisks", "footnotes",
-	"circled-decimal", "circled-lower-latin", "circled-upper-latin", "dotted-decimal", "double-circled-decimal",
-	"filled-circled-decimal", "parenthesised-decimal", "parenthesised-lower-latin",
-	"normal", "none"
-  };
+	"japanese-formal", "japanese-informal", "lower-armenian", "lower-roman",
+	"simp-chinese-formal", "simp-chinese-informal", "syriac", "tamil", 
+	"trad-chinese-formal", "trad-chinese-informal", "upper-armenian",
+	"upper-roman", "arabic-indic", "binary", "bengali", "cambodian", 
+	"decimal", "decimal-leading-zero", "devanagari", "gujarati", "gurmukhi",
+	"kannada", "khmer", "lao", "lower-hexadecimal", "malayalam",
+	"mongolian", "myanmar", "octal", "oriya", "persian", "telugu", 
+	"tibetan", "thai", "upper-hexadecimal", "urdu",	"afar", "amharic", 
+	"amharic-abegede", "cjk-earthly-branch", "cjk-heavenly-stem", "ethiopic",
+	"ethiopic-abegede", "ethiopic-abegede-am-et", "ethiopic-abegede-gez",
+	"ethiopic-abegede-ti-er", "ethiopic-abegede-ti-et", 
+	"ethiopic-halehame-aa-er", "ethiopic-halehame-aa-et", 
+	"ethiopic-halehame-am-et", "ethiopic-halehame-gez", 
+	"ethiopic-halehame-om-et", "ethiopic-halehame-sid-et",
+	"ethiopic-halehame-so-et", "ethiopic-halehame-ti-er", 
+	"ethiopic-halehame-ti-et", "ethiopic-halehame-tig", "hangul", 
+	"hangul-consonant", "hiragana", "hiragana-iroha", "katakana", 
+	"katakana-iroha", "lower-alpha", "lower-greek", "lower-norwegian", 
+	"lower-latin", "oromo", "sidama", "somali", "tigre", "tigrinya-er",
+	"tigrinya-er-abegede", "tigrinya-et", "tigrinya-et-abegede", 
+	"upper-alpha", "upper-greek", "upper-norwegian", "upper-latin", 
+	"asterisks", "footnotes", "circled-decimal", "circled-lower-latin", 
+	"circled-upper-latin", "dotted-decimal", "double-circled-decimal",
+	"filled-circled-decimal", "parenthesised-decimal", 
+	"parenthesised-lower-latin", "normal", "none", "inherit"
+    };
 
     public static String[] LISTSTYLETYPECSS1 = {
 	"disc", "circle", "square", "decimal",
 	"lower-roman", "upper-roman",
 	"lower-alpha", "upper-alpha",
-	"none", "inherit"
+	"none"
     };
 
     public static String[] LISTSTYLETYPETV = {

Index: CssMarginSide.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssMarginSide.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssMarginSide.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssMarginSide.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -36,14 +46,14 @@
  */
 package org.w3c.css.properties;
 
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
+import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssLength;
-import org.w3c.css.values.CssPercentage;
 import org.w3c.css.values.CssNumber;
-import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssPercentage;
+import org.w3c.css.values.CssValue;
 
 /**
  * @version $Revision$
@@ -74,7 +84,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssMarginSide(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssMarginSide(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	
 	setByUser();
@@ -97,6 +113,11 @@
 	}
     }
     
+    public CssMarginSide(ApplContext ac, CssExpression expression)
+    	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssVerticalAlignMob.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssVerticalAlignMob.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssVerticalAlignMob.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssVerticalAlignMob.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -34,14 +44,14 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
+import org.w3c.css.values.CssLength;
 import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssPercentage;
-import org.w3c.css.values.CssLength;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -137,7 +147,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssVerticalAlignMob(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssVerticalAlignMob(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	int hash = val.hashCode();
 	
@@ -167,6 +183,11 @@
 	}
     }
     
+    public CssVerticalAlignMob(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssBorderLeftCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderLeftCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderLeftCSS2.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderLeftCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -30,15 +40,15 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssPrinterStyle;
 import org.w3c.css.parser.CssSelectors;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssLength;
 import org.w3c.css.values.CssOperator;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -90,57 +100,75 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssBorderLeftCSS2(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssBorderLeftCSS2(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
 	CssValue val = null;
 	char op = SPACE;
 	boolean find = true;
 	
+	if(check && expression.getCount() > 3) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
+	boolean manyValues = (expression.getCount() > 1);
+	
 	setByUser();
 	
 	while (find) {
 	    find = false;
-	    val = expression.getValue();
-	    op = expression.getOperator();
-	    
+	    val = expression.getValue();	    
+	    op = expression.getOperator();	    
 	    if (val == null)
 		break;
 	    
+	    // if there are many values, we can't have inherit as one of them
+	    if(manyValues && val.equals(inherit)) {
+		throw new InvalidParamException("unrecognize", null, null, ac);
+	    }
+	    
 	    if (op != SPACE)
 		throw new InvalidParamException("operator", 
 						((new Character(op)).toString()),
-						ac);
-	    
+						ac);   
 	    if (width == null) {
 		try {
-		    width = new CssBorderLeftWidthCSS2(ac, expression);
+		    width = new CssBorderLeftWidthCSS2(ac, expression);		
 		    find = true;
-		} catch (InvalidParamException e) {
+		} catch(InvalidParamException e){
+		    // nothing to do, style will test this value		    
 		}
 	    }
 	    if (!find && style == null) {
 		try {
-		    style = new CssBorderLeftStyleCSS2(ac, expression);
+		    style = new CssBorderLeftStyleCSS2(ac, expression);		    
 		    find = true;
-		}
-		catch (InvalidParamException e) {
+		} catch(InvalidParamException e){
+		    // nothing to do, color will test this value
 		}
 	    }
 	    if (!find && color == null) {
-		try {
-		    color = new CssBorderLeftColorCSS2(ac, expression);
-		    find = true;
-		}
-		catch (InvalidParamException e) {
-		}
+		// throws an exception if the value is not valid
+		color = new CssBorderLeftColorCSS2(ac, expression);
+		find = true;		
 	    }
 	}
-	
-	if (width == null)
+	/*
+	//if some values have not been set, we set them with their default ones
+	if (width == null) {
 	    width = new CssBorderLeftWidthCSS2();
-	if (style == null)
-	    style = new CssBorderLeftStyleCSS2();
-	if (color == null)
-	    color = new CssBorderLeftColorCSS2();
+	}
+	if (style == null) {
+	    style = new CssBorderLeftStyleCSS2();	    
+	}	
+	if (color == null) {
+	    color = new CssBorderLeftColorCSS2();	    
+	}
+	*/
+    }
+    
+    public CssBorderLeftCSS2(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
     }
     
     /**
@@ -187,9 +215,22 @@
      * Returns a string representation of the object.
      */
     public String toString() {
-	String ret = width + " " + style;
-	if (!color.face.isDefault())
-	    ret += " " + color;
+	String ret = "";
+	if(width != null) {
+	    ret += width;
+	}
+	if(style != null) {
+	    if(!ret.equals("")) {
+		ret += " ";
+	    }
+	    ret += style;
+	}
+	if(color != null) {
+	    if(!ret.equals("")) {
+		ret += " ";
+	    }
+	    ret += color;
+	}
 	return ret;
     }
     
@@ -205,9 +246,15 @@
      * Overrides this method for a macro
      */  
     public void setImportant() {
-	width.important = true;
-	style.important = true;
-	color.important = true;
+	if(width != null) {
+	    width.important = true;
+	}
+	if(style != null) {
+	    style.important = true;
+	}
+	if(color != null) {
+	    color.important = true;
+	}
     }
     
     /**
@@ -220,7 +267,6 @@
 		(color == null || color.important));
     }
     
-    
     /**
      * Print this property.
      *
@@ -272,10 +318,16 @@
      *
      * @param style The CssStyle
      */
-    public void addToStyle(ApplContext ac, CssStyle style) {
-	width.addToStyle(ac, style);
-	this.style.addToStyle(ac, style);
-	color.addToStyle(ac, style);
+    public void addToStyle(ApplContext ac, CssStyle style) {	
+	if(width != null) {
+	    width.addToStyle(ac, style);
+	}
+	if(this.style != null) {
+	    this.style.addToStyle(ac, style);
+	}
+	if(color != null) {
+	    color.addToStyle(ac, style);
+	}
     }
     
     /**
@@ -300,10 +352,16 @@
      * @param source The source file where this property is defined
      */  
     public void setInfo(int line, String source) {
-	super.setInfo(line, source);
-	width.setInfo(line, source);
-	style.setInfo(line, source);
-	color.setInfo(line, source);
+	super.setInfo(line, source);	
+	if(width != null) {
+	    width.setInfo(line, source);
+	}
+	if(style != null) {
+	    style.setInfo(line, source);
+	}
+	if(color != null) {
+	    color.setInfo(line, source);
+	}
     }
     
     /**
@@ -314,8 +372,9 @@
     public boolean equals(CssProperty property) {
 	if (property instanceof CssBorderLeftCSS2) {
 	    CssBorderLeftCSS2 left = (CssBorderLeftCSS2) property;
-	    return (width.equals(left.width) && style.equals(left.style) 
-		    && color.equals(left.color));
+	    return (width != null && width.equals(left.width) && 
+		    style != null && style.equals(left.style) &&
+		    color != null && color.equals(left.color));
 	} else {
 	    return false;
 	}

Index: CssBorderRightCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderRightCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderRightCSS1.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderRightCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -31,14 +41,14 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssPrinterStyle;
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssSelectors;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssLength;
 import org.w3c.css.values.CssOperator;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -88,14 +98,22 @@
      * Create a new CssBorderFaceCSS1
      *
      * @param expression The expression for this property
+     * @param check true will test the number of parameters
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssBorderRightCSS1(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssBorderRightCSS1(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
 	CssValue val = null;
 	char op = SPACE;
 	boolean find = true;
 	
+	if(check && expression.getCount() > 3) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
+	
 	while (find) {
 	    find = false;
 	    val = expression.getValue();
@@ -114,6 +132,7 @@
 		    width = new CssBorderRightWidthCSS1(ac, expression);
 		    find = true;
 		} catch (InvalidParamException e) {
+		    // nothing to do, style will test this value
 		}
 	    }
 	    if (!find && style == null) {
@@ -122,24 +141,34 @@
 		    find = true;
 		}
 		catch (InvalidParamException e) {
+		    // nothing to do, color will test this value
 		}
 	    }
 	    if (!find && color == null) {
-		try {
-		    color = new CssBorderRightColorCSS1(ac, expression);
-		    find = true;
-		}
-		catch (InvalidParamException e) {
-		}
+		color = new CssBorderRightColorCSS1(ac, expression);
+		find = true;
 	    }
 	}
-	
+	/*
 	if (width == null)
 	    width = new CssBorderRightWidthCSS1();
 	if (style == null)
 	    style = new CssBorderRightStyleCSS1();
 	if (color == null)
 	    color = new CssBorderRightColorCSS1();
+	*/
+    }
+    
+    /**
+     * Create a new CssBorderFaceCSS1
+     *
+     * @param expression The expression for this property
+     * @param check true will test the number of parameters
+     * @exception InvalidParamException The expression is incorrect
+     */  
+    public CssBorderRightCSS1(ApplContext ac, CssExpression expression)
+    	throws InvalidParamException {
+	this(ac, expression, false);
     }
     
     /**
@@ -186,9 +215,22 @@
      * Returns a string representation of the object.
      */
     public String toString() {
-	String ret = width + " " + style;
-	if (!color.face.isDefault())
-	    ret += " " + color;
+	String ret = "";
+	if(width != null) {
+	    ret += width;
+	}
+	if(style != null) {
+	    if(!ret.equals("")) {
+		ret += " ";
+	    }
+	    ret += style;
+	}
+	if(color != null) {
+	    if(!ret.equals("")) {
+		ret += " ";
+	    }
+	    ret += color;
+	}
 	return ret;
     }
     
@@ -204,9 +246,15 @@
      * Overrides this method for a macro
      */  
     public void setImportant() {
-	width.important = true;
-	style.important = true;
-	color.important = true;
+	if(width != null) {
+	    width.important = true;
+	}
+	if(style != null) {
+	    style.important = true;
+	}
+	if(color != null) {
+	    color.important = true;
+	}
     }
     
     /**
@@ -246,37 +294,23 @@
     }
     
     /**
-     * Set the context.
-     * Overrides this method for a macro
+     * Add this property to the CssStyle
      *
-     * @see org.w3c.css.css.CssCascadingOrder#order
-     * @see org.w3c.css.css.StyleSheetParser#handleRule
+     * @param style The CssStyle
      */
-    public void setSelectors(CssSelectors selector) {
-	super.setSelectors(selector);
-	if (width != null) {
-	    width.setSelectors(selector);
+    public void addToStyle(ApplContext ac, CssStyle style) {	
+	if(width != null) {
+	    width.addToStyle(ac, style);
 	}
-	if (style != null) {
-	    style.setSelectors(selector);
+	if(this.style != null) {
+	    this.style.addToStyle(ac, style);
 	}
-	if (color != null) {
-	    color.setSelectors(selector);
+	if(color != null) {
+	    color.addToStyle(ac, style);
 	}
     }
     
     /**
-     * Add this property to the CssStyle
-     *
-     * @param style The CssStyle
-     */
-    public void addToStyle(ApplContext ac, CssStyle style) {
-	width.addToStyle(ac, style);
-	this.style.addToStyle(ac, style);
-	color.addToStyle(ac, style);
-    }
-    
-    /**
      * Get this property in the style.
      *
      * @param style The style where the property is
@@ -298,10 +332,36 @@
      * @param source The source file where this property is defined
      */  
     public void setInfo(int line, String source) {
-	super.setInfo(line, source);
-	width.setInfo(line, source);
-	style.setInfo(line, source);
-	color.setInfo(line, source);
+	super.setInfo(line, source);	
+	if(width != null) {
+	    width.setInfo(line, source);
+	}
+	if(style != null) {
+	    style.setInfo(line, source);
+	}
+	if(color != null) {
+	    color.setInfo(line, source);
+	}
+    }
+    
+    /**
+     * Set the context.
+     * Overrides this method for a macro
+     *
+     * @see org.w3c.css.css.CssCascadingOrder#order
+     * @see org.w3c.css.css.StyleSheetParser#handleRule
+     */
+    public void setSelectors(CssSelectors selector) {
+	super.setSelectors(selector);
+	if (width != null) {
+	    width.setSelectors(selector);
+	}
+	if (style != null) {
+	    style.setSelectors(selector);
+	}
+	if (color != null) {
+	    color.setSelectors(selector);
+	}
     }
     
     /**
@@ -312,8 +372,9 @@
     public boolean equals(CssProperty property) {
 	if (property instanceof CssBorderRightCSS1) {
 	    CssBorderRightCSS1 right = (CssBorderRightCSS1) property;
-	    return (width.equals(right.width) && 
-		    style.equals(right.style) && color.equals(right.color));
+	    return (width != null && width.equals(right.width) && 
+		    style != null && style.equals(right.style) && 
+		    color != null && color.equals(right.color));
 	} else {
 	    return false;
 	}

Index: CssMaxHeightATSC.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssMaxHeightATSC.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssMaxHeightATSC.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssMaxHeightATSC.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -9,14 +9,14 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssNumber;
+import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssLength;
+import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssPercentage;
-import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  */
@@ -39,7 +39,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssMaxHeightATSC(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssMaxHeightATSC(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	
 	setByUser();
@@ -67,6 +73,11 @@
 	expression.next();
     }
     
+    public CssMaxHeightATSC(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property.
      */

Index: CssFontStretchCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssFontStretchCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssFontStretchCSS1.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssFontStretchCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -13,11 +23,10 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  *
@@ -43,8 +52,14 @@
      * @param expression the font stretch
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssFontStretchCSS1(ApplContext ac, CssExpression expression) 
+    public CssFontStretchCSS1(ApplContext ac, CssExpression expression,
+	    boolean check)    
 	throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
 	if (expression.getValue() instanceof CssIdent) {
 	    int hash = expression.getValue().hashCode();
@@ -60,6 +75,11 @@
 					getPropertyName(), ac);
     }
     
+    public CssFontStretchCSS1(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the current value
      */  

Index: CssBorderBottomCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderBottomCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderBottomCSS1.java	8 Apr 2002 21:17:42 -0000	1.2
+++ CssBorderBottomCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:42  plehegar
  * New
  *
@@ -30,15 +40,15 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssPrinterStyle;
 import org.w3c.css.parser.CssSelectors;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssLength;
 import org.w3c.css.values.CssOperator;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -89,13 +99,17 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssBorderBottomCSS1(ApplContext ac, CssExpression expression) 
-        throws InvalidParamException {
+    public CssBorderBottomCSS1(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
 	
 	CssValue val = null;
 	char op = SPACE;
 	boolean find = true;
 	
+	if(check && expression.getCount() > 3) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
 	
 	while (find) {
@@ -116,6 +130,7 @@
 		    width = new CssBorderBottomWidthCSS1(ac, expression);
 		    find = true;
 		} catch (InvalidParamException e) {
+		    // nothing to do, style will test this value
 		}
 	    }
 	    if (!find && style == null) {
@@ -124,24 +139,27 @@
 		    find = true;
 		}
 		catch (InvalidParamException e) {
+		    // nothing to do, color will test this value
 		}
 	    }
 	    if (!find && color == null) {
-		try {
-		    color = new CssBorderBottomColorCSS1(ac, expression);
-		    find = true;
-		}
-		catch (InvalidParamException e) {
-		}
+		color = new CssBorderBottomColorCSS1(ac, expression);
+		find = true;
 	    }
 	}
-	
+	/*
 	if (width == null)
 	    width = new CssBorderBottomWidthCSS1();
 	if (style == null)
 	    style = new CssBorderBottomStyleCSS1();
 	if (color == null)
 	    color = new CssBorderBottomColorCSS1();
+	*/
+    }
+    
+    public CssBorderBottomCSS1(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
     }
     
     /**
@@ -188,9 +206,22 @@
      * Returns a string representation of the object.
      */
     public String toString() {
-	String ret = width + " " + style;
-	if (!color.face.isDefault())
-	    ret += " " + color;
+	String ret = "";
+	if(width != null) {
+	    ret += width;
+	}
+	if(style != null) {
+	    if(!ret.equals("")) {
+		ret += " ";
+	    }
+	    ret += style;
+	}
+	if(color != null) {
+	    if(!ret.equals("")) {
+		ret += " ";
+	    }
+	    ret += color;
+	}
 	return ret;
     }
     
@@ -206,9 +237,15 @@
      * Overrides this method for a macro
      */  
     public void setImportant() {
-	width.important = true;
-	style.important = true;
-	color.important = true;
+	if(width != null) {
+	    width.important = true;
+	}
+	if(style != null) {
+	    style.important = true;
+	}
+	if(color != null) {
+	    color.important = true;
+	}
     }
     
     /**
@@ -248,37 +285,23 @@
     }
     
     /**
-     * Set the context.
-     * Overrides this method for a macro
+     * Add this property to the CssStyle
      *
-     * @see org.w3c.css.css.CssCascadingOrder#order
-     * @see org.w3c.css.css.StyleSheetParser#handleRule
+     * @param style The CssStyle
      */
-    public void setSelectors(CssSelectors selector) {
-	super.setSelectors(selector);
-	if (width != null) {
-	    width.setSelectors(selector);
+    public void addToStyle(ApplContext ac, CssStyle style) {	
+	if(width != null) {
+	    width.addToStyle(ac, style);
 	}
-	if (style != null) {
-	    style.setSelectors(selector);
+	if(this.style != null) {
+	    this.style.addToStyle(ac, style);
 	}
-	if (color != null) {
-	    color.setSelectors(selector);
+	if(color != null) {
+	    color.addToStyle(ac, style);
 	}
     }
     
     /**
-     * Add this property to the CssStyle
-     *
-     * @param style The CssStyle
-     */
-    public void addToStyle(ApplContext ac, CssStyle style) {
-	width.addToStyle(ac, style);
-	this.style.addToStyle(ac, style);
-	color.addToStyle(ac, style);
-    }
-    
-    /**
      * Get this property in the style.
      *
      * @param style The style where the property is
@@ -300,10 +323,36 @@
      * @param source The source file where this property is defined
      */  
     public void setInfo(int line, String source) {
-	super.setInfo(line, source);
-	width.setInfo(line, source);
-	style.setInfo(line, source);
-	color.setInfo(line, source);
+	super.setInfo(line, source);	
+	if(width != null) {
+	    width.setInfo(line, source);
+	}
+	if(style != null) {
+	    style.setInfo(line, source);
+	}
+	if(color != null) {
+	    color.setInfo(line, source);
+	}
+    }
+    
+    /**
+     * Set the context.
+     * Overrides this method for a macro
+     *
+     * @see org.w3c.css.css.CssCascadingOrder#order
+     * @see org.w3c.css.css.StyleSheetParser#handleRule
+     */
+    public void setSelectors(CssSelectors selector) {
+	super.setSelectors(selector);
+	if (width != null) {
+	    width.setSelectors(selector);
+	}
+	if (style != null) {
+	    style.setSelectors(selector);
+	}
+	if (color != null) {
+	    color.setSelectors(selector);
+	}
     }
     
     /**
@@ -314,8 +363,9 @@
     public boolean equals(CssProperty property) {
 	if (property instanceof CssBorderBottomCSS1) {
 	    CssBorderBottomCSS1 bottom = (CssBorderBottomCSS1) property;
-	    return (width.equals(bottom.width) && style.equals(bottom.style) 
-		    && color.equals(bottom.color));
+	    return (width != null && width.equals(bottom.width) &&
+		    style != null && style.equals(bottom.style) && 
+		    color != null && color.equals(bottom.color));
 	} else {
 	    return false;
 	}

Index: CssTextTransform.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssTextTransform.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssTextTransform.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssTextTransform.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -37,11 +47,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -103,9 +113,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The value is incorrect
      */  
-    public CssTextTransform(ApplContext ac, CssExpression expression)
+    public CssTextTransform(ApplContext ac, CssExpression expression, boolean check)
 	throws InvalidParamException {
 	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	int hash = val.hashCode();
 	
@@ -121,6 +135,11 @@
 	throw new InvalidParamException("value", val.toString(), getPropertyName(), ac);
     }
     
+    public CssTextTransform(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssFontFamilyCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssFontFamilyCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssFontFamilyCSS2.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssFontFamilyCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -22,17 +32,18 @@
 
 package org.w3c.css.properties;
 
-import java.util.Vector;
 import java.util.Enumeration;
-import org.w3c.css.util.Util;
-import org.w3c.css.values.CssOperator;
+import java.util.Vector;
+
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
+import org.w3c.css.util.Util;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
+import org.w3c.css.values.CssOperator;
 import org.w3c.css.values.CssString;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /** 
  *   <H4>
@@ -118,25 +129,34 @@
      * @param expression the font name
      * @exception InvalidParamException The expression is incorrect
      */
-    public CssFontFamilyCSS2(ApplContext ac, CssExpression expression) 
+    public CssFontFamilyCSS2(ApplContext ac, CssExpression expression,
+	    boolean check) 
 	    throws InvalidParamException {
 	boolean family = true;
 	CssValue val = expression.getValue();
 	char op;
-
+	
+	boolean manyValues = expression.getCount() > 1;
+	
 	setByUser();
 	//@@ and if name is already in the vector ?
 	
-
 	if (val.equals(inherit)) {
+	    if(expression.getCount() > 1) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    inheritedValue = true;
 	    expression.next();
 	    return;
 	}
 
-	while (family) {
+	while (family) {	    
 	    val = expression.getValue();
 	    op = expression.getOperator();
+
+	    if(manyValues && val != null && val.equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    
 	    if ((op != COMMA) && (op != SPACE)) {
 		throw new InvalidParamException("operator", 
@@ -144,7 +164,7 @@
 						ac);
 	    }
 	    
-	    if (val instanceof CssString) {
+	    if (val instanceof CssString) {		
 		String familyName = null;
 		if (op == COMMA) { // "helvetica", "roman"
 		    familyName = trimToOneSpace(val.toString());
@@ -167,12 +187,15 @@
 		}
 		family_name.addElement(familyName);
 	    } else if (val instanceof CssIdent) {
+		
 		if (op == COMMA) {
 		    family_name.addElement(convertString(val.toString()));
 		    expression.next();
 		} else {
 		    CssValue next = expression.getNextValue();
-		    
+		    if(manyValues && next != null && next.equals(inherit)) {
+			throw new InvalidParamException("unrecognize", ac);
+		    }
 		    if (next instanceof CssIdent) {
 			CssIdent New = new CssIdent(val.get() + " " 
 						    + next.get());
@@ -188,13 +211,22 @@
 			family = false;
 		    }
 		}
-	    } else
+	    } else {
 		throw new InvalidParamException("value", expression.getValue(),
-						getPropertyName(), ac);
+			getPropertyName(), ac);
+	    }	   
+	}
+	if(check && !expression.end()) {
+	    throw new InvalidParamException("unrecognize", ac);
 	}
 	if (!containsGenericFamily()) {
 	    ac.getFrame().addWarning("no-generic-family", "font-family");
-	}
+	}	
+    }
+    
+    public CssFontFamilyCSS2(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
     }
     
     /**

Index: CssBorderCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderCSS1.java	8 Apr 2002 21:17:42 -0000	1.2
+++ CssBorderCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:42  plehegar
  * New
  *
@@ -28,13 +38,13 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssPrinterStyle;
 import org.w3c.css.parser.CssSelectors;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
 import org.w3c.css.values.CssValue;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  * @version $Revision$
@@ -62,9 +72,15 @@
      * @param value The value for this property
      * @exception InvalidParamException The value is incorrect
      */  
-    public CssBorderCSS1(ApplContext ac, CssExpression value) throws InvalidParamException {
+    public CssBorderCSS1(ApplContext ac, CssExpression value,
+	    boolean check) throws InvalidParamException {
 	CssValue val = value.getValue();
 	
+	// too many values
+	if(check && value.getCount() > 3) {
+	     throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
 	
 	
@@ -80,33 +96,49 @@
 	bottom = new CssBorderBottomCSS1();
 	left = new CssBorderLeftCSS1();
 
-	right.width  = 
-	    new CssBorderRightWidthCSS1((CssBorderFaceWidthCSS1) top.width.get());
-	left.width = 
-	    new CssBorderLeftWidthCSS1((CssBorderFaceWidthCSS1) top.width.get());
-	bottom.width = 
-	    new CssBorderBottomWidthCSS1((CssBorderFaceWidthCSS1) top.width.get());
-	
-	right.style = 
-	    new CssBorderRightStyleCSS1((CssBorderFaceStyleCSS1) top.style.get());
-	left.style = 
-	    new CssBorderLeftStyleCSS1((CssBorderFaceStyleCSS1) top.style.get());
-	bottom.style = 
-	    new CssBorderBottomStyleCSS1((CssBorderFaceStyleCSS1) top.style.get());
+	CssBorderTopWidthCSS1 w = top.width;
+	CssBorderTopStyleCSS1 s = top.style;
+	CssBorderTopColorCSS1 c = top.color;	
 	
-	right.color = 
-	    new CssBorderRightColorCSS1((CssBorderFaceColorCSS1) top.color.get());
-	left.color = 
-	    new CssBorderLeftColorCSS1((CssBorderFaceColorCSS1) top.color.get());
-	bottom.color = 
-	    new CssBorderBottomColorCSS1((CssBorderFaceColorCSS1) top.color.get());
+	if(w != null) {	    
+	    right.width  = 
+		new CssBorderRightWidthCSS1((CssBorderFaceWidthCSS1) w.get());	    
+	    left.width = 
+		new CssBorderLeftWidthCSS1((CssBorderFaceWidthCSS1) w.get());	    
+	    bottom.width = 
+		new CssBorderBottomWidthCSS1((CssBorderFaceWidthCSS1) w.get());	    
+	}	
+	if(s != null) {
+	    right.style = 
+		new CssBorderRightStyleCSS1((CssBorderFaceStyleCSS1) s.get());
+	    left.style = 
+		new CssBorderLeftStyleCSS1((CssBorderFaceStyleCSS1) s.get());
+	    bottom.style = 
+		new CssBorderBottomStyleCSS1((CssBorderFaceStyleCSS1) s.get());
+	}	
+	if(c != null) {
+	    right.color = 
+		new CssBorderRightColorCSS1((CssBorderFaceColorCSS1) c.get());
+	    left.color = 
+		new CssBorderLeftColorCSS1((CssBorderFaceColorCSS1) c.get());
+	    bottom.color = 
+		new CssBorderBottomColorCSS1((CssBorderFaceColorCSS1) c.get());
+	}	
+    }
+    
+    public CssBorderCSS1(ApplContext ac, CssExpression expression)
+	    throws InvalidParamException {
+	this(ac, expression, false);
     }
     
     /**
      * Returns the value of this property
      */
     public Object get() {
-	return top.get();
+	if(top != null) {
+	    return top.get();
+	}
+	return null;
     }
     
     /**
@@ -141,7 +173,10 @@
      * Returns a string representation of the object.
      */
     public String toString() {
-	return top.toString();
+	if(top != null) {
+	    return top.toString();
+	}
+	return "";
     }
     
     public boolean equals(CssProperty property) {
@@ -160,10 +195,18 @@
      * Overrides this method for a macro
      */  
     public void setImportant() {
-	top.setImportant();
-	right.setImportant();
-	left.setImportant();
-	bottom.setImportant();
+	if(top != null) {
+	    top.setImportant();
+	}
+	if(right != null) {
+	    right.setImportant();
+	}
+	if(left != null) {
+	    left.setImportant();
+	}
+	if(bottom != null) {
+	    bottom.setImportant();
+	}
     }
     
     /**
@@ -287,10 +330,18 @@
      * @param style The CssStyle
      */
     public void addToStyle(ApplContext ac, CssStyle style) {
-	top.addToStyle(ac, style);
-	right.addToStyle(ac, style);
-	left.addToStyle(ac, style);
-	bottom.addToStyle(ac, style);
+	if(top != null) {
+	    top.addToStyle(ac, style);
+	}
+	if(right != null) {
+	    right.addToStyle(ac, style);
+	}
+	if(left != null) {
+	    left.addToStyle(ac, style);
+	}
+	if(bottom != null) {
+	    bottom.addToStyle(ac, style);
+	}
     }
     
     /**
@@ -316,16 +367,32 @@
      */  
     public void setInfo(int line, String source) {
 	super.setInfo(line, source);
-	top.setInfo(line, source);
-	right.setInfo(line, source);
-	left.setInfo(line, source);
-	bottom.setInfo(line, source);
+	if(top != null) {
+	    top.setInfo(line, source);
+	}
+	if(right != null) {
+	    right.setInfo(line, source);
+	}
+	if(left != null) {
+	    left.setInfo(line, source);
+	}
+	if(bottom != null) {
+	    bottom.setInfo(line, source);
+	}
     }
     
     void check() {
-	top.check();
-	bottom.check();
-	right.check();
-	left.check();
+	if(top != null) {
+	    top.check();
+	}
+	if(bottom != null) {
+	    bottom.check();
+	}
+	if(right != null) {
+	    right.check();
+	}
+	if(left != null) {
+	    left.check();
+	}
     }
 }

Index: CssBorderBottomStyleCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderBottomStyleCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderBottomStyleCSS2.java	8 Apr 2002 21:17:42 -0000	1.2
+++ CssBorderBottomStyleCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:42  plehegar
  * New
  *
@@ -22,11 +32,9 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
-import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
+import org.w3c.css.values.CssExpression;
 
 /**
  * Be careful, this is not a CSS1 property !
@@ -59,11 +67,20 @@
    * @param expression The expression for this property.
    * @exception InvalidParamException Values are incorrect
    */
-  public CssBorderBottomStyleCSS2(ApplContext ac, CssExpression expression) 
-    throws InvalidParamException {
+  public CssBorderBottomStyleCSS2(ApplContext ac, CssExpression expression,
+	  boolean check) throws InvalidParamException {
+      
+      if(check && expression.getCount() > 1) {
+	  throw new InvalidParamException("unrecognize", ac);
+      }
 
       setByUser();
-    face = new CssBorderFaceStyleCSS2(ac, expression);
+      face = new CssBorderFaceStyleCSS2(ac, expression);
+  }
+  
+  public CssBorderBottomStyleCSS2(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
   }
   
   /**
@@ -77,14 +94,20 @@
    * Returns the value
    */
   public String getStyle() {
-    return face.getStyle();
+      if(face != null) {
+	  return face.getStyle();
+      }
+      return null;
   }
 
   /**
    * Returns a string representation of the object.
    */
   public String toString() {
-    return face.toString();
+      if(face != null) {
+	  return face.toString();
+      }
+      return "";
   }
 
   /**

Index: CssFontStyleCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssFontStyleCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssFontStyleCSS2.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssFontStyleCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -55,11 +65,10 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  *   <H4>
@@ -110,7 +119,13 @@
      * @param expression the font style
      * @exception InvalidParamException values are incorrect
      */  
-    public CssFontStyleCSS2(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssFontStyleCSS2(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
 	if (expression.getValue() instanceof CssIdent) {
 	    int hash = ((CssIdent) expression.getValue()).hashCode();
@@ -126,6 +141,11 @@
 					getPropertyName(), ac);
     }
     
+    public CssFontStyleCSS2(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the current value
      */  

Index: CssBorderFaceStyleCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderFaceStyleCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderFaceStyleCSS2.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderFaceStyleCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -27,12 +37,11 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  * @version $Revision$
@@ -69,8 +78,12 @@
      * @param expression The expression for this face
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssBorderFaceStyleCSS2(ApplContext ac, CssExpression expression) 
-	throws InvalidParamException {
+    public CssBorderFaceStyleCSS2(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
 	
 	CssValue val = expression.getValue();
 	
@@ -87,6 +100,11 @@
 	throw new InvalidParamException("value", val.toString(), "style", ac);
     }
     
+    public CssBorderFaceStyleCSS2(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression,false);
+    }
+    
     /**
      * Returns true if this property is "softly" inherited
      * e.g. his value equals inherit

Index: CssFloat.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssFloat.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssFloat.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssFloat.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -31,11 +41,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
 import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssValue;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  *   <H4>
@@ -167,7 +177,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssFloat(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssFloat(ApplContext ac, CssExpression expression, boolean check)
+    	throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	setByUser();
 	if ( val instanceof CssIdent) {
@@ -183,6 +199,11 @@
 					getPropertyName(), ac);
     }
     
+    public CssFloat(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssBackgroundPositionMob.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBackgroundPositionMob.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBackgroundPositionMob.java	8 Apr 2002 21:17:42 -0000	1.2
+++ CssBackgroundPositionMob.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:42  plehegar
  * New
  *
@@ -40,15 +50,15 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.values.CssPercentage;
 import org.w3c.css.values.CssLength;
 import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssOperator;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssPercentage;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -146,8 +156,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssBackgroundPositionMob(ApplContext ac, CssExpression expression) 
-	throws InvalidParamException {
+    public CssBackgroundPositionMob(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 2) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
 	CssValue val = expression.getValue();
 	char op  = expression.getOperator();
@@ -159,6 +174,9 @@
 					     ac);
 	
 	if (val.equals(inherit)) {
+	    if(expression.getCount() > 1) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    horizontal = inherit;
 	    vertical = inherit;
 	    expression.next();
@@ -166,6 +184,9 @@
 	} else if (val instanceof CssIdent 
 	    && (index=IndexOfIdent((String) val.get())) != INVALID) {
 	    CssValue next = expression.getNextValue();
+	    if(next.equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    expression.next();
 	    if (next == null) {
 		getPercentageFromIdent(index, INVALID);
@@ -186,20 +207,20 @@
 	    horizontal = val;
 	    expression.next();
 	    val = expression.getValue();
+	    if(val.equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    if (val instanceof CssLength || 
 		val instanceof CssPercentage || val instanceof CssNumber) {
 		if (val instanceof CssNumber) {
-		    try {
-			val = ((CssNumber) val).getLength();
-		    } catch (InvalidParamException e) {
-			vertical = DefaultValue50;
-			return;
-		    }
+		    val = ((CssNumber) val).getLength();
 		}
 		vertical = val;
 		expression.next();
-	    } else
-		vertical = DefaultValue50;
+	    } else if(val != null) {
+		throw new InvalidParamException("value", expression.getValue(), 
+			    getPropertyName(), ac);
+	    }		
 	} else {
 	    throw new InvalidParamException("value", expression.getValue(), 
 					    getPropertyName(), ac);
@@ -208,6 +229,11 @@
 	
     }
     
+    public CssBackgroundPositionMob(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */
@@ -251,7 +277,17 @@
 	if (horizontal == inherit) {
 	    return inherit.toString();
 	} else {
-	    return horizontal + " " + vertical;
+	    String ret = "";
+	    if (horizontal != null) {
+		ret += horizontal;
+	    }
+	    if (vertical != null) {
+		if (!ret.equals("")) {
+		    ret += " ";
+		}
+		ret += vertical;
+	    }
+	    return ret;
 	}
     }
     
@@ -310,7 +346,8 @@
      * It is used by all macro for the function <code>print</code>
      */  
     public boolean isDefault() {
-	return horizontal.equals(DefaultValue0) && vertical.equals(DefaultValue0);
+	return horizontal != null && vertical != null &&
+	    horizontal.equals(DefaultValue0) && vertical.equals(DefaultValue0);
     }
     
     private int IndexOfIdent(String ident) throws InvalidParamException {

Index: CssListStyleTypeCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssListStyleTypeCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssListStyleTypeCSS2.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssListStyleTypeCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -31,11 +41,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -76,7 +86,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssListStyleTypeCSS2(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssListStyleTypeCSS2(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	
 	setByUser();
@@ -94,6 +110,11 @@
 	throw new InvalidParamException("value", val, getPropertyName(), ac);
     }
     
+    public CssListStyleTypeCSS2(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssBorderRightColorCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderRightColorCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderRightColorCSS2.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderRightColorCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -26,122 +36,137 @@
 
 import org.w3c.css.parser.CssPrinterStyle;
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
 import org.w3c.css.values.CssValue;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  * Be careful, this is not a CSS1 property !
  * @version $Revision$
  */
 public class CssBorderRightColorCSS2 extends CssProperty {
-
-  CssBorderFaceColorCSS2 face;
-  
-  /**
-   * Create a new CssBorderRightColorCSS2
-   */
-  public CssBorderRightColorCSS2() {
-    face = new CssBorderFaceColorCSS2();
-  }
-  
-  /**
-   * Create a new CssBorderRightColorCSS2 with an another CssBorderFaceColorCSS2
-   *
-   * @param another The another side.
-   */
-  public CssBorderRightColorCSS2(CssBorderFaceColorCSS2 another) {
-
-      setByUser();
-
-    face = another;
-  }
-  
-  /**
-   * Create a new CssBorderRightColorCSS2
-   *
-   * @param expression The expression for this property.
-   * @exception InvalidParamException Values are incorrect
-   */
-  public CssBorderRightColorCSS2(ApplContext ac, CssExpression expression) 
-    throws InvalidParamException {
-
+    
+    CssBorderFaceColorCSS2 face;
+    
+    /**
+     * Create a new CssBorderRightColorCSS2
+     */
+    public CssBorderRightColorCSS2() {
+	face = new CssBorderFaceColorCSS2();
+    }
+    
+    /**
+     * Create a new CssBorderRightColorCSS2 with an another CssBorderFaceColorCSS2
+     *
+     * @param another The another side.
+     */
+    public CssBorderRightColorCSS2(CssBorderFaceColorCSS2 another) {
+	
 	setByUser();
-    face = new CssBorderFaceColorCSS2(ac, expression);
-  }
-  
-  /**
-   * Returns the value of this property
-   */
-  public Object get() {
-    return face;
-  }
-
-  /**
-   * Returns the color of this property
-   */
-  public CssValue getColor() {
-    return face.getColor();
-  }
-
-  /**
-   * Returns a string representation of the object.
-   */
-  public String toString() {
-    return face.toString();
-  }
-
-  /**
-   * Returns the name of this property
-   */  
-  public String getPropertyName() {
-    return "border-right-color";
-  }
-
-  /**
-   * Add this property to the CssStyle.
-   *
-   * @param style The CssStyle
-   */
-  public void addToStyle(ApplContext ac, CssStyle style) {
-    CssBorderRightCSS2 right = ((Css1Style) style).cssBorderCSS2.right;
-    if (right.color != null)
-      style.addRedefinitionWarning(ac, this);
-    right.color = this;
-  }
-
-  /**
-   * Get this property in the style.
-   *
-   * @param style The style where the property is
-   * @param resolve if true, resolve the style to find this property
-   */  
-  public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
-    if (resolve) {
-      return ((Css1Style) style).getBorderRightColorCSS2();
-    } else {
-      return ((Css1Style) style).cssBorderCSS2.getRight().color;
+	
+	face = another;
+    }
+    
+    /**
+     * Create a new CssBorderRightColorCSS2
+     *
+     * @param expression The expression for this property.
+     * @exception InvalidParamException Values are incorrect
+     */
+    public CssBorderRightColorCSS2(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
+	setByUser();
+	face = new CssBorderFaceColorCSS2(ac, expression);
+    }
+    
+    public CssBorderRightColorCSS2(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression,false);
+    }
+    
+    /**
+     * Returns the value of this property
+     */
+    public Object get() {
+	return face;
+    }
+    
+    /**
+     * Returns the color of this property
+     */
+    public CssValue getColor() {
+	if(face != null) {
+	    return face.getColor();
+	}
+	return null;
+    }
+    
+    /**
+     * Returns a string representation of the object.
+     */
+    public String toString() {
+	if(face != null) {
+	    return face.toString();
+	}
+	return "";
+    }
+    
+    /**
+     * Returns the name of this property
+     */  
+    public String getPropertyName() {
+	return "border-right-color";
+    }
+    
+    /**
+     * Add this property to the CssStyle.
+     *
+     * @param style The CssStyle
+     */
+    public void addToStyle(ApplContext ac, CssStyle style) {
+	CssBorderRightCSS2 right = ((Css1Style) style).cssBorderCSS2.right;
+	if (right.color != null)
+	    style.addRedefinitionWarning(ac, this);
+	right.color = this;
+    }
+    
+    /**
+     * Get this property in the style.
+     *
+     * @param style The style where the property is
+     * @param resolve if true, resolve the style to find this property
+     */  
+    public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
+	if (resolve) {
+	    return ((Css1Style) style).getBorderRightColorCSS2();
+	} else {
+	    return ((Css1Style) style).cssBorderCSS2.getRight().color;
+	}
+    }
+    
+    /**
+     * Compares two properties for equality.
+     *
+     * @param value The other property.
+     */  
+    public boolean equals(CssProperty property) {
+	return (property instanceof CssBorderRightColorCSS2 && 
+		face.equals(((CssBorderRightColorCSS2) property).face));
+    }
+    
+    /**
+     * Print this property.
+     *
+     * @param printer The printer.
+     */  
+    public void print(CssPrinterStyle printer) {
+	if (!face.isDefault())
+	    printer.print(this);
     }
-  }
-
-  /**
-   * Compares two properties for equality.
-   *
-   * @param value The other property.
-   */  
-  public boolean equals(CssProperty property) {
-    return (property instanceof CssBorderRightColorCSS2 && 
-	    face.equals(((CssBorderRightColorCSS2) property).face));
-  }
-
-  /**
-   * Print this property.
-   *
-   * @param printer The printer.
-   */  
-  public void print(CssPrinterStyle printer) {
-    if (!face.isDefault())
-      printer.print(this);
-  }
 }

Index: CssListStylePositionCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssListStylePositionCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssListStylePositionCSS2.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssListStylePositionCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -31,11 +41,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -70,8 +80,12 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssListStylePositionCSS2(ApplContext ac, CssExpression expression)
-	throws InvalidParamException {
+    public CssListStylePositionCSS2(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
 	
 	CssValue val = expression.getValue();
 	
@@ -79,15 +93,20 @@
 	
 	if ( val instanceof CssIdent) {
 	    int hash = val.hashCode();
-	    for (int i = 0; i < LISTSTYLEPOSITION.length; i++)
+	    for (int i = 0; i < LISTSTYLEPOSITION.length; i++) {
 		if (hash_values[i] == hash) {
 		    value = i;
 		    expression.next();
 		    return;
 		}
-	} else {
-	    throw new InvalidParamException("value", val, getPropertyName(), ac);
+	    }
 	}
+	throw new InvalidParamException("value", val, getPropertyName(), ac);
+    }
+    
+    public CssListStylePositionCSS2(ApplContext ac, CssExpression expression)
+    	throws InvalidParamException {
+	this(ac, expression, false);
     }
     
     /**

Index: CssBackgroundAttachmentCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBackgroundAttachmentCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBackgroundAttachmentCSS1.java	8 Apr 2002 21:17:42 -0000	1.2
+++ CssBackgroundAttachmentCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:42  plehegar
  * New
  *
@@ -31,11 +41,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -80,8 +90,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssBackgroundAttachmentCSS1(ApplContext ac, CssExpression expression) 
-	throws InvalidParamException {
+    public CssBackgroundAttachmentCSS1(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
 	
 	CssValue val = expression.getValue();
@@ -100,6 +115,11 @@
 					getPropertyName(), ac);
     }
     
+    public CssBackgroundAttachmentCSS1(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssVerticalAlignCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssVerticalAlignCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssVerticalAlignCSS1.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssVerticalAlignCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -34,12 +44,12 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssPercentage;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -135,7 +145,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssVerticalAlignCSS1(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssVerticalAlignCSS1(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	int hash = val.hashCode();
 	
@@ -159,6 +175,11 @@
 	}
     }
     
+    public CssVerticalAlignCSS1(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssBackgroundImageCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBackgroundImageCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBackgroundImageCSS2.java	8 Apr 2002 21:17:42 -0000	1.2
+++ CssBackgroundImageCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:42  plehegar
  * New
  *
@@ -38,12 +48,12 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssURL;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -83,9 +93,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssBackgroundImageCSS2(ApplContext ac, CssExpression expression) 
-	throws InvalidParamException {
+    public CssBackgroundImageCSS2(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
 	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+
 	setByUser();
 
 	CssValue val = expression.getValue();
@@ -104,6 +118,11 @@
 	}
     }
     
+    public CssBackgroundImageCSS2(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */
@@ -116,14 +135,20 @@
      * e.g. his value equals inherit
      */
     public boolean isSoftlyInherited() {
-	return url.equals(inherit);
+	if (url != null) {
+	    return url.equals(inherit);
+	}
+	return false;
     }
     
     /**
      * Returns a string representation of the object.
      */
     public String toString() {
-	return url.toString();
+	if (url != null) {
+	    return url.toString();
+	}
+	return "";
     }
     
     /**
@@ -165,8 +190,10 @@
      * @param value The other property.
      */  
     public boolean equals(CssProperty property) {
-	return (property instanceof CssBackgroundImageCSS2 && 
-		url.equals(((CssBackgroundImageCSS2) property).url));
+	return ((property == null && url == null)
+		|| (property instanceof CssBackgroundImageCSS2 && 
+		url != null &&
+		url.equals(((CssBackgroundImageCSS2) property).url)));
     }
     
     /**

Index: CssQuotes.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssQuotes.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssQuotes.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssQuotes.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -11,15 +11,13 @@
 import java.util.Vector;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssURL;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.values.CssFunction;
 import org.w3c.css.values.CssOperator;
 import org.w3c.css.values.CssString;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  */
@@ -42,25 +40,68 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssQuotes(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssQuotes(ApplContext ac, CssExpression expression, boolean check)
+    	throws InvalidParamException {
+	
 	CssValue val = expression.getValue();
 	int counter = 0;
 	char op = expression.getOperator();
 	
+	int valuesNb = expression.getCount();
+	
 	setByUser();
 	if (val.equals(inherit)) {
+	    if(valuesNb > 1) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    values.addElement(inherit);
 	    expression.next();
 	    return;
 	} else if (val.equals(none)) {
+	    if(valuesNb > 1) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    values.addElement(none);
 	    expression.next();
 	    return;
 	}
 
+	while(counter < valuesNb) {
 
+	    // there must be a pair number of values
+	    if(val.equals(inherit) || val.equals(none) || valuesNb % 2 == 1) {		
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    
+	    // the operator must be a space
+	    if(op != CssOperator.SPACE) {
+		throw new InvalidParamException("operator",
+			new Character(op), ac);
+	    }
+	    
+	    // as String
+	    if(val instanceof CssString) {
+		values.addElement(val);		
+	    }
+	    else {
+		throw new InvalidParamException("value", 
+			expression.getValue(), 
+			getPropertyName(), ac);
+	    }
+	    expression.next();
+	    counter++;
+	    
+	    val = expression.getValue();
+	    op = expression.getOperator();
+	}
+	/*
 	while ((op == CssOperator.SPACE)
 	       && (counter + 1 < expression.getCount())) {
+	    System.out.println(val);
+	    if(val.equals(inherit) || val.equals(none)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    
 	    if (val instanceof CssString) {
 		values.addElement(val);
 		expression.next();
@@ -86,7 +127,12 @@
 	    val = expression.getValue();
 	    op = expression.getOperator();
 	}
-
+	*/
+    }
+    
+    public CssQuotes(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
     }
     
     /**

Index: CssBorderFaceStyle.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderFaceStyle.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CssBorderFaceStyle.java	20 Dec 2002 16:06:03 -0000	1.3
+++ CssBorderFaceStyle.java	8 Aug 2005 13:18:12 -0000	1.4
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.4  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.3  2002/12/20 16:06:03  sijtsche
  * new values added
  *
@@ -30,12 +40,11 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  * @version $Revision$
@@ -73,9 +82,13 @@
      * @param expression The expression for this face
      * @exception InvalidParamException The expression is incorrect
      */
-    public CssBorderFaceStyle(ApplContext ac, CssExpression expression)
-	throws InvalidParamException {
-
+    public CssBorderFaceStyle(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 
 	if (val instanceof CssIdent) {
@@ -91,6 +104,11 @@
 	throw new InvalidParamException("value", val.toString(), "style", ac);
     }
 
+    public CssBorderFaceStyle(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns true if this property is "softly" inherited
      * e.g. his value equals inherit

Index: CssBorderTopWidthCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderTopWidthCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderTopWidthCSS2.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderTopWidthCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -22,10 +32,10 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
 import org.w3c.css.values.CssValue;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  *   <H4>
@@ -86,13 +96,22 @@
      * @param expression The expression for this property.
      * @exception InvalidParamException Values are incorrect
      */
-    public CssBorderTopWidthCSS2(ApplContext ac, CssExpression expression)
-	throws InvalidParamException {
+    public CssBorderTopWidthCSS2(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
 	
 	setByUser();
 	face = new CssBorderFaceWidthCSS2(ac, expression);
     }
     
+    public CssBorderTopWidthCSS2(ApplContext ac, CssExpression expression)
+    	throws InvalidParamException {
+	this(ac, expression,false);
+    }
+    
     /**
      * Returns the value of this property
      */
@@ -104,14 +123,20 @@
      * Return the value of this property
      */
     public CssValue getValue() {
-	return face.getValue();
+	if(face != null) {
+	    return face.getValue();
+	}
+	return null;
     }
     
     /**
      * Returns a string representation of the object.
      */
     public String toString() {
-	return face.toString();
+	if(face != null) {
+	    return face.toString();
+	}
+	return null;
     }
     
     /**

Index: CssFontStyle.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssFontStyle.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssFontStyle.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssFontStyle.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -55,11 +65,10 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  *   <H4>
@@ -110,7 +119,13 @@
      * @param expression the font style
      * @exception InvalidParamException values are incorrect
      */  
-    public CssFontStyle(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssFontStyle(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
 	if (expression.getValue() instanceof CssIdent) {
 	    int hash = ((CssIdent) expression.getValue()).hashCode();
@@ -126,6 +141,11 @@
 					getPropertyName(), ac);
     }
     
+    public CssFontStyle(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the current value
      */  

Index: CssBorderWidthCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderWidthCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderWidthCSS2.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderWidthCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -33,14 +43,13 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssPrinterStyle;
 import org.w3c.css.parser.CssSelectors;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssOperator;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  *   <H4>
@@ -109,7 +118,8 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssBorderWidthCSS2(ApplContext ac, CssExpression expression)  throws InvalidParamException {
+    public CssBorderWidthCSS2(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
 
 	setByUser();
 	switch (expression.getCount()) {
@@ -124,7 +134,13 @@
 		throw new InvalidParamException("operator", 
 						((new Character(expression.getOperator())).toString()),
 						ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    top = new CssBorderTopWidthCSS2(ac, expression);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    right = new CssBorderRightWidthCSS2(ac, expression);
 	    bottom = new CssBorderBottomWidthCSS2((CssBorderFaceWidthCSS2) top.get());
 	    left = new CssBorderLeftWidthCSS2((CssBorderFaceWidthCSS2) right.get());
@@ -134,36 +150,66 @@
 		throw new InvalidParamException("operator", 
 						((new Character(expression.getOperator())).toString()),
 						ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    top = new CssBorderTopWidthCSS2(ac, expression);
 	    if (expression.getOperator() != SPACE)
 		throw new InvalidParamException("operator", 
 						((new Character(expression.getOperator())).toString()),
 						ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    right = new CssBorderRightWidthCSS2(ac, expression);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    bottom = new CssBorderBottomWidthCSS2(ac, expression);
 	    left = new CssBorderLeftWidthCSS2((CssBorderFaceWidthCSS2) right.get());
 	    break;
-	default:
+	case 4:
 	    if (expression.getOperator() != SPACE)
 		throw new InvalidParamException("operator", 
 						((new Character(expression.getOperator())).toString()),
 						ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    top = new CssBorderTopWidthCSS2(ac, expression);
 	    if (expression.getOperator() != SPACE)
 		throw new InvalidParamException("operator", 
 						((new Character(expression.getOperator())).toString()),
 						ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    right = new CssBorderRightWidthCSS2(ac, expression);
 	    if (expression.getOperator() != SPACE)
 		throw new InvalidParamException("operator", 
 						((new Character(expression.getOperator())).toString()),
 						ac);
+	    if(expression.getValue().equals(inherit)) {		
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    bottom = new CssBorderBottomWidthCSS2(ac, expression);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    left = new CssBorderLeftWidthCSS2(ac, expression);
 	    break;
+	default:
+	    if(check) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	}
     }
     
+    public CssBorderWidthCSS2(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */
@@ -202,10 +248,18 @@
      * Overrides this method for a macro
      */  
     public void setImportant() {
-	top.important = true;
-	right.important = true;
-	left.important = true;
-	bottom.important = true;
+	if(top != null) {
+	    top.important = true;
+	}
+	if(right != null) {
+	    right.important = true;
+	}
+	if(left != null) {
+	    left.important = true;
+	}
+	if(bottom != null) {
+	    bottom.important = true;
+	}
     }
     
     /**
@@ -277,10 +331,18 @@
      * @param style The CssStyle
      */
     public void addToStyle(ApplContext ac, CssStyle style) {
-	top.addToStyle(ac, style);
-	right.addToStyle(ac, style);
-	left.addToStyle(ac, style);
-	bottom.addToStyle(ac, style);
+	if(top != null) {
+	    top.addToStyle(ac, style);
+	}
+	if(right != null) {
+	    right.addToStyle(ac, style);
+	}
+	if(left != null) {
+	    left.addToStyle(ac, style);
+	}
+	if(bottom != null) {
+	    bottom.addToStyle(ac, style);
+	}
     }
     
     /**
@@ -303,10 +365,18 @@
      */  
     public void setInfo(int line, String source) {
 	super.setInfo(line, source);
-	top.setInfo(line, source);
-	right.setInfo(line, source);
-	left.setInfo(line, source);
-	bottom.setInfo(line, source);
+	if(top != null) {
+	    top.setInfo(line, source);
+	}
+	if(right != null) {
+	    right.setInfo(line, source);
+	}
+	if(left != null) {
+	    left.setInfo(line, source);
+	}
+	if(bottom != null) {
+	    bottom.setInfo(line, source);
+	}
     }
     
     /**
@@ -315,7 +385,7 @@
      * @param value The other property.
      */  
     public boolean equals(CssProperty property) {
-	return false;
+	return false; // FIXME
     }
     
 }

Index: CssBorderRight.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderRight.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CssBorderRight.java	8 Jan 2003 10:24:47 -0000	1.3
+++ CssBorderRight.java	8 Aug 2005 13:18:12 -0000	1.4
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.4  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.3  2003/01/08 10:24:47  sijtsche
  * changes for CSS3 border
  *
@@ -34,15 +44,15 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssPrinterStyle;
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssSelectors;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssLength;
 import org.w3c.css.values.CssOperator;
 import org.w3c.css.values.CssURL;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -95,12 +105,20 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */
-    public CssBorderRight(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssBorderRight(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
 	CssValue val = null;
 	char op = SPACE;
 	boolean find = true;
 
+	if(check && expression.getCount() > 4) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
+	
+	boolean manyValues = (expression.getCount() > 1);
+	
 	while (find) {
 	    find = false;
 	    val = expression.getValue();
@@ -109,50 +127,70 @@
 	    if (val == null)
 		break;
 
+	    // if there are many values, we can't have inherit as one of them
+	    if(manyValues && val.equals(inherit)) {
+		throw new InvalidParamException("unrecognize", null, null, ac);
+	    }
+	    
 	    if (op != SPACE)
 		throw new InvalidParamException("operator",
 						((new Character(op)).toString()),
 						ac);
 
 	    if (width == null) {
-			try {
-			    width = new CssBorderRightWidth(ac, expression);
-			    find = true;
-			} catch (InvalidParamException e) {}
+		try {
+		    width = new CssBorderRightWidth(ac, expression);
+		    find = true;
+		} catch (InvalidParamException e) {
+		    // nothing to do, style will test this value
+		}
 	    }
 
 	    if (!find && style == null) {
-			try {
-			    style = new CssBorderRightStyle(ac, expression);
-			    find = true;
-			}
-			catch (InvalidParamException e) {}
+		try {
+		    style = new CssBorderRightStyle(ac, expression);
+		    find = true;
+		}
+		catch (InvalidParamException e) {
+		    // nothing to do, color will test this value
+		}
 	    }
 
 	    if (!find && color == null) {
-			try {
-			    color = new CssBorderRightColor(ac, expression);
-			    find = true;
-			}
-			catch (InvalidParamException e) {}
+		try {
+		    color = new CssBorderRightColor(ac, expression);
+		    find = true;
+		}
+		catch(InvalidParamException e) {
+		    // nothing to do, uri will test this value
+		}
 	    }
 
 	    if (!find && uri == null) {
-			if (val instanceof CssURL) {
-				uri = val;
-				find = true;
-			}
+		if (val instanceof CssURL) {
+		    uri = val;
+		    find = true;
 		}
+		else {
+		    throw new InvalidParamException("unrecognize", ac);
+		}
+	    }
 	}
-
+	/*
 	if (width == null)
 	    width = new CssBorderRightWidth();
 	if (style == null)
 	    style = new CssBorderRightStyle();
 	if (color == null)
 	    color = new CssBorderRightColor();
+	*/
     }
 
+    public CssBorderRight(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression,false);
+    }
+    
     /**
      * Returns the value of this property
      */
@@ -197,11 +235,27 @@
      * Returns a string representation of the object.
      */
     public String toString() {
-	String ret = width + " " + style;
-	if (!color.face.isDefault())
-	    ret += " " + color;
+	String ret = "";
+	if(width != null) {
+	    ret += width;
+	}
+	if(style != null) {
+	    if(!ret.equals("")) {
+		ret += " ";
+	    }
+	    ret += style;
+	}
+	if(color != null) {
+	    if(!ret.equals("")) {
+		ret += " ";
+	    }
+	    ret += color;
+	}
 	if (uri != null) {
-		ret += " " + uri.toString();
+	    if(!ret.equals("")) {
+		ret += " ";
+	    }
+	    ret += " " + uri.toString();
 	}
 	return ret;
     }
@@ -218,9 +272,15 @@
      * Overrides this method for a macro
      */
     public void setImportant() {
-	width.important = true;
-	style.important = true;
-	color.important = true;
+	if(width != null) {
+	    width.important = true;
+	}
+	if(style != null) {
+	    style.important = true;
+	}
+	if(color != null) {
+	    color.important = true;
+	}
     }
 
     /**
@@ -260,37 +320,23 @@
     }
 
     /**
-     * Set the context.
-     * Overrides this method for a macro
+     * Add this property to the CssStyle
      *
-     * @see org.w3c.css.css.CssCascadingOrder#order
-     * @see org.w3c.css.css.StyleSheetParser#handleRule
+     * @param style The CssStyle
      */
-    public void setSelectors(CssSelectors selector) {
-	super.setSelectors(selector);
-	if (width != null) {
-	    width.setSelectors(selector);
+    public void addToStyle(ApplContext ac, CssStyle style) {	
+	if(width != null) {
+	    width.addToStyle(ac, style);
 	}
-	if (style != null) {
-	    style.setSelectors(selector);
+	if(this.style != null) {
+	    this.style.addToStyle(ac, style);
 	}
-	if (color != null) {
-	    color.setSelectors(selector);
+	if(color != null) {
+	    color.addToStyle(ac, style);
 	}
     }
 
     /**
-     * Add this property to the CssStyle
-     *
-     * @param style The CssStyle
-     */
-    public void addToStyle(ApplContext ac, CssStyle style) {
-	width.addToStyle(ac, style);
-	this.style.addToStyle(ac, style);
-	color.addToStyle(ac, style);
-    }
-
-    /**
      * Get this property in the style.
      *
      * @param style The style where the property is
@@ -312,10 +358,36 @@
      * @param source The source file where this property is defined
      */
     public void setInfo(int line, String source) {
-	super.setInfo(line, source);
-	width.setInfo(line, source);
-	style.setInfo(line, source);
-	color.setInfo(line, source);
+	super.setInfo(line, source);	
+	if(width != null) {
+	    width.setInfo(line, source);
+	}
+	if(style != null) {
+	    style.setInfo(line, source);
+	}
+	if(color != null) {
+	    color.setInfo(line, source);
+	}
+    }
+    
+    /**
+     * Set the context.
+     * Overrides this method for a macro
+     *
+     * @see org.w3c.css.css.CssCascadingOrder#order
+     * @see org.w3c.css.css.StyleSheetParser#handleRule
+     */
+    public void setSelectors(CssSelectors selector) {
+	super.setSelectors(selector);
+	if (width != null) {
+	    width.setSelectors(selector);
+	}
+	if (style != null) {
+	    style.setSelectors(selector);
+	}
+	if (color != null) {
+	    color.setSelectors(selector);
+	}
     }
 
     /**
@@ -326,14 +398,15 @@
     public boolean equals(CssProperty property) {
 	if (property instanceof CssBorderRight) {
 	    CssBorderRight right = (CssBorderRight) property;
-	    return (width.equals(right.width) &&
-		    style.equals(right.style) && color.equals(right.color));
+	    return (width != null && width.equals(right.width) &&
+		    style != null && style.equals(right.style) &&
+		    color != null && color.equals(right.color));
 	} else {
 	    return false;
 	}
     }
 
-    void check() {
+    void check() {	
 	if ((style != null)
 	    && (style.face.value == 0)) {
 	    if (width != null) {

Index: CssMinWidth.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssMinWidth.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssMinWidth.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssMinWidth.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -9,14 +9,13 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssLength;
+import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssPercentage;
-import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  */
@@ -36,7 +35,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssMinWidth(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssMinWidth(ApplContext ac, CssExpression expression, boolean check)
+    	throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	
 	setByUser();
@@ -60,6 +65,11 @@
 	expression.next();
     }
     
+    public CssMinWidth(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property.
      */

Index: CssBorderRightCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderRightCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderRightCSS2.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderRightCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -31,14 +41,14 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssPrinterStyle;
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssSelectors;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssLength;
 import org.w3c.css.values.CssOperator;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -90,56 +100,76 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssBorderRightCSS2(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssBorderRightCSS2(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
 	CssValue val = null;
 	char op = SPACE;
 	boolean find = true;
 	
+	if(check && expression.getCount() > 3) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
+	boolean manyValues = (expression.getCount() > 1);
+	
 	setByUser();
+	
 	while (find) {
 	    find = false;
-	    val = expression.getValue();
-	    op = expression.getOperator();
-	    
+	    val = expression.getValue();	    
+	    op = expression.getOperator();	    
 	    if (val == null)
 		break;
 	    
+	    // if there are many values, we can't have inherit as one of them
+	    if(manyValues && val.equals(inherit)) {
+		throw new InvalidParamException("unrecognize", null, null, ac);
+	    }
+	    
 	    if (op != SPACE)
 		throw new InvalidParamException("operator", 
 						((new Character(op)).toString()),
-						ac);
-	    
+						ac);   
 	    if (width == null) {
 		try {
-		    width = new CssBorderRightWidthCSS2(ac, expression);
+		    width = new CssBorderRightWidthCSS2(ac, expression);		
 		    find = true;
-		} catch (InvalidParamException e) {
+		} catch(InvalidParamException e){
+		    // nothing to do, style will test this value		    
 		}
 	    }
 	    if (!find && style == null) {
 		try {
-		    style = new CssBorderRightStyleCSS2(ac, expression);
+		    style = new CssBorderRightStyleCSS2(ac, expression);		    
 		    find = true;
-		}
-		catch (InvalidParamException e) {
+		} catch(InvalidParamException e){
+		    // nothing to do, color will test this value
 		}
 	    }
 	    if (!find && color == null) {
-		try {
-		    color = new CssBorderRightColorCSS2(ac, expression);
-		    find = true;
-		}
-		catch (InvalidParamException e) {
-		}
+		// throws an exception if the value is not valid
+		color = new CssBorderRightColorCSS2(ac, expression);
+		find = true;		
 	    }
 	}
 	
-	if (width == null)
+	//if some values have not been set, we set them with their default ones
+	/*
+	if (width == null) {
 	    width = new CssBorderRightWidthCSS2();
-	if (style == null)
-	    style = new CssBorderRightStyleCSS2();
-	if (color == null)
-	    color = new CssBorderRightColorCSS2();
+	}
+	if (style == null) {
+	    style = new CssBorderRightStyleCSS2();	    
+	}	
+	if (color == null) {
+	    color = new CssBorderRightColorCSS2();	    
+	}
+	*/
+    }
+    
+    public CssBorderRightCSS2(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression,false);
     }
     
     /**
@@ -186,9 +216,22 @@
      * Returns a string representation of the object.
      */
     public String toString() {
-	String ret = width + " " + style;
-	if (!color.face.isDefault())
-	    ret += " " + color;
+	String ret = "";
+	if(width != null) {
+	    ret += width;
+	}
+	if(style != null) {
+	    if(!ret.equals("")) {
+		ret += " ";
+	    }
+	    ret += style;
+	}
+	if(color != null) {
+	    if(!ret.equals("")) {
+		ret += " ";
+	    }
+	    ret += color;
+	}
 	return ret;
     }
     
@@ -204,9 +247,15 @@
      * Overrides this method for a macro
      */  
     public void setImportant() {
-	width.important = true;
-	style.important = true;
-	color.important = true;
+	if(width != null) {
+	    width.important = true;
+	}
+	if(style != null) {
+	    style.important = true;
+	}
+	if(color != null) {
+	    color.important = true;
+	}
     }
     
     /**
@@ -270,10 +319,16 @@
      *
      * @param style The CssStyle
      */
-    public void addToStyle(ApplContext ac, CssStyle style) {
-	width.addToStyle(ac, style);
-	this.style.addToStyle(ac, style);
-	color.addToStyle(ac, style);
+    public void addToStyle(ApplContext ac, CssStyle style) {	
+	if(width != null) {
+	    width.addToStyle(ac, style);
+	}
+	if(this.style != null) {
+	    this.style.addToStyle(ac, style);
+	}
+	if(color != null) {
+	    color.addToStyle(ac, style);
+	}
     }
     
     /**
@@ -298,10 +353,16 @@
      * @param source The source file where this property is defined
      */  
     public void setInfo(int line, String source) {
-	super.setInfo(line, source);
-	width.setInfo(line, source);
-	style.setInfo(line, source);
-	color.setInfo(line, source);
+	super.setInfo(line, source);	
+	if(width != null) {
+	    width.setInfo(line, source);
+	}
+	if(style != null) {
+	    style.setInfo(line, source);
+	}
+	if(color != null) {
+	    color.setInfo(line, source);
+	}
     }
     
     /**
@@ -312,8 +373,9 @@
     public boolean equals(CssProperty property) {
 	if (property instanceof CssBorderRightCSS2) {
 	    CssBorderRightCSS2 right = (CssBorderRightCSS2) property;
-	    return (width.equals(right.width) && 
-		    style.equals(right.style) && color.equals(right.color));
+	    return (width != null && width.equals(right.width) && 
+		    style != null && style.equals(right.style) &&
+		    color != null && color.equals(right.color));
 	} else {
 	    return false;
 	}

Index: CssBorderTopColorCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderTopColorCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderTopColorCSS1.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderTopColorCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -21,12 +31,12 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssPrinterStyle;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
 import org.w3c.css.values.CssValue;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  * Be careful, this is not a CSS1 property !
@@ -59,12 +69,22 @@
      * @param expression The expression fir this property
      * @exception InvalidParamException Values are incorrect
      */
-    public CssBorderTopColorCSS1(ApplContext ac, CssExpression expression) 
-	throws InvalidParamException {
+    public CssBorderTopColorCSS1(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
 	face = new CssBorderFaceColorCSS1(ac, expression);
     }
     
+    public CssBorderTopColorCSS1(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression,false);
+    }
+    
     /**
      * Returns the value of this property
      */
@@ -87,7 +107,10 @@
      * Returns a string representation of the object.
      */
     public String toString() {
-	return face.toString();
+	if(face != null) {
+	    return face.toString();
+	}
+	return "";
     }
     
     /**
@@ -140,7 +163,7 @@
      * @see #print(CssPrinterStyle)
      */  
     public void print(CssPrinterStyle printer) {
-	if (!face.isDefault())
+	if (face != null && !face.isDefault())
 	    printer.print(this);
     }
     

Index: CssMargin.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssMargin.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CssMargin.java	20 Oct 2003 13:15:49 -0000	1.3
+++ CssMargin.java	8 Aug 2005 13:18:12 -0000	1.4
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.4  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.3  2003/10/20 13:15:49  ylafon
  * formatting
  *
@@ -39,14 +49,13 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
-import org.w3c.css.parser.CssSelectors;
 import org.w3c.css.parser.CssPrinterStyle;
+import org.w3c.css.parser.CssSelectors;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
 import org.w3c.css.values.CssOperator;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  *   <H4>
@@ -107,13 +116,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssMargin(ApplContext ac, CssExpression expression)  
+    public CssMargin(ApplContext ac, CssExpression expression, boolean check)  
 	throws InvalidParamException {
 	
-	CssValue val = expression.getValue();
+	//CssValue val = expression.getValue();
 	setByUser();
 
-	if (val.equals(inherit)) {
+	/*if (val.equals(inherit)) {
 	    inheritedValue = true;
 	    top = new CssMarginTop();
 	    top.value = inherit;
@@ -123,8 +132,7 @@
 	    right.value = inherit;
 	    left = new CssMarginLeft();
 	    left.value = inherit;
-	}
-	
+	}*/	
 	switch (expression.getCount()) {
 	case 1:
 	    top = new CssMarginTop(ac, expression);
@@ -134,38 +142,84 @@
 	    break;
 	case 2:
 	    if (expression.getOperator() != SPACE)
-		return;
+		throw new InvalidParamException("operator",
+			((new Character(expression.getOperator())).toString()),
+			ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    top = new CssMarginTop(ac, expression);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    right = new CssMarginRight(ac, expression);
 	    bottom = new CssMarginBottom(top);
 	    left = new CssMarginLeft(right);
 	    break;
 	case 3:
 	    if (expression.getOperator() != SPACE)
-		return;
+		throw new InvalidParamException("operator",
+			((new Character(expression.getOperator())).toString()),
+			ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    top = new CssMarginTop(ac, expression);
 	    if (expression.getOperator() != SPACE)
-		return;
+		throw new InvalidParamException("operator",
+			((new Character(expression.getOperator())).toString()),
+			ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    right = new CssMarginRight(ac, expression);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    bottom = new CssMarginBottom(ac, expression);
 	    left = new CssMarginLeft(right);
 	    break;
 	case 4:
 	    if (expression.getOperator() != SPACE)
-		return;
+		throw new InvalidParamException("operator",
+			((new Character(expression.getOperator())).toString()),
+			ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    top = new CssMarginTop(ac, expression);
 	    if (expression.getOperator() != SPACE)
-		return;
+		throw new InvalidParamException("operator",
+			((new Character(expression.getOperator())).toString()),
+			ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    right = new CssMarginRight(ac, expression);
 	    if (expression.getOperator() != SPACE)
-		return;
+		throw new InvalidParamException("operator",
+			((new Character(expression.getOperator())).toString()),
+			ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    bottom = new CssMarginBottom(ac, expression);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    left = new CssMarginLeft(ac, expression);
 	    break;
 	default:
+	    if(check)
+		throw new InvalidParamException("unrecognize", ac);
 	}
     }
     
+    public CssMargin(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */
@@ -235,10 +289,18 @@
      * Overrides this method for a macro
      */  
     public void setImportant() {
-	top.important = true;
-	right.important = true;
-	bottom.important = true;
-	left.important = true;
+	if(top != null) {
+	    top.important = true;
+	}
+	if(right != null) {
+	    right.important = true;
+	}
+	if(bottom != null) {
+	    bottom.important = true;
+	}
+	if(left != null) {
+	    left.important = true;
+	}
     }
     
     /**
@@ -312,10 +374,18 @@
      */
     public void addToStyle(ApplContext ac, CssStyle style) {
 	((Css1Style) style).cssMargin.inheritedValue = inheritedValue;
-	top.addToStyle(ac, style);
-	right.addToStyle(ac, style);
-	bottom.addToStyle(ac, style);
-	left.addToStyle(ac, style);
+	if(top != null) {
+	    top.addToStyle(ac, style);
+	}
+	if(right != null) {
+	    right.addToStyle(ac, style);
+	}
+	if(bottom != null) {
+	    bottom.addToStyle(ac, style);
+	}
+	if(left != null) {
+	    left.addToStyle(ac, style);
+	}
     }
     
     /**

Index: CssFontSizeAdjustCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssFontSizeAdjustCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssFontSizeAdjustCSS2.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssFontSizeAdjustCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -13,12 +23,12 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssNumber;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *
@@ -44,8 +54,14 @@
      * @param expression the font size-adjust
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssFontSizeAdjustCSS2(ApplContext ac, CssExpression expression) 
+    public CssFontSizeAdjustCSS2(ApplContext ac, CssExpression expression,
+	    boolean check)    
 	throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	setByUser();
 
@@ -63,6 +79,11 @@
 	expression.next();
     }
     
+    public CssFontSizeAdjustCSS2(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }	
+    
     /**
      * Returns the current value
      */  

Index: CssBackgroundImageMob.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBackgroundImageMob.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBackgroundImageMob.java	8 Apr 2002 21:17:42 -0000	1.2
+++ CssBackgroundImageMob.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:42  plehegar
  * New
  *
@@ -38,12 +48,12 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssURL;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -83,9 +93,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssBackgroundImageMob(ApplContext ac, CssExpression expression) 
-	throws InvalidParamException {
+    public CssBackgroundImageMob(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
 	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+
 	setByUser();
 
 	CssValue val = expression.getValue();
@@ -104,6 +118,11 @@
 	}
     }
     
+    public CssBackgroundImageMob(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */
@@ -116,14 +135,20 @@
      * e.g. his value equals inherit
      */
     public boolean isSoftlyInherited() {
-	return url.equals(inherit);
+	if (url != null) {
+	    return url.equals(inherit);
+	}
+	return false;
     }
     
     /**
      * Returns a string representation of the object.
      */
     public String toString() {
-	return url.toString();
+	if (url != null) {
+	    return url.toString();
+	}
+	return "";
     }
     
     /**
@@ -165,8 +190,10 @@
      * @param value The other property.
      */  
     public boolean equals(CssProperty property) {
-	return (property instanceof CssBackgroundImageMob && 
-		url.equals(((CssBackgroundImageMob) property).url));
+	return ((url == null && property == null) ||
+		(property instanceof CssBackgroundImageMob && 
+		url != null &&
+		url.equals(((CssBackgroundImageMob) property).url)));
     }
     
     /**

Index: CssFontCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssFontCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssFontCSS2.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssFontCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -22,14 +32,16 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssPrinterStyle;
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssSelectors;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
+import org.w3c.css.values.CssLength;
 import org.w3c.css.values.CssOperator;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssPercentage;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -115,16 +127,21 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssFontCSS2(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssFontCSS2(ApplContext ac, CssExpression expression, boolean check)
+    	throws InvalidParamException {
+	
 	CssValue val = expression.getValue();
 	char op = SPACE;
 	boolean find = true;
 	int max_values = 3;
-	int normal = "normal".hashCode();
+	//int normal = "normal".hashCode();
 	
 	if (val instanceof CssIdent) {
 	    CssIdent ident = checkIdent((CssIdent) val);
 	    if (ident != null) {
+		if(expression.getCount() > 1) {
+		    throw new InvalidParamException("unrecognize", ac);
+		}
 		value = ident;
 		expression.next();
 		return;
@@ -134,15 +151,19 @@
 	while (find && max_values-- > 0) {
 	    find = false;
 	    val = expression.getValue();
-	    op = expression.getOperator();
+	    op = expression.getOperator();	    	    	    
 	    
 	    if (val == null) {
 		throw new InvalidParamException("few-value", getPropertyName(), ac);
 	    }
 	    
+	    if(val.equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    
 	    if (fontStyle == null) {
 		try {
-		    fontStyle = new CssFontStyleCSS2(ac, expression);
+		    fontStyle = new CssFontStyleCSS2(ac, expression);		    
 		    find = true;
 		} catch (InvalidParamException e) {
 		}
@@ -159,15 +180,17 @@
 		    fontWeight = new CssFontWeightCSS2(ac, expression);
 		    find = true;
 		} catch (InvalidParamException e) {
+		    // we have now (or not)
+		    // [ 'font-style' || 'font-variant' || 'font-weight' ]?
+		    break;
 		}
 	    }
 	    if (find && op != SPACE) {
 		throw new InvalidParamException("operator", 
 						((new Character(op)).toString()), ac);
-	    }
-	    
+	    }	    
 	}
-	
+	/*
 	if (fontStyle == null) {
 	    fontStyle = new CssFontStyleCSS2();
 	}
@@ -177,34 +200,46 @@
 	if (fontWeight == null) {
 	    fontWeight = new CssFontWeightCSS2();
 	}
-	
+	*/
 	val = expression.getValue();
-	op = expression.getOperator();
-	
+	op = expression.getOperator();	
 	    
 	if (val == null) {
 	    throw new InvalidParamException("few-value", getPropertyName(), ac);
 	}
 	    
+	if(val.equals(inherit)) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+		
 	fontSize = new CssFontSizeCSS2(ac, expression);
 	
 	if (op == SLASH) {
 	    op = expression.getOperator();
 	    lineHeight = new CssLineHeightCSS2(ac, expression);
-	} else {
-	    lineHeight = new CssLineHeightCSS2();
-	}
+	} 
+//	else {
+//	    lineHeight = new CssLineHeightCSS2();
+//	}
 	
-	if (op == SPACE && expression.getValue() != null) {
-	    fontFamily = new CssFontFamilyCSS2(ac, expression);
+	if(expression.getValue().equals(inherit)) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+
+	if (op == SPACE && expression.getValue() != null) {	    
+	    fontFamily = new CssFontFamilyCSS2(ac, expression, true);
 	} else {
 	    expression.starts();
 	    throw new InvalidParamException("few-value", expression.toString(), ac);
-	}
-
+	}	
 	setByUser();
     }
     
+    public CssFontCSS2(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */
@@ -220,17 +255,19 @@
 	    return value.toString();
 	} else {
 	    String ret = "";
-	    if (fontStyle.isByUser()) {
+	    if (fontStyle != null) {
 		ret += " " + fontStyle;
 	    }
-	    if (fontVariant.isByUser()) {
+	    if (fontVariant != null) {
 		ret += " " + fontVariant;
 	    }
-	    if (fontWeight.isByUser()) {
+	    if (fontWeight != null) {
 		ret += " " + fontWeight;
 	    }
-	    ret += " " + fontSize;
-	    if (lineHeight.isByUser()) {
+	    if(fontSize != null) {
+		ret += " " + fontSize;
+	    }
+	    if (lineHeight != null) {
 		ret += "/" + lineHeight;
 	    }
 	    if (fontFamily.size() != 0) {
@@ -247,12 +284,18 @@
     public void setImportant() {
 	super.setImportant();
 	if (value == null) {
-	    fontStyle.important = true;
-	    fontVariant.important = true;
-	    fontWeight.important = true;
-	    fontSize.important = true;
-	    lineHeight.important = true;
-	    fontFamily.important = true;
+	    if(fontStyle != null)
+		fontStyle.important = true;
+	    if(fontVariant != null)
+		fontVariant.important = true;
+	    if(fontWeight != null)
+		fontWeight.important = true;
+	    if(fontSize != null)
+		fontSize.important = true;
+	    if(lineHeight != null)
+		lineHeight.important = true;
+	    if(fontFamily != null)
+		fontFamily.important = true;
 	}
     }
     
@@ -326,12 +369,18 @@
 	if (value != null) {
 	    ((Css1Style) style).cssFontCSS2.value = value;
 	} else {
-	    fontStyle.addToStyle(ac, style);
-	    fontVariant.addToStyle(ac, style);
-	    fontSize.addToStyle(ac, style);
-	    fontWeight.addToStyle(ac, style);
-	    lineHeight.addToStyle(ac, style);
-	    fontFamily.addToStyle(ac, style);
+	    if(fontStyle != null)
+		fontStyle.addToStyle(ac, style);
+	    if(fontVariant != null)
+		fontVariant.addToStyle(ac, style);
+	    if(fontSize != null)
+		fontSize.addToStyle(ac, style);
+	    if(fontWeight != null)
+		fontWeight.addToStyle(ac, style);
+	    if(lineHeight != null)
+		lineHeight.addToStyle(ac, style);
+	    if(fontFamily != null)
+		fontFamily.addToStyle(ac, style);
 	}
     }
     
@@ -345,12 +394,18 @@
     public void setInfo(int line, String source) {
 	super.setInfo(line, source);
 	if (value == null) {
-	    fontStyle.setInfo(line, source);
-	    fontVariant.setInfo(line, source);
-	    fontWeight.setInfo(line, source);
-	    fontSize.setInfo(line, source);
-	    lineHeight.setInfo(line, source);
-	    fontFamily.setInfo(line, source);
+	    if(fontStyle != null)
+		fontStyle.setInfo(line, source);
+	    if(fontVariant != null)
+		fontVariant.setInfo(line, source);
+	    if(fontWeight != null)
+		fontWeight.setInfo(line, source);
+	    if(fontSize != null)
+		fontSize.setInfo(line, source);
+	    if(lineHeight != null)
+		lineHeight.setInfo(line, source);
+	    if(fontFamily != null)
+		fontFamily.setInfo(line, source);
 	}
     }
     
@@ -415,7 +470,7 @@
 
     private CssIdent checkIdent(CssIdent ident) {
 	int hash = ident.hashCode();
-	for (int i = 0; i < FONT.length; i++) {
+	for (int i = 0; i < CssFontConstantCSS2.FONT.length; i++) {
 	    if (hash_values[i] == hash) {
 		return ident;
 	    }
@@ -425,9 +480,9 @@
     }
 
     static {
-	hash_values = new int[FONT.length];
-	for (int i=0; i<FONT.length; i++)
-	    hash_values[i] = FONT[i].hashCode();
+	hash_values = new int[CssFontConstantCSS2.FONT.length];
+	for (int i=0; i<CssFontConstantCSS2.FONT.length; i++)
+	    hash_values[i] = CssFontConstantCSS2.FONT[i].hashCode();
     }
 }
 

Index: CssBorderRightStyleCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderRightStyleCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderRightStyleCSS2.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderRightStyleCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -22,114 +32,132 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
-import org.w3c.css.values.CssExpression;
-import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
+import org.w3c.css.values.CssExpression;
 
 /**
  * Be careful, this is not a CSS1 property !
  * @version $Revision$
  */
 public class CssBorderRightStyleCSS2 extends CssProperty {
-
-  CssBorderFaceStyleCSS2 face;
-  
-  /**
-   * Create a new CssBorderRightStyleCSS2
-   */
-  public CssBorderRightStyleCSS2() {
+    
+    CssBorderFaceStyleCSS2 face;
+    
+    /**
+     * Create a new CssBorderRightStyleCSS2
+     */
+    public CssBorderRightStyleCSS2() {
 	setByUser();
-
-    face = new CssBorderFaceStyleCSS2();
-  }
-  
-  /**
-   * Create a new CssBorderRightStyle with an another CssBorderFaceStyle
-   *
-   * @param another The another side.
-   */
-  public CssBorderRightStyleCSS2(CssBorderFaceStyleCSS2 another) {
+	
+	face = new CssBorderFaceStyleCSS2();
+    }
+    
+    /**
+     * Create a new CssBorderRightStyle with an another CssBorderFaceStyle
+     *
+     * @param another The another side.
+     */
+    public CssBorderRightStyleCSS2(CssBorderFaceStyleCSS2 another) {
 	setByUser();
-
-    face = another;
-  }
-  
-  /**
-   * Create a new CssBorderRightStyleCSS2
-   *
-   * @param expression The expression for this property.
-   * @exception InvalidParamException Values are incorrect
-   */
-  public CssBorderRightStyleCSS2(ApplContext ac, CssExpression expression) 
-    throws InvalidParamException {
-
-      setByUser();
-
-    face = new CssBorderFaceStyleCSS2(ac, expression);
-  }
-  
-  /**
-   * Returns the value of this property
-   */
-  public Object get() {
-    return face;
-  }
-
-  /**
-   * Returns the value
-   */
-  public String getStyle() {
-    return face.getStyle();
-  }
-
-  /**
-   * Returns a string representation of the object.
-   */
-  public String toString() {
-    return face.toString();
-  }
-
-  /**
-   * Returns the name of this property
-   */  
-  public String getPropertyName() {
-    return "border-right-style";
-  }
-
-  /**
-   * Add this property to the CssStyle.
-   *
-   * @param style The CssStyle
-   */
-  public void addToStyle(ApplContext ac, CssStyle style) {
-    CssBorderRightCSS2 right = ((Css1Style) style).cssBorderCSS2.right;
-    if (right.style != null)
-      style.addRedefinitionWarning(ac, this);
-    right.style = this;
-  }
-
-  /**
-   * Get this property in the style.
-   *
-   * @param style The style where the property is
-   * @param resolve if true, resolve the style to find this property
-   */  
-  public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
-    if (resolve) {
-      return ((Css1Style) style).getBorderRightStyleCSS2();
-    } else {
-      return ((Css1Style) style).cssBorderCSS2.getRight().style;
+	
+	face = another;
     }
-  }
-
-  /**
-   * Compares two properties for equality.
-   *
-   * @param value The other property.
-   */  
-  public boolean equals(CssProperty property) {
-    return (property instanceof CssBorderRightStyleCSS2 && 
-	    face.equals(((CssBorderRightStyleCSS2) property).face));
-  }
-
+    
+    /**
+     * Create a new CssBorderRightStyleCSS2
+     *
+     * @param expression The expression for this property.
+     * @exception InvalidParamException Values are incorrect
+     */
+    public CssBorderRightStyleCSS2(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
+	setByUser();
+	
+	face = new CssBorderFaceStyleCSS2(ac, expression);
+    }
+    
+    public CssBorderRightStyleCSS2(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression,false);
+    }
+    
+    /**
+     * Returns the value of this property
+     */
+    public Object get() {
+	return face;
+    }
+    
+    /**
+     * Returns the value
+     */
+    /**
+     * Return the value of this property
+     */
+    public String getStyle() {
+	if(face != null) {
+	    return face.getStyle();
+	}
+	return null;
+    }
+    
+    /**
+     * Returns a string representation of the object.
+     */
+    public String toString() {
+	if(face != null) {
+	    return face.toString();
+	}
+	return "";
+    }
+    
+    /**
+     * Returns the name of this property
+     */  
+    public String getPropertyName() {
+	return "border-right-style";
+    }
+    
+    /**
+     * Add this property to the CssStyle.
+     *
+     * @param style The CssStyle
+     */
+    public void addToStyle(ApplContext ac, CssStyle style) {
+	CssBorderRightCSS2 right = ((Css1Style) style).cssBorderCSS2.right;
+	if (right.style != null)
+	    style.addRedefinitionWarning(ac, this);
+	right.style = this;
+    }
+    
+    /**
+     * Get this property in the style.
+     *
+     * @param style The style where the property is
+     * @param resolve if true, resolve the style to find this property
+     */  
+    public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
+	if (resolve) {
+	    return ((Css1Style) style).getBorderRightStyleCSS2();
+	} else {
+	    return ((Css1Style) style).cssBorderCSS2.getRight().style;
+	}
+    }
+    
+    /**
+     * Compares two properties for equality.
+     *
+     * @param value The other property.
+     */  
+    public boolean equals(CssProperty property) {
+	return (property instanceof CssBorderRightStyleCSS2 && 
+		face.equals(((CssBorderRightStyleCSS2) property).face));
+    }
+    
 }

Index: CssTop.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssTop.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssTop.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssTop.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -9,9 +9,9 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
-import org.w3c.css.values.CssExpression;
-import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
+import org.w3c.css.values.CssExpression;
 
 /**
  */
@@ -30,8 +30,14 @@
    * @param expression The expression for this property.
    * @exception InvalidParamException Values are incorrect
    */
-  public CssTop(ApplContext ac, CssExpression expression) throws InvalidParamException {
-    super(ac, expression);
+  public CssTop(ApplContext ac, CssExpression expression,boolean check)
+  	throws InvalidParamException {
+    super(ac, expression, check);
+  }
+  
+  public CssTop(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
   }
   
   /**

Index: CssBorderRightWidth.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderRightWidth.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderRightWidth.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderRightWidth.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -22,10 +32,10 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
 import org.w3c.css.values.CssValue;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  *   <H4>
@@ -59,103 +69,118 @@
  * @version $Revision$ 
  */
 public class CssBorderRightWidth extends CssProperty {
-
-  CssBorderFaceWidth face;
-  
-  /**
-   * Create a new CssBorderRightWidth
-   */
-  public CssBorderRightWidth() {
-    face = new CssBorderFaceWidth();
-  }
-  
-  /**
-   * Create a new CssBorderRightWidth with an another CssBorderFaceWidth
-   *
-   * @param another The another side.
-   */
-  public CssBorderRightWidth(CssBorderFaceWidth another) {
+    
+    CssBorderFaceWidth face;
+    
+    /**
+     * Create a new CssBorderRightWidth
+     */
+    public CssBorderRightWidth() {
+	face = new CssBorderFaceWidth();
+    }
+    
+    /**
+     * Create a new CssBorderRightWidth with an another CssBorderFaceWidth
+     *
+     * @param another The another side.
+     */
+    public CssBorderRightWidth(CssBorderFaceWidth another) {
 	setByUser();
-
-    face = another;
-  }
-  
-  /**
-   * Create a new CssBorderRightWidth
-   *
-   * @param expression The expression for this property.
-   * @exception InvalidParamException Values are incorrect
-   */
-  public CssBorderRightWidth(ApplContext ac, CssExpression expression)
-    throws InvalidParamException {
+	
+	face = another;
+    }
     
+    /**
+     * Create a new CssBorderRightWidth
+     *
+     * @param expression The expression for this property.
+     * @exception InvalidParamException Values are incorrect
+     */
+    public CssBorderRightWidth(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
-
-    face = new CssBorderFaceWidth(ac, expression);
-  }
-  
-  /**
-   * Returns the value of this property
-   */
-  public Object get() {
-    return face;
-  }
-
-  /**
-   * Return the value of this property
-   */
-  public CssValue getValue() {
-    return face.getValue();
-  }
-
-  /**
-   * Returns a string representation of the object.
-   */
-  public String toString() {
-    return face.toString();
-  }
-
-  /**
-   * Returns the name of this property
-   */  
-  public String getPropertyName() {
-    return "border-right-width";
-  }
-
-  /**
-   * Add this property to the CssStyle.
-   *
-   * @param style The CssStyle
-   */
-  public void addToStyle(ApplContext ac, CssStyle style) {
-    CssBorderRight right = ((Css1Style) style).cssBorder.right;
-    if (right.width != null)
-      style.addRedefinitionWarning(ac, this);
-    right.width = this;
-  }
-
-  /**
-   * Get this property in the style.
-   *
-   * @param style The style where the property is
-   * @param resolve if true, resolve the style to find this property
-   */  
-  public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
-    if (resolve) {
-      return ((Css1Style) style).getBorderRightWidth();
-    } else {
-      return ((Css1Style) style).cssBorder.getRight().width;
+	
+	face = new CssBorderFaceWidth(ac, expression);
     }
-  }
-
-  /**
-   * Compares two properties for equality.
-   *
-   * @param value The other property.
-   */  
-  public boolean equals(CssProperty property) {
-    return (property instanceof CssBorderRightWidth && 
-	    face.equals(((CssBorderRightWidth) property).face));
-  }
-
+    
+    public CssBorderRightWidth(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression,false);
+    }
+    
+    /**
+     * Returns the value of this property
+     */
+    public Object get() {
+	return face;
+    }
+    
+    /**
+     * Return the value of this property
+     */
+    public CssValue getValue() {
+	if(face != null) {
+	    return face.getValue();
+	}
+	return null;
+    }
+    
+    /**
+     * Returns a string representation of the object.
+     */
+    public String toString() {
+	if(face != null) {
+	    return face.toString();
+	}
+	return "";
+    }
+    
+    /**
+     * Returns the name of this property
+     */  
+    public String getPropertyName() {
+	return "border-right-width";
+    }
+    
+    /**
+     * Add this property to the CssStyle.
+     *
+     * @param style The CssStyle
+     */
+    public void addToStyle(ApplContext ac, CssStyle style) {
+	CssBorderRight right = ((Css1Style) style).cssBorder.right;
+	if (right.width != null)
+	    style.addRedefinitionWarning(ac, this);
+	right.width = this;
+    }
+    
+    /**
+     * Get this property in the style.
+     *
+     * @param style The style where the property is
+     * @param resolve if true, resolve the style to find this property
+     */  
+    public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
+	if (resolve) {
+	    return ((Css1Style) style).getBorderRightWidth();
+	} else {
+	    return ((Css1Style) style).cssBorder.getRight().width;
+	}
+    }
+    
+    /**
+     * Compares two properties for equality.
+     *
+     * @param value The other property.
+     */  
+    public boolean equals(CssProperty property) {
+	return (property instanceof CssBorderRightWidth && 
+		face.equals(((CssBorderRightWidth) property).face));
+    }
+    
 }

Index: CssBorderWidth.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderWidth.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderWidth.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderWidth.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -33,14 +43,13 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssPrinterStyle;
 import org.w3c.css.parser.CssSelectors;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssOperator;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  *   <H4>
@@ -107,10 +116,12 @@
      * Create a new CssBorder
      *
      * @param expression The expression for this property
+     * @param check true will test the number of values
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssBorderWidth(ApplContext ac, CssExpression expression)  throws InvalidParamException {
-
+    public CssBorderWidth(ApplContext ac, CssExpression expression, boolean check) 
+    	throws InvalidParamException {	
+	
 	setByUser();
 	switch (expression.getCount()) {
 	case 1:
@@ -122,9 +133,15 @@
 	case 2:
 	    if (expression.getOperator() != SPACE)
 		throw new InvalidParamException("operator", 
-						((new Character(expression.getOperator())).toString()),
-						ac);
+			((new Character(expression.getOperator())).toString()),
+			ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    top = new CssBorderTopWidth(ac, expression);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    right = new CssBorderRightWidth(ac, expression);
 	    bottom = new CssBorderBottomWidth((CssBorderFaceWidth) top.get());
 	    left = new CssBorderLeftWidth((CssBorderFaceWidth) right.get());
@@ -132,38 +149,68 @@
 	case 3:
 	    if (expression.getOperator() != SPACE)
 		throw new InvalidParamException("operator", 
-						((new Character(expression.getOperator())).toString()),
-						ac);
+			((new Character(expression.getOperator())).toString()),
+			ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    top = new CssBorderTopWidth(ac, expression);
 	    if (expression.getOperator() != SPACE)
 		throw new InvalidParamException("operator", 
-						((new Character(expression.getOperator())).toString()),
-						ac);
+			((new Character(expression.getOperator())).toString()),
+			ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    right = new CssBorderRightWidth(ac, expression);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    bottom = new CssBorderBottomWidth(ac, expression);
 	    left = new CssBorderLeftWidth((CssBorderFaceWidth) right.get());
 	    break;
 	default:
+	    // checks the number of parameters
+	    if(check && expression.getCount() > 4) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    if (expression.getOperator() != SPACE)
 		throw new InvalidParamException("operator", 
-						((new Character(expression.getOperator())).toString()),
-						ac);
+			((new Character(expression.getOperator())).toString()),
+			ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    top = new CssBorderTopWidth(ac, expression);
 	    if (expression.getOperator() != SPACE)
 		throw new InvalidParamException("operator", 
-						((new Character(expression.getOperator())).toString()),
-						ac);
+			((new Character(expression.getOperator())).toString()),
+			ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    right = new CssBorderRightWidth(ac, expression);
 	    if (expression.getOperator() != SPACE)
 		throw new InvalidParamException("operator", 
-						((new Character(expression.getOperator())).toString()),
-						ac);
+			((new Character(expression.getOperator())).toString()),
+			ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    bottom = new CssBorderBottomWidth(ac, expression);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    left = new CssBorderLeftWidth(ac, expression);
-	    break;
+	    break;	    
 	}
     }
     
+    public CssBorderWidth(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */
@@ -277,10 +324,18 @@
      * @param style The CssStyle
      */
     public void addToStyle(ApplContext ac, CssStyle style) {
-	top.addToStyle(ac, style);
-	right.addToStyle(ac, style);
-	left.addToStyle(ac, style);
-	bottom.addToStyle(ac, style);
+	if(top != null) {
+	    top.addToStyle(ac, style);
+	}
+	if(right != null) {
+	    right.addToStyle(ac, style);
+	}
+	if(left != null) {
+	    left.addToStyle(ac, style);
+	}
+	if(bottom != null) {
+	    bottom.addToStyle(ac, style);
+	}
     }
     
     /**
@@ -303,10 +358,18 @@
      */  
     public void setInfo(int line, String source) {
 	super.setInfo(line, source);
-	top.setInfo(line, source);
-	right.setInfo(line, source);
-	left.setInfo(line, source);
-	bottom.setInfo(line, source);
+	if(top != null) {
+	    top.setInfo(line, source);
+	}
+	if(right != null) {
+	    right.setInfo(line, source);
+	}
+	if(left != null) {
+	    left.setInfo(line, source);
+	}
+	if(bottom != null) {
+	    bottom.setInfo(line, source);
+	}
     }
     
     /**
@@ -315,7 +378,7 @@
      * @param value The other property.
      */  
     public boolean equals(CssProperty property) {
-	return false;
+	return false; //FIXME
     }
     
 }

Index: CssFontSizeCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssFontSizeCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssFontSizeCSS2.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssFontSizeCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -53,14 +63,14 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.values.CssPercentage;
-import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssLength;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssNumber;
+import org.w3c.css.values.CssPercentage;
+import org.w3c.css.values.CssValue;
 
 
 /**
@@ -137,7 +147,13 @@
      * @param expression the expression of the size
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssFontSizeCSS2(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssFontSizeCSS2(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	setByUser();
 	if (val instanceof CssIdent) {
@@ -182,6 +198,11 @@
 					val, getPropertyName(), ac);
     }
     
+    public CssFontSizeCSS2(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the current value
      */  

Index: CssTextAlignMob.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssTextAlignMob.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssTextAlignMob.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssTextAlignMob.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -31,12 +41,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.values.CssString;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -84,7 +93,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssTextAlignMob(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssTextAlignMob(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	int hash = val.hashCode();
 	
@@ -107,6 +122,11 @@
 	throw new InvalidParamException("value", val.toString(), getPropertyName(), ac);
     }
     
+    public CssTextAlignMob(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssDisplayCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssDisplayCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssDisplayCSS2.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssDisplayCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -31,11 +41,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -105,7 +115,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorect
      */  
-    public CssDisplayCSS2(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssDisplayCSS2(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	
 	setByUser();
@@ -125,6 +141,11 @@
 					getPropertyName(), ac);
     }
     
+    public CssDisplayCSS2(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssBackgroundPositionCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBackgroundPositionCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBackgroundPositionCSS2.java	8 Apr 2002 21:17:42 -0000	1.2
+++ CssBackgroundPositionCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:42  plehegar
  * New
  *
@@ -40,15 +50,15 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.values.CssPercentage;
 import org.w3c.css.values.CssLength;
-import org.w3c.css.values.CssNumber;
+//import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssOperator;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssPercentage;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -129,15 +139,15 @@
 public class CssBackgroundPositionCSS2 extends CssProperty 
         implements CssBackgroundConstants, CssOperator {
     
-    CssValue horizontal;
-    CssValue vertical;
+    CssValue first;
+    CssValue second;
     
     /**
      * Create a new CssBackgroundPositionCSS2
      */
     public CssBackgroundPositionCSS2() {
-	horizontal = DefaultValue0;
-	vertical = DefaultValue0;
+	first = DefaultValue0;
+	second = DefaultValue0;
     }  
     
     /**
@@ -146,12 +156,16 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssBackgroundPositionCSS2(ApplContext ac, CssExpression expression) 
-	throws InvalidParamException {
+    public CssBackgroundPositionCSS2(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 2) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
 	CssValue val = expression.getValue();
 	char op  = expression.getOperator();
-	int index;
 	
 	if (op != SPACE)
 	    throw new  InvalidParamException("operator", 
@@ -159,18 +173,116 @@
 					     ac);
 	
 	if (val.equals(inherit)) {
-	    horizontal = inherit;
-	    vertical = inherit;
+	    if(expression.getCount() > 1) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    first = inherit;
+	    second = inherit;
 	    expression.next();
 	    return;
-	} else if (val instanceof CssIdent 
+	}
+		
+	CssValue next = expression.getNextValue();	
+
+	if(val instanceof CssIdent) {
+	    int index1 = IndexOfIdent((String) val.get());
+	    // two keywords
+	    if(next instanceof CssIdent) {
+		int index2 = IndexOfIdent((String) next.get());
+		// one is vertical, the other is vertical
+		// or the two are 'center'
+		if((isHorizontal(index1) && isVertical(index2)) ||
+			(isHorizontal(index2) && isVertical(index1))) {
+		    first = val;
+		    second = next;		    
+		}
+		// both are horizontal or vertical but not 'center'
+		else if(check){		    
+		    throw new InvalidParamException("incompatible",
+			    val, next, ac);
+		}
+		else {
+		    first = val;
+		}
+	    }
+	    // a keyword and a percentage/length
+	    else if(next instanceof CssLength || next instanceof CssPercentage) {
+		if(isHorizontal(index1)) {
+		    first = val;
+		    second = next;
+		}
+		// if the keyword is the first value, it can only be an 
+		// horizontal one 
+		else {
+		    throw new InvalidParamException("incompatible",
+			    val, next, ac);
+		}
+	    }
+	    // only one value
+	    else if(next == null) {
+		first = val;
+	    }
+	    // the second value is invalid
+	    else if(check) {		
+		throw new InvalidParamException("value", next, 
+			getPropertyName(), ac);
+	    }
+	    else {
+		first = val;
+	    }
+	}
+	else if(val instanceof CssLength || val instanceof CssPercentage) {
+	    // a percentage/length and an keyword
+	    if(next instanceof CssIdent) {
+		int index = IndexOfIdent((String) next.get());
+		// the keyword must be a vertical one
+		if(isVertical(index)) {
+		    first = val;
+		    second = next;
+		}
+		else if(check) {
+		    throw new InvalidParamException("incompatible",
+			    val, next, ac);
+		}
+		else {
+		    first = val;
+		}
+	    }
+	    else if(next instanceof CssLength || next instanceof CssPercentage) {
+		first = val;
+		second = next;
+	    }
+	    else if(next == null || !check) {
+		first = val;
+	    }
+	    else {
+		throw new InvalidParamException("incompatible", val, next, ac);
+	    }
+	}
+	else if(check){
+	    throw new InvalidParamException("value", expression.getValue(), 
+		    getPropertyName(), ac);
+	}
+	
+	// we only move the cursor if we found valid values
+	if(first != null) {	    
+	    expression.next();	    
+	}
+	if(second != null) {	    
+	    expression.next();	    
+	}
+	/*
+	else if (val instanceof CssIdent 
 	    && (index=IndexOfIdent((String) val.get())) != INVALID) {
 	    CssValue next = expression.getNextValue();
 	    expression.next();
 	    if (next == null) {
 		getPercentageFromIdent(index, INVALID);
-	    } else if (next instanceof CssIdent) {
+	    } else if(next instanceof CssIdent) {
 		int index2 = IndexOfIdent((String) next.get());
+		if(next != null && next.equals(inherit)) {
+		    throw new InvalidParamException("unrecognize", ac);
+		}
 		if (index2 != INVALID) {
 		    getPercentageFromIdent(index, index2);
 		    expression.next();
@@ -178,41 +290,87 @@
 		    getPercentageFromIdent(index, INVALID);
 		}
 	    }
+	    else if (next instanceof CssLength || 
+		next instanceof CssPercentage || next instanceof CssNumber) {
+		if (next instanceof CssNumber) {		    
+		    next = ((CssNumber) next).getLength();		    
+		}
+		if(index == POSITION_LEFT || index == POSITION_RIGHT ||
+			index == POSITION_CENTER) {
+		    vertical = next;
+		}
+		else {
+		    throw new InvalidParamException("incompatible", val ,
+			    next , ac);
+		}
+		expression.next();		
+	    }
+	    else {
+		throw new InvalidParamException("incompatible", val ,
+			next , ac);
+	    }
 	} else if (val instanceof CssLength || 
 		   val instanceof CssPercentage || val instanceof CssNumber) {
 	    if (val instanceof CssNumber) {
 		val = ((CssNumber) val).getLength();
 	    }
-	    horizontal = val;
+	    horizontal = val;	    
 	    expression.next();
-	    val = expression.getValue();
-	    if (val instanceof CssLength || 
-		val instanceof CssPercentage || val instanceof CssNumber) {
-		if (val instanceof CssNumber) {
-		    try {
-			val = ((CssNumber) val).getLength();
-		    } catch (InvalidParamException e) {
-			vertical = DefaultValue50;
-			return;
-		    }
+	    CssValue next = expression.getValue();
+	    if(next != null && next.equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    System.out.println(next);
+	    if (next instanceof CssLength || 
+		next instanceof CssPercentage || next instanceof CssNumber) {
+		if (next instanceof CssNumber) {		    
+		    next = ((CssNumber) next).getLength();		    
 		}
-		vertical = val;
-		expression.next();
-	    } else
-		vertical = DefaultValue50;
+		vertical = next;
+		expression.next();		
+	    }
+	    else if(next instanceof CssIdent) {
+		int index2 = IndexOfIdent((String) next.get());
+		if(index2 == POSITION_TOP || index2 == POSITION_BOTTOM ||
+			index2 == POSITION_CENTER) {
+		    getPercentageFromIdent(INVALID, index2);
+		    horizontal = val;
+		}
+		else {
+		    throw new InvalidParamException("incompatible",
+			    horizontal, next, ac);
+		}
+	    }
+	    else if(next != null) {		
+		throw new InvalidParamException("incompatible",
+			horizontal, val, ac);
+	    }	    
 	} else {
 	    throw new InvalidParamException("value", expression.getValue(), 
 					    getPropertyName(), ac);
-	}
-
-	
+	}*/	
+    }
+    
+    private boolean isHorizontal(int index) {
+	return index == POSITION_LEFT || index == POSITION_RIGHT ||
+		index == POSITION_CENTER;
+    }
+    
+    private boolean isVertical(int index) {
+	return index == POSITION_TOP || index == POSITION_BOTTOM ||
+	index == POSITION_CENTER;
+    }
+    
+    public CssBackgroundPositionCSS2(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
     }
     
     /**
      * Returns the value of this property
      */
     public Object get() {
-	return horizontal;
+	return first;
     }
     
     /**
@@ -226,14 +384,14 @@
      * Returns the horizontal value of the position
      */
     public CssValue getHorizontalPosition() {
-	return horizontal;
+	return first;
     }
     
     /**
      * Returns the vertical value of the position
      */
     public CssValue getVerticalPosition() {
-	return vertical;
+	return second;
     }
 
     /**
@@ -241,20 +399,31 @@
      * e.g. his value equals inherit
      */
     public boolean isSoftlyInherited() {
-	return horizontal == inherit;
+	return first == inherit;
     }
     
     /**
      * Returns a string representation of the object.
      */
     public String toString() {
-	if (horizontal == inherit) {
+	if (first == inherit) {
 	    return inherit.toString();
 	} else {
-	    return horizontal + " " + vertical;
+	    String ret = "";
+	    if (first != null) {
+		ret += first;
+	    }
+	    if (second != null) {
+		if (!ret.equals("")) {
+		    ret += " ";
+		}
+		ret += second;
+	    }
+
+	    return ret;
 	}
     }
-    
+    /*
     private void getPercentageFromIdent(int first, int second) {
 	horizontal = DefaultValue50;
 	vertical = DefaultValue50;
@@ -267,7 +436,7 @@
 	if (first == POSITION_BOTTOM || second == POSITION_BOTTOM)
 	    vertical = DefaultValue100;
     }
-    
+    */
     /**
      * Add this property to the CssStyle.
      *
@@ -301,8 +470,8 @@
      */  
     public boolean equals(CssProperty property) {
 	return (property instanceof CssBackgroundPositionCSS2 && 
-		horizontal.equals(((CssBackgroundPositionCSS2) property).horizontal)
-		&& vertical.equals(((CssBackgroundPositionCSS2) property).vertical));
+		first.equals(((CssBackgroundPositionCSS2) property).first)
+		&& second.equals(((CssBackgroundPositionCSS2) property).second));
     }
     
     /**
@@ -310,7 +479,7 @@
      * It is used by all macro for the function <code>print</code>
      */  
     public boolean isDefault() {
-	return horizontal.equals(DefaultValue0) && vertical.equals(DefaultValue0);
+	return first.equals(DefaultValue0) && second.equals(DefaultValue0);
     }
     
     private int IndexOfIdent(String ident) throws InvalidParamException {
@@ -324,10 +493,10 @@
     
     private static int[] hash_values;
     
-    private static int INVALID = -1;
+    //private static int INVALID = -1;
     private static CssPercentage DefaultValue0 = new CssPercentage(0);
-    private static CssPercentage DefaultValue50 = new CssPercentage(50);
-    private static CssPercentage DefaultValue100 = new CssPercentage(100);
+    //private static CssPercentage DefaultValue50 = new CssPercentage(50);
+    //private static CssPercentage DefaultValue100 = new CssPercentage(100);
     
     static {
 	hash_values = new int[POSITION.length];

Index: CssClip.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssClip.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssClip.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssClip.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -9,15 +9,15 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
+import org.w3c.css.values.CssFunction;
+import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssLength;
 import org.w3c.css.values.CssNumber;
-import org.w3c.css.values.CssIdent;
-import org.w3c.css.values.CssFunction;
 import org.w3c.css.values.CssOperator;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  */
@@ -40,7 +40,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssClip(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssClip(ApplContext ac, CssExpression expression, boolean check)
+    	throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	
 	setByUser();
@@ -94,6 +100,11 @@
 	
     }
     
+    public CssClip(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */
@@ -170,7 +181,7 @@
     private void isValidParameter(CssValue val, ApplContext ac)
 	    throws InvalidParamException {
 	if (val instanceof CssNumber) {
-	    CssLength le = ((CssNumber) val).getLength();
+	    //CssLength le = ((CssNumber) val).getLength();
 	    return;
 	} else if (auto.equals(val)
 		   || (val instanceof CssLength)) {

Index: CssMarginBottom.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssMarginBottom.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssMarginBottom.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssMarginBottom.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -28,9 +38,9 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
-import org.w3c.css.values.CssExpression;
-import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
+import org.w3c.css.values.CssExpression;
 
 /**
  *   <H4>
@@ -77,7 +87,12 @@
    */
   public CssMarginBottom(ApplContext ac, CssExpression expression)
     throws InvalidParamException {
-    super(ac, expression);
+      super(ac, expression);
+  }
+  
+  public CssMarginBottom(ApplContext ac, CssExpression expression, boolean check)
+	throws InvalidParamException {
+      super(ac, expression, check);
   }
   
   /**

Index: CssBorderBottomWidth.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderBottomWidth.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderBottomWidth.java	8 Apr 2002 21:17:42 -0000	1.2
+++ CssBorderBottomWidth.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:42  plehegar
  * New
  *
@@ -22,10 +32,10 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
 import org.w3c.css.values.CssValue;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  *   <H4>
@@ -84,11 +94,20 @@
    * @param expression The expression for this property.
    * @exception InvalidParamException Values are incorrect
    */
-  public CssBorderBottomWidth(ApplContext ac, CssExpression expression) 
-    throws InvalidParamException {
-
+  public CssBorderBottomWidth(ApplContext ac, CssExpression expression,
+	  boolean check) throws InvalidParamException {
+      
+      if(check && expression.getCount() > 1) {
+	  throw new InvalidParamException("unrecognize", ac);
+      }
+      
       setByUser();
-    face = new CssBorderFaceWidth(ac, expression);
+      face = new CssBorderFaceWidth(ac, expression);
+  }
+  
+  public CssBorderBottomWidth(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
   }
   
   /**
@@ -102,14 +121,20 @@
    * Return the value of this property
    */
   public CssValue getValue() {
-    return face.getValue();
+      if(face != null) {
+	  return face.getValue();
+      }
+      return null;
   }
 
   /**
    * Returns a string representation of the object.
    */
   public String toString() {
-    return face.toString();
+      if(face != null) {
+	  return face.toString();
+      }
+      return "";
   }
 
   /**

Index: CssBoxOffsetFace.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBoxOffsetFace.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBoxOffsetFace.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBoxOffsetFace.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -8,14 +8,14 @@
  */
 package org.w3c.css.properties;
 
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
+import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssLength;
-import org.w3c.css.values.CssPercentage;
 import org.w3c.css.values.CssNumber;
-import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssPercentage;
+import org.w3c.css.values.CssValue;
 
 /**
  * @version $Revision$
@@ -39,8 +39,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssBoxOffsetFace(ApplContext ac, CssExpression expression) 
-	    throws InvalidParamException {
+    public CssBoxOffsetFace(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	
 	setByUser();
@@ -66,6 +71,11 @@
 	}
     }
     
+    public CssBoxOffsetFace(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */
@@ -91,8 +101,11 @@
     /**
      * Returns a string representation of the object.
      */
-    public String toString() {  
-	return value.toString();
+    public String toString() {
+	if(value != null) {
+	    return value.toString();
+	}
+	return "";
     }
     
     /**
@@ -101,14 +114,17 @@
      * @param side The other side.
      */  
     public boolean equals(CssBoxOffsetFace side) {
-	return value.equals(side.value);
+	if(value != null) {
+	    return value.equals(side.value);
+	}
+	return side == null;
     }
     
     /**
      * Is this property contains a default value.
      */  
     public boolean isDefault() {
-	if (value != auto)
+	if (value != null && value != auto)
 	    return ((Float) value.get()).floatValue() == 0;
 	else
 	    return false;

Index: CssBorderStyleCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderStyleCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderStyleCSS2.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderStyleCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -23,12 +33,12 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssPrinterStyle;
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssSelectors;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
 import org.w3c.css.values.CssOperator;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  *   <H4>
@@ -102,239 +112,300 @@
  * @version $Revision$ 
  */
 public class CssBorderStyleCSS2 extends CssProperty implements CssOperator {
-
-  CssBorderTopStyleCSS2 top;
-  CssBorderBottomStyleCSS2 bottom;
-  CssBorderRightStyleCSS2 right;
-  CssBorderLeftStyleCSS2 left;
-
-  /**
-   * Create a new CssBorderStyleCSS2
-   */
-  public CssBorderStyleCSS2(CssBorderTopStyleCSS2 top,
-			CssBorderBottomStyleCSS2 bottom,
-			CssBorderRightStyleCSS2 right,
-			CssBorderLeftStyleCSS2 left) {
-    this.top = top;
-    this.bottom = bottom;
-    this.left = left;
-    this.right = right;
-  }  
-
-  /**
-   * Create a new CssBorderStyleCSS2
-   *
-   * @param expression The expression for this property
-   * @exception InvalidParamException Values are incorrect
-   */  
-  public CssBorderStyleCSS2(ApplContext ac, CssExpression expression) throws InvalidParamException {
-
+    
+    CssBorderTopStyleCSS2 top;
+    CssBorderBottomStyleCSS2 bottom;
+    CssBorderRightStyleCSS2 right;
+    CssBorderLeftStyleCSS2 left;
+    
+    /**
+     * Create a new CssBorderStyleCSS2
+     */
+    public CssBorderStyleCSS2(CssBorderTopStyleCSS2 top,
+	    CssBorderBottomStyleCSS2 bottom,
+	    CssBorderRightStyleCSS2 right,
+	    CssBorderLeftStyleCSS2 left) {
+	this.top = top;
+	this.bottom = bottom;
+	this.left = left;
+	this.right = right;
+    }  
+    
+    /**
+     * Create a new CssBorderStyleCSS2
+     *
+     * @param expression The expression for this property
+     * @exception InvalidParamException Values are incorrect
+     */  
+    public CssBorderStyleCSS2(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
 	setByUser();
-
-    switch (expression.getCount()) {
-    case 1:
-      top = new CssBorderTopStyleCSS2(ac, expression);
-      bottom = new CssBorderBottomStyleCSS2((CssBorderFaceStyleCSS2) top.get());
-      right = new CssBorderRightStyleCSS2((CssBorderFaceStyleCSS2) top.get());
-      left = new CssBorderLeftStyleCSS2((CssBorderFaceStyleCSS2) top.get());
-      break;
-    case 2:
-      if (expression.getOperator() != SPACE)
-	throw new InvalidParamException("operator", 
-					((new Character(expression.getOperator())).toString()),
-					ac);
-      top = new CssBorderTopStyleCSS2(ac, expression);
-      right = new CssBorderRightStyleCSS2(ac, expression);
-      bottom = new CssBorderBottomStyleCSS2((CssBorderFaceStyleCSS2) top.get());
-      left = new CssBorderLeftStyleCSS2((CssBorderFaceStyleCSS2) right.get());
-      break;
-    case 3:
-      if (expression.getOperator() != SPACE)
-	throw new InvalidParamException("operator", 
-					((new Character(expression.getOperator())).toString()),
-					ac);
-      top = new CssBorderTopStyleCSS2(ac, expression);
-      if (expression.getOperator() != SPACE)
-	throw new InvalidParamException("operator", 
-					((new Character(expression.getOperator())).toString()),
-					ac);
-      right = new CssBorderRightStyleCSS2(ac, expression);
-      bottom = new CssBorderBottomStyleCSS2(ac, expression);
-      left = new CssBorderLeftStyleCSS2((CssBorderFaceStyleCSS2) right.get());
-      break;
-    default:
-      if (expression.getOperator() != SPACE)
-	throw new InvalidParamException("operator", 
-					((new Character(expression.getOperator())).toString()),
-					ac);
-      top = new CssBorderTopStyleCSS2(ac, expression);
-      if (expression.getOperator() != SPACE)
-	throw new InvalidParamException("operator", 
-					((new Character(expression.getOperator())).toString()),
-					ac);
-      right = new CssBorderRightStyleCSS2(ac, expression);
-      if (expression.getOperator() != SPACE)
-	throw new InvalidParamException("operator", 
-					((new Character(expression.getOperator())).toString()),
-					ac);
-      bottom = new CssBorderBottomStyleCSS2(ac, expression);
-      left = new CssBorderLeftStyleCSS2(ac, expression);
-      break;
+	
+	switch (expression.getCount()) {
+	case 1:
+	    top = new CssBorderTopStyleCSS2(ac, expression);
+	    bottom = new CssBorderBottomStyleCSS2((CssBorderFaceStyleCSS2) top.get());
+	    right = new CssBorderRightStyleCSS2((CssBorderFaceStyleCSS2) top.get());
+	    left = new CssBorderLeftStyleCSS2((CssBorderFaceStyleCSS2) top.get());
+	    break;
+	case 2:
+	    if (expression.getOperator() != SPACE)
+		throw new InvalidParamException("operator", 
+			((new Character(expression.getOperator())).toString()),
+			ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    top = new CssBorderTopStyleCSS2(ac, expression);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    right = new CssBorderRightStyleCSS2(ac, expression);
+	    bottom = new CssBorderBottomStyleCSS2((CssBorderFaceStyleCSS2) top.get());
+	    left = new CssBorderLeftStyleCSS2((CssBorderFaceStyleCSS2) right.get());
+	    break;
+	case 3:
+	    if (expression.getOperator() != SPACE)
+		throw new InvalidParamException("operator", 
+			((new Character(expression.getOperator())).toString()),
+			ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    top = new CssBorderTopStyleCSS2(ac, expression);
+	    if (expression.getOperator() != SPACE)
+		throw new InvalidParamException("operator", 
+			((new Character(expression.getOperator())).toString()),
+			ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    right = new CssBorderRightStyleCSS2(ac, expression);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    bottom = new CssBorderBottomStyleCSS2(ac, expression);
+	    left = new CssBorderLeftStyleCSS2((CssBorderFaceStyleCSS2) right.get());
+	    break;
+	case 4:
+	    if (expression.getOperator() != SPACE)
+		throw new InvalidParamException("operator", 
+			((new Character(expression.getOperator())).toString()),
+			ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    top = new CssBorderTopStyleCSS2(ac, expression);
+	    if (expression.getOperator() != SPACE)
+		throw new InvalidParamException("operator", 
+			((new Character(expression.getOperator())).toString()),
+			ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    right = new CssBorderRightStyleCSS2(ac, expression);
+	    if (expression.getOperator() != SPACE)
+		throw new InvalidParamException("operator", 
+			((new Character(expression.getOperator())).toString()),
+			ac);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    bottom = new CssBorderBottomStyleCSS2(ac, expression);
+	    if(expression.getValue().equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    left = new CssBorderLeftStyleCSS2(ac, expression);
+	    break;
+	default:
+	    if(check) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	}
     }
-  }
-
-  /**
-   * Returns the value of this property
-   */
-  public Object get() {
-    return top;
-  }
-
-  /**
-   * Returns the name of this property
-   */  
-  public String getPropertyName() {
-    return "border-style";
-  }
-
-  /**
-   * Returns a string representation of the object.
-   */
-  public String toString() {
-    if (right.face.equals(left.face)) {
-      if (top.face.equals(bottom.face)) {
-	if (top.face.equals(right.face)) {
-	  return top.toString();
+    
+    public CssBorderStyleCSS2(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression,false);
+    }
+    
+    /**
+     * Returns the value of this property
+     */
+    public Object get() {
+	return top;
+    }
+    
+    /**
+     * Returns the name of this property
+     */  
+    public String getPropertyName() {
+	return "border-style";
+    }
+    
+    /**
+     * Returns a string representation of the object.
+     */
+    public String toString() {      
+	if (right.face.equals(left.face)) {
+	    if (top.face.equals(bottom.face)) {
+		if (top.face.equals(right.face)) {
+		    return top.toString();
+		} else {
+		    return top + " " + right;
+		}
+	    } else {
+		return top + " " + right + " " + bottom;
+	    }
 	} else {
-	  return top + " " + right;
+	    return top + " " + right + " " + bottom + " " + left;
 	}
-      } else {
-	return top + " " + right + " " + bottom;
-      }
-    } else {
-      return top + " " + right + " " + bottom + " " + left;
     }
-  }
-
-  /**
-   * Set this property to be important.
-   * Overrides this method for a macro
-   */  
-  public void setImportant() {
-    top.important = true;
-    right.important = true;
-    left.important = true;
-    bottom.important = true;
-  }
-
-  /**
-   * Returns true if this property is important.
-   * Overrides this method for a macro
-   */
-  public boolean getImportant() {
-    return ((top == null || top.important) &&
-	    (right == null || right.important) &&
-	    (left == null || left.important) &&
-	    (bottom == null || bottom.important));
-  }
-
-  /**
-   * Print this property.
-   *
-   * @param printer The printer.
-   * @see #toString()
-   * @see #getPropertyName()
-   */  
-  public void print(CssPrinterStyle printer) {
-    if ((top != null && right != null &&
-	  left != null && bottom != null) &&
-	(getImportant() ||
-	 (!top.important &&
-	  !right.important &&
-	  !left.important &&
-	  !bottom.important))) {
-      printer.print(this);
-    } else {
-      if (top != null)
-	top.print(printer);
-      if (right != null)
-	right.print(printer);
-      if (left != null)
-	left.print(printer);
-      if (bottom != null)
-	bottom.print(printer);
+    
+    /**
+     * Set this property to be important.
+     * Overrides this method for a macro
+     */  
+    public void setImportant() {
+	if(top != null) {
+	    top.important = true;
+	}
+	if(right != null) {
+	    right.important = true;
+	}
+	if(left != null) {
+	    left.important = true;
+	}
+	if(bottom != null) {
+	    bottom.important = true;
+	}
+    }
+    
+    /**
+     * Returns true if this property is important.
+     * Overrides this method for a macro
+     */
+    public boolean getImportant() {
+	return ((top == null || top.important) &&
+		(right == null || right.important) &&
+		(left == null || left.important) &&
+		(bottom == null || bottom.important));
     }
+    
+    /**
+     * Print this property.
+     *
+     * @param printer The printer.
+     * @see #toString()
+     * @see #getPropertyName()
+     */  
+    public void print(CssPrinterStyle printer) {
+	if ((top != null && right != null &&
+		left != null && bottom != null) &&
+		(getImportant() ||
+			(!top.important &&
+				!right.important &&
+				!left.important &&
+				!bottom.important))) {
+	    printer.print(this);
+	} else {
+	    if (top != null)
+		top.print(printer);
+	    if (right != null)
+		right.print(printer);
+	    if (left != null)
+		left.print(printer);
+	    if (bottom != null)
+		bottom.print(printer);
+	}
 	
-  }
-
-  /**
-   * Set the context.
-   * Overrides this method for a macro
-   *
-   * @see org.w3c.css.css.CssCascadingOrder#order
-   * @see org.w3c.css.css.StyleSheetParser#handleRule
-   */
-  public void setSelectors(CssSelectors selector) {
-    super.setSelectors(selector);
-    if (top != null) {
-      top.setSelectors(selector);
     }
-    if (right != null) {
-      right.setSelectors(selector);
+    
+    /**
+     * Set the context.
+     * Overrides this method for a macro
+     *
+     * @see org.w3c.css.css.CssCascadingOrder#order
+     * @see org.w3c.css.css.StyleSheetParser#handleRule
+     */
+    public void setSelectors(CssSelectors selector) {
+	super.setSelectors(selector);
+	if (top != null) {
+	    top.setSelectors(selector);
+	}
+	if (right != null) {
+	    right.setSelectors(selector);
+	}
+	if (bottom != null) {
+	    bottom.setSelectors(selector);
+	}
+	if (left != null) {
+	    left.setSelectors(selector);
+	}
     }
-    if (bottom != null) {
-      bottom.setSelectors(selector);
+    
+    /**
+     * Add this property to the CssStyle
+     *
+     * @param style The CssStyle
+     */
+    public void addToStyle(ApplContext ac, CssStyle style) {
+	if(top != null) {
+	    top.addToStyle(ac, style);
+	}
+	if(right != null) {
+	    right.addToStyle(ac, style);
+	}
+	if(left != null) {
+	    left.addToStyle(ac, style);
+	}
+	if(bottom != null) {
+	    bottom.addToStyle(ac, style);
+	}
     }
-    if (left != null) {
-      left.setSelectors(selector);
+    
+    /**
+     * Get this property in the style.
+     *
+     * @param style The style where the property is
+     * @param resolve if true, resolve the style to find this property
+     */  
+    public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
+	throw new IllegalStateException("Can't invoke this method on the property " + 
+		getPropertyName());
     }
-  }
-  
-  /**
-   * Add this property to the CssStyle
-   *
-   * @param style The CssStyle
-   */
-  public void addToStyle(ApplContext ac, CssStyle style) {
-    top.addToStyle(ac, style);
-    right.addToStyle(ac, style);
-    left.addToStyle(ac, style);
-    bottom.addToStyle(ac, style);
-  }
-
-  /**
-   * Get this property in the style.
-   *
-   * @param style The style where the property is
-   * @param resolve if true, resolve the style to find this property
-   */  
-  public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
-    throw new IllegalStateException("Can't invoke this method on the property " + 
-				    getPropertyName());
-  }
-
-  /**
-   * Update the source file and the line.
-   * Overrides this method for a macro
-   *
-   * @param line The line number where this property is defined
-   * @param source The source file where this property is defined
-   */  
-  public void setInfo(int line, String source) {
-    super.setInfo(line, source);
-    top.setInfo(line, source);
-    right.setInfo(line, source);
-    left.setInfo(line, source);
-    bottom.setInfo(line, source);
-  }
-  
-  /**
-   * Compares two properties for equality.
-   *
-   * @param value The other property.
-   */  
-  public boolean equals(CssProperty property) {
-    return false;
-  }
-
+    
+    /**
+     * Update the source file and the line.
+     * Overrides this method for a macro
+     *
+     * @param line The line number where this property is defined
+     * @param source The source file where this property is defined
+     */  
+    public void setInfo(int line, String source) {
+	super.setInfo(line, source);
+	if(top != null) {
+	    top.setInfo(line, source);
+	}
+	if(right != null) {
+	    right.setInfo(line, source);
+	}
+	if(left != null) {
+	    left.setInfo(line, source);
+	}
+	if(bottom != null) {
+	    bottom.setInfo(line, source);
+	}
+    }
+    
+    /**
+     * Compares two properties for equality.
+     *
+     * @param value The other property.
+     */  
+    public boolean equals(CssProperty property) {
+	return false; // FIXME
+    }
+    
 }

Index: CssBorderTopWidthCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderTopWidthCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderTopWidthCSS1.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderTopWidthCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -22,10 +32,10 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
 import org.w3c.css.values.CssValue;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  *   <H4>
@@ -86,13 +96,22 @@
      * @param expression The expression for this property.
      * @exception InvalidParamException Values are incorrect
      */
-    public CssBorderTopWidthCSS1(ApplContext ac, CssExpression expression)
-	throws InvalidParamException {
+    public CssBorderTopWidthCSS1(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
 	
 	setByUser();
 	face = new CssBorderFaceWidthCSS1(ac, expression);
     }
     
+    public CssBorderTopWidthCSS1(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression,false);
+    }
+    
     /**
      * Returns the value of this property
      */
@@ -104,14 +123,20 @@
      * Return the value of this property
      */
     public CssValue getValue() {
-	return face.getValue();
+	if(face != null) {
+	    return face.getValue();
+	}
+	return null;
     }
     
     /**
      * Returns a string representation of the object.
      */
     public String toString() {
-	return face.toString();
+	if(face != null) {
+	    return face.toString();
+	}
+	return "";
     }
     
     /**

Index: CssFont.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssFont.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssFont.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssFont.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -22,14 +32,16 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssPrinterStyle;
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssSelectors;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
+import org.w3c.css.values.CssLength;
 import org.w3c.css.values.CssOperator;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssPercentage;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -115,16 +127,22 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssFont(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssFont(ApplContext ac, CssExpression expression,boolean check)
+    	throws InvalidParamException {
+	
 	CssValue val = expression.getValue();
 	char op = SPACE;
 	boolean find = true;
 	int max_values = 3;
-	int normal = "normal".hashCode();
+	//int normal = "normal".hashCode();
 	
+	boolean manyValues = expression.getCount() > 1;
 	if (val instanceof CssIdent) {
 	    CssIdent ident = checkIdent((CssIdent) val);
 	    if (ident != null) {
+		if(manyValues) {
+		    throw new InvalidParamException("unrecognize", ac);
+		}
 		value = ident;
 		expression.next();
 		return;
@@ -140,6 +158,10 @@
 		throw new InvalidParamException("few-value", getPropertyName(), ac);
 	    }
 	    
+	    if(manyValues && val.equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    
 	    if (fontStyle == null) {
 		try {
 		    fontStyle = new CssFontStyle(ac, expression);
@@ -167,7 +189,7 @@
 	    }
 	    
 	}
-	
+	/*
 	if (fontStyle == null) {
 	    fontStyle = new CssFontStyle();
 	}
@@ -177,7 +199,7 @@
 	if (fontWeight == null) {
 	    fontWeight = new CssFontWeight();
 	}
-	
+	*/
 	val = expression.getValue();
 	op = expression.getOperator();
 	
@@ -186,17 +208,26 @@
 	    throw new InvalidParamException("few-value", getPropertyName(), ac);
 	}
 	    
+	if(manyValues && val.equals(inherit)) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	fontSize = new CssFontSize(ac, expression);
 	
 	if (op == SLASH) {
 	    op = expression.getOperator();
 	    lineHeight = new CssLineHeight(ac, expression);
-	} else {
-	    lineHeight = new CssLineHeight();
+	}
+//	else {
+//	    lineHeight = new CssLineHeight();
+//	}
+	
+	if(manyValues && val.equals(inherit)) {
+	    throw new InvalidParamException("unrecognize", ac);
 	}
 	
 	if (op == SPACE && expression.getValue() != null) {
-	    fontFamily = new CssFontFamily(ac, expression);
+	    fontFamily = new CssFontFamily(ac, expression, true);
 	} else {
 	    expression.starts();
 	    throw new InvalidParamException("few-value", expression.toString(), ac);
@@ -205,6 +236,11 @@
 	setByUser();
     }
     
+    public CssFont(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */
@@ -220,17 +256,19 @@
 	    return value.toString();
 	} else {
 	    String ret = "";
-	    if (fontStyle.isByUser()) {
+	    if (fontStyle != null) {
 		ret += " " + fontStyle;
 	    }
-	    if (fontVariant.isByUser()) {
+	    if (fontVariant != null) {
 		ret += " " + fontVariant;
 	    }
-	    if (fontWeight.isByUser()) {
+	    if (fontWeight != null) {
 		ret += " " + fontWeight;
 	    }
-	    ret += " " + fontSize;
-	    if (lineHeight.isByUser()) {
+	    if(fontSize != null) {
+		ret += " " + fontSize;
+	    }
+	    if (lineHeight != null) {
 		ret += "/" + lineHeight;
 	    }
 	    if (fontFamily.size() != 0) {
@@ -247,12 +285,18 @@
     public void setImportant() {
 	super.setImportant();
 	if (value == null) {
-	    fontStyle.important = true;
-	    fontVariant.important = true;
-	    fontWeight.important = true;
-	    fontSize.important = true;
-	    lineHeight.important = true;
-	    fontFamily.important = true;
+	    if(fontStyle != null)
+		fontStyle.important = true;
+	    if(fontVariant != null)
+		fontVariant.important = true;
+	    if(fontWeight != null)
+		fontWeight.important = true;
+	    if(fontSize != null)
+		fontSize.important = true;
+	    if(lineHeight != null)
+		lineHeight.important = true;
+	    if(fontFamily != null)
+		fontFamily.important = true;
 	}
     }
     
@@ -326,12 +370,18 @@
 	if (value != null) {
 	    ((Css1Style) style).cssFont.value = value;
 	} else {
-	    fontStyle.addToStyle(ac, style);
-	    fontVariant.addToStyle(ac, style);
-	    fontSize.addToStyle(ac, style);
-	    fontWeight.addToStyle(ac, style);
-	    lineHeight.addToStyle(ac, style);
-	    fontFamily.addToStyle(ac, style);
+	    if(fontStyle != null)
+		fontStyle.addToStyle(ac, style);
+	    if(fontVariant != null)
+		fontVariant.addToStyle(ac, style);
+	    if(fontSize != null)
+		fontSize.addToStyle(ac, style);
+	    if(fontWeight != null)
+		fontWeight.addToStyle(ac, style);
+	    if(lineHeight != null)
+		lineHeight.addToStyle(ac, style);
+	    if(fontFamily != null)
+		fontFamily.addToStyle(ac, style);
 	}
     }
     
@@ -345,12 +395,18 @@
     public void setInfo(int line, String source) {
 	super.setInfo(line, source);
 	if (value == null) {
-	    fontStyle.setInfo(line, source);
-	    fontVariant.setInfo(line, source);
-	    fontWeight.setInfo(line, source);
-	    fontSize.setInfo(line, source);
-	    lineHeight.setInfo(line, source);
-	    fontFamily.setInfo(line, source);
+	    if(fontStyle != null)
+		fontStyle.setInfo(line, source);
+	    if(fontVariant != null)
+		fontVariant.setInfo(line, source);
+	    if(fontWeight != null)
+		fontWeight.setInfo(line, source);
+	    if(fontSize != null)
+		fontSize.setInfo(line, source);
+	    if(lineHeight != null)
+		lineHeight.setInfo(line, source);
+	    if(fontFamily != null)
+		fontFamily.setInfo(line, source);
 	}
     }
     
@@ -415,7 +471,7 @@
 
     private CssIdent checkIdent(CssIdent ident) {
 	int hash = ident.hashCode();
-	for (int i = 0; i < FONT.length; i++) {
+	for (int i = 0; i < CssFontConstant.FONT.length; i++) {
 	    if (hash_values[i] == hash) {
 		return ident;
 	    }
@@ -425,9 +481,9 @@
     }
 
     static {
-	hash_values = new int[FONT.length];
-	for (int i=0; i<FONT.length; i++)
-	    hash_values[i] = FONT[i].hashCode();
+	hash_values = new int[CssFontConstant.FONT.length];
+	for (int i=0; i<CssFontConstant.FONT.length; i++)
+	    hash_values[i] = CssFontConstant.FONT[i].hashCode();
     }
 }
 

Index: CssRight.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssRight.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssRight.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssRight.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -9,9 +9,9 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
-import org.w3c.css.values.CssExpression;
-import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
+import org.w3c.css.values.CssExpression;
 
 /**
  */
@@ -30,10 +30,16 @@
    * @param expression The expression for this property.
    * @exception InvalidParamException Values are incorrect
    */
-  public CssRight(ApplContext ac, CssExpression expression) throws InvalidParamException {
-    super(ac, expression);
+  public CssRight(ApplContext ac, CssExpression expression, boolean check)
+  	throws InvalidParamException {
+    super(ac, expression, check);
   }
   
+  public CssRight(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+  
   /**
    * Returns the name of this property
    */  

Index: CssBorderLeft.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderLeft.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CssBorderLeft.java	8 Jan 2003 10:24:47 -0000	1.3
+++ CssBorderLeft.java	8 Aug 2005 13:18:12 -0000	1.4
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.4  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.3  2003/01/08 10:24:47  sijtsche
  * changes for CSS3 border
  *
@@ -33,16 +43,16 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssPrinterStyle;
 import org.w3c.css.parser.CssSelectors;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssLength;
 import org.w3c.css.values.CssOperator;
 import org.w3c.css.values.CssURL;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -95,13 +105,20 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */
-    public CssBorderLeft(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssBorderLeft(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
 	CssValue val = null;
 	char op = SPACE;
 	boolean find = true;
 
+	if(check &&expression.getCount() > 4) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
 
+	boolean manyValues = (expression.getCount() > 1);
+	
 	while (find) {
 	    find = false;
 	    val = expression.getValue();
@@ -110,50 +127,70 @@
 	    if (val == null)
 		break;
 
+	    // if there are many values, we can't have inherit as one of them
+	    if(manyValues && val.equals(inherit)) {
+		throw new InvalidParamException("unrecognize", null, null, ac);
+	    }
+	    
 	    if (op != SPACE)
 		throw new InvalidParamException("operator",
 						((new Character(op)).toString()),
 						ac);
 
 	    if (width == null) {
-			try {
-			    width = new CssBorderLeftWidth(ac, expression);
-			    find = true;
-			} catch (InvalidParamException e) {}
+		try {
+		    width = new CssBorderLeftWidth(ac, expression);
+		    find = true;
+		} catch (InvalidParamException e) {
+		    // nothing to do, style will test this value
+		}
 	    }
 
 	    if (!find && style == null) {
-			try {
-			    style = new CssBorderLeftStyle(ac, expression);
-			    find = true;
-			}
-			catch (InvalidParamException e) {}
+		try {
+		    style = new CssBorderLeftStyle(ac, expression);
+		    find = true;
+		}
+		catch (InvalidParamException e) {
+		    // nothing to do, style will test this value
+		}
 	    }
 
 	    if (!find && color == null) {
-			try {
-			    color = new CssBorderLeftColor(ac, expression);
-			    find = true;
-			}
-			catch (InvalidParamException e) {}
+		try {
+		    color = new CssBorderLeftColor(ac, expression);
+		    find = true;
+		}
+		catch(InvalidParamException e) {
+		    // nothing to do, uri will test this value
+		}
 	    }
 
 	    if (!find && uri == null) {
-			if (val instanceof CssURL) {
-				uri = val;
-				find = true;
-			}
+		if (val instanceof CssURL) {
+		    uri = val;
+		    find = true;
 		}
+		else {
+		    throw new InvalidParamException("unrecognize", ac);
+		}
+	    }
 	}
-
+	/*
 	if (width == null)
 	    width = new CssBorderLeftWidth();
 	if (style == null)
 	    style = new CssBorderLeftStyle();
 	if (color == null)
 	    color = new CssBorderLeftColor();
+	*/
     }
 
+    public CssBorderLeft(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */
@@ -198,11 +235,27 @@
      * Returns a string representation of the object.
      */
     public String toString() {
-	String ret = width + " " + style;
-	if (!color.face.isDefault())
-	    ret += " " + color;
+	String ret = "";
+	if(width != null) {
+	    ret += width;
+	}
+	if(style != null) {
+	    if(!ret.equals("")) {
+		ret += " ";
+	    }
+	    ret += style;
+	}
+	if(color != null) {
+	    if(!ret.equals("")) {
+		ret += " ";
+	    }
+	    ret += color;
+	}
 	if (uri != null) {
-		ret += " " + uri.toString();
+	    if(!ret.equals("")) {
+		ret += " ";
+	    }
+	    ret += " " + uri.toString();
 	}
 	return ret;
     }
@@ -219,11 +272,17 @@
      * Overrides this method for a macro
      */
     public void setImportant() {
-	width.important = true;
-	style.important = true;
-	color.important = true;
+	if(width != null) {
+	    width.important = true;
+	}
+	if(style != null) {
+	    style.important = true;
+	}
+	if(color != null) {
+	    color.important = true;
+	}
     }
-
+    
     /**
      * Returns true if this property is important.
      * Overrides this method for a macro
@@ -262,37 +321,23 @@
     }
 
     /**
-     * Set the context.
-     * Overrides this method for a macro
+     * Add this property to the CssStyle
      *
-     * @see org.w3c.css.css.CssCascadingOrder#order
-     * @see org.w3c.css.css.StyleSheetParser#handleRule
+     * @param style The CssStyle
      */
-    public void setSelectors(CssSelectors selector) {
-	super.setSelectors(selector);
-	if (width != null) {
-	    width.setSelectors(selector);
+    public void addToStyle(ApplContext ac, CssStyle style) {	
+	if(width != null) {
+	    width.addToStyle(ac, style);
 	}
-	if (style != null) {
-	    style.setSelectors(selector);
+	if(this.style != null) {
+	    this.style.addToStyle(ac, style);
 	}
-	if (color != null) {
-	    color.setSelectors(selector);
+	if(color != null) {
+	    color.addToStyle(ac, style);
 	}
     }
 
     /**
-     * Add this property to the CssStyle
-     *
-     * @param style The CssStyle
-     */
-    public void addToStyle(ApplContext ac, CssStyle style) {
-	width.addToStyle(ac, style);
-	this.style.addToStyle(ac, style);
-	color.addToStyle(ac, style);
-    }
-
-    /**
      * Get this property in the style.
      *
      * @param style The style where the property is
@@ -314,10 +359,36 @@
      * @param source The source file where this property is defined
      */
     public void setInfo(int line, String source) {
-	super.setInfo(line, source);
-	width.setInfo(line, source);
-	style.setInfo(line, source);
-	color.setInfo(line, source);
+	super.setInfo(line, source);	
+	if(width != null) {
+	    width.setInfo(line, source);
+	}
+	if(style != null) {
+	    style.setInfo(line, source);
+	}
+	if(color != null) {
+	    color.setInfo(line, source);
+	}
+    }
+    
+    /**
+     * Set the context.
+     * Overrides this method for a macro
+     *
+     * @see org.w3c.css.css.CssCascadingOrder#order
+     * @see org.w3c.css.css.StyleSheetParser#handleRule
+     */
+    public void setSelectors(CssSelectors selector) {
+	super.setSelectors(selector);
+	if (width != null) {
+	    width.setSelectors(selector);
+	}
+	if (style != null) {
+	    style.setSelectors(selector);
+	}
+	if (color != null) {
+	    color.setSelectors(selector);
+	}
     }
 
     /**
@@ -328,8 +399,9 @@
     public boolean equals(CssProperty property) {
 	if (property instanceof CssBorderLeft) {
 	    CssBorderLeft left = (CssBorderLeft) property;
-	    return (width.equals(left.width) && style.equals(left.style)
-		    && color.equals(left.color));
+	    return (width != null && width.equals(left.width) &&
+		    style != null && style.equals(left.style) &&
+		    color != null && color.equals(left.color));
 	} else {
 	    return false;
 	}

Index: CssProperties.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssProperties.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CssProperties.java	12 Jul 2005 14:47:55 -0000	1.3
+++ CssProperties.java	8 Aug 2005 13:18:12 -0000	1.4
@@ -14,28 +14,28 @@
  * @version $Revision$
  */
 public class CssProperties {
-	public static Utf8Properties properties;
-
-  public static String getString(CssProperty property, String prop) {
-    StringBuffer st = new StringBuffer(property.getPropertyName());
-    return properties.getProperty(st.append('.').append(prop).toString());
-  }
-
-  public static boolean getInheritance(CssProperty property) {
-    return getString(property, "inherited").equals("true");
-  }
-  
-  static {
-		properties = new Utf8Properties();
-    try {
-      URL url = CssProperties.class.getResource("CSS1Default.properties");
-      java.io.InputStream f = url.openStream();
-      properties.load(f);
-      f.close();
-    } catch (Exception e) {
-			System.err
-					.println("org.w3c.css.properties.CssProperties: couldn't load properties ");
-			System.err.println("  " + e.toString());
+    public static Utf8Properties properties;
+    
+    public static String getString(CssProperty property, String prop) {
+	StringBuffer st = new StringBuffer(property.getPropertyName());
+	return properties.getProperty(st.append('.').append(prop).toString());
+    }
+    
+    public static boolean getInheritance(CssProperty property) {
+	return getString(property, "inherited").equals("true");
+    }
+    
+    static {
+	properties = new Utf8Properties();
+	try {
+	    URL url = CssProperties.class.getResource("CSS1Default.properties");
+	    java.io.InputStream f = url.openStream();
+	    properties.load(f);
+	    f.close();
+	} catch (Exception e) {
+	    System.err
+	    .println("org.w3c.css.properties.CssProperties: couldn't load properties ");
+	    System.err.println("  " + e.toString());
+	}
     }
-  }
 }

Index: CssLetterSpacing.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssLetterSpacing.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssLetterSpacing.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssLetterSpacing.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -31,13 +41,13 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssLength;
 import org.w3c.css.values.CssNumber;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -92,8 +102,12 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssLetterSpacing(ApplContext ac, CssExpression expression) 
-	throws InvalidParamException {
+    public CssLetterSpacing(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
 	
 	setByUser();
 	
@@ -117,6 +131,11 @@
 	}
     }
     
+    public CssLetterSpacing(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssListStylePosition.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssListStylePosition.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssListStylePosition.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssListStylePosition.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -31,11 +41,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -70,8 +80,12 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssListStylePosition(ApplContext ac, CssExpression expression)
-	throws InvalidParamException {
+    public CssListStylePosition(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
 	
 	CssValue val = expression.getValue();
 	
@@ -89,6 +103,11 @@
 	    throw new InvalidParamException("value", val, getPropertyName(), ac);
 	}
     }
+    public CssListStylePosition(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     
     /**
      * Returns the value of this property

Index: CssFontStretchCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssFontStretchCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssFontStretchCSS2.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssFontStretchCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -13,11 +23,10 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  *
@@ -43,8 +52,14 @@
      * @param expression the font stretch
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssFontStretchCSS2(ApplContext ac, CssExpression expression) 
+    public CssFontStretchCSS2(ApplContext ac, CssExpression expression,
+	    boolean check)      
 	throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
 	if (expression.getValue() instanceof CssIdent) {
 	    int hash = expression.getValue().hashCode();
@@ -60,6 +75,11 @@
 					getPropertyName(), ac);
     }
     
+    public CssFontStretchCSS2(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the current value
      */  

Index: CssBorderFaceStyleCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderFaceStyleCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderFaceStyleCSS1.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderFaceStyleCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -27,12 +37,11 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  * @version $Revision$
@@ -67,10 +76,15 @@
      * Create a new CssBorderFaceStyleCSS1
      *
      * @param expression The expression for this face
+     * @param check true will test the number of parameters
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssBorderFaceStyleCSS1(ApplContext ac, CssExpression expression) 
-	throws InvalidParamException {
+    public CssBorderFaceStyleCSS1(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
 	
 	CssValue val = expression.getValue();
 	
@@ -88,6 +102,17 @@
     }
     
     /**
+     * Create a new CssBorderFaceStyleCSS1
+     *
+     * @param check true will test the number of parameters
+     * @exception InvalidParamException The expression is incorrect
+     */  
+    public CssBorderFaceStyleCSS1(ApplContext ac, CssExpression expression)
+    	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
+    /**
      * Returns true if this property is "softly" inherited
      * e.g. his value equals inherit
      */

Index: CssVisibility.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssVisibility.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssVisibility.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssVisibility.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -9,13 +9,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssLength;
-import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  */
@@ -41,7 +39,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssVisibility(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssVisibility(ApplContext ac, CssExpression expression, boolean check)
+    	throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	
 	setByUser();
@@ -67,6 +71,11 @@
 	
     }
     
+    public CssVisibility(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssBorderRightStyleCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderRightStyleCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderRightStyleCSS1.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderRightStyleCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -22,114 +32,132 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
-import org.w3c.css.values.CssExpression;
-import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
+import org.w3c.css.values.CssExpression;
 
 /**
  * Be careful, this is not a CSS1 property !
  * @version $Revision$
  */
 public class CssBorderRightStyleCSS1 extends CssProperty {
-
-  CssBorderFaceStyleCSS1 face;
-  
-  /**
-   * Create a new CssBorderRightStyleCSS1
-   */
-  public CssBorderRightStyleCSS1() {
+    
+    CssBorderFaceStyleCSS1 face;
+    
+    /**
+     * Create a new CssBorderRightStyleCSS1
+     */
+    public CssBorderRightStyleCSS1() {
 	setByUser();
-
-    face = new CssBorderFaceStyleCSS1();
-  }
-  
-  /**
-   * Create a new CssBorderRightStyle with an another CssBorderFaceStyle
-   *
-   * @param another The another side.
-   */
-  public CssBorderRightStyleCSS1(CssBorderFaceStyleCSS1 another) {
+	
+	face = new CssBorderFaceStyleCSS1();
+    }
+    
+    /**
+     * Create a new CssBorderRightStyle with an another CssBorderFaceStyle
+     *
+     * @param another The another side.
+     */
+    public CssBorderRightStyleCSS1(CssBorderFaceStyleCSS1 another) {
 	setByUser();
-
-    face = another;
-  }
-  
-  /**
-   * Create a new CssBorderRightStyleCSS1
-   *
-   * @param expression The expression for this property.
-   * @exception InvalidParamException Values are incorrect
-   */
-  public CssBorderRightStyleCSS1(ApplContext ac, CssExpression expression) 
-    throws InvalidParamException {
-
-      setByUser();
-
-    face = new CssBorderFaceStyleCSS1(ac, expression);
-  }
-  
-  /**
-   * Returns the value of this property
-   */
-  public Object get() {
-    return face;
-  }
-
-  /**
-   * Returns the value
-   */
-  public String getStyle() {
-    return face.getStyle();
-  }
-
-  /**
-   * Returns a string representation of the object.
-   */
-  public String toString() {
-    return face.toString();
-  }
-
-  /**
-   * Returns the name of this property
-   */  
-  public String getPropertyName() {
-    return "border-right-style";
-  }
-
-  /**
-   * Add this property to the CssStyle.
-   *
-   * @param style The CssStyle
-   */
-  public void addToStyle(ApplContext ac, CssStyle style) {
-    CssBorderRightCSS1 right = ((Css1Style) style).cssBorderCSS1.right;
-    if (right.style != null)
-      style.addRedefinitionWarning(ac, this);
-    right.style = this;
-  }
-
-  /**
-   * Get this property in the style.
-   *
-   * @param style The style where the property is
-   * @param resolve if true, resolve the style to find this property
-   */  
-  public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
-    if (resolve) {
-      return ((Css1Style) style).getBorderRightStyleCSS1();
-    } else {
-      return ((Css1Style) style).cssBorderCSS1.getRight().style;
+	
+	face = another;
     }
-  }
-
-  /**
-   * Compares two properties for equality.
-   *
-   * @param value The other property.
-   */  
-  public boolean equals(CssProperty property) {
-    return (property instanceof CssBorderRightStyleCSS1 && 
-	    face.equals(((CssBorderRightStyleCSS1) property).face));
-  }
-
+    
+    /**
+     * Create a new CssBorderRightStyleCSS1
+     *
+     * @param expression The expression for this property.
+     * @exception InvalidParamException Values are incorrect
+     */
+    public CssBorderRightStyleCSS1(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
+	setByUser();
+	
+	face = new CssBorderFaceStyleCSS1(ac, expression);
+    }
+    
+    public CssBorderRightStyleCSS1(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression,false);
+    }
+    
+    /**
+     * Returns the value of this property
+     */
+    public Object get() {
+	return face;
+    }
+    
+    /**
+     * Returns the value
+     */
+    /**
+     * Return the value of this property
+     */
+    public String getStyle() {
+	if(face != null) {
+	    return face.getStyle();
+	}
+	return null;
+    }
+    
+    /**
+     * Returns a string representation of the object.
+     */
+    public String toString() {
+	if(face != null) {
+	    return face.toString();
+	}
+	return "";
+    }
+    
+    /**
+     * Returns the name of this property
+     */  
+    public String getPropertyName() {
+	return "border-right-style";
+    }
+    
+    /**
+     * Add this property to the CssStyle.
+     *
+     * @param style The CssStyle
+     */
+    public void addToStyle(ApplContext ac, CssStyle style) {
+	CssBorderRightCSS1 right = ((Css1Style) style).cssBorderCSS1.right;
+	if (right.style != null)
+	    style.addRedefinitionWarning(ac, this);
+	right.style = this;
+    }
+    
+    /**
+     * Get this property in the style.
+     *
+     * @param style The style where the property is
+     * @param resolve if true, resolve the style to find this property
+     */  
+    public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
+	if (resolve) {
+	    return ((Css1Style) style).getBorderRightStyleCSS1();
+	} else {
+	    return ((Css1Style) style).cssBorderCSS1.getRight().style;
+	}
+    }
+    
+    /**
+     * Compares two properties for equality.
+     *
+     * @param value The other property.
+     */  
+    public boolean equals(CssProperty property) {
+	return (property instanceof CssBorderRightStyleCSS1 && 
+		face.equals(((CssBorderRightStyleCSS1) property).face));
+    }
+    
 }

Index: CssBackgroundAttachmentMob.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBackgroundAttachmentMob.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBackgroundAttachmentMob.java	8 Apr 2002 21:17:42 -0000	1.2
+++ CssBackgroundAttachmentMob.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:42  plehegar
  * New
  *
@@ -31,11 +41,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -80,10 +90,15 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssBackgroundAttachmentMob(ApplContext ac, CssExpression expression) 
-	throws InvalidParamException {
-	setByUser();
+    public CssBackgroundAttachmentMob(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
 	
+	setByUser();
+
 	CssValue val = expression.getValue();
 	
 	if (val instanceof CssIdent) {
@@ -100,6 +115,11 @@
 					getPropertyName(), ac);
     }
     
+    public CssBackgroundAttachmentMob(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssBottom.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBottom.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBottom.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBottom.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -9,72 +9,78 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
-import org.w3c.css.values.CssExpression;
-import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
+import org.w3c.css.values.CssExpression;
 
 /**
  */
 public class CssBottom extends CssBoxOffsetFace {
-
-  /**
-   * Create a new CssBottom
-   */
-  public CssBottom() {
-    super();
-  }
-  
-  /**
-   * Create a new CssBottom
-   *
-   * @param expression The expression for this property.
-   * @exception InvalidParamException Values are incorrect
-   */
-  public CssBottom(ApplContext ac, CssExpression expression) throws InvalidParamException {
-    super(ac, expression);
-  }
-  
-  /**
-   * Returns the name of this property
-   */  
-  public String getPropertyName() {
-    return "bottom";
-  }
-
-  /**
-   * Add this property to the CssStyle.
-   *
-   * @param style The CssStyle
-   */
-  public void addToStyle(ApplContext ac, CssStyle style) {
-    Css1Style style0 = (Css1Style) style;
-    if (style0.cssBottom != null)
-      style0.addRedefinitionWarning(ac, this);
-    style0.cssBottom = this;
-  }
-
-  /**
-   * Get this property in the style.
-   *
-   * @param style The style where the property is
-   * @param resolve if true, resolve the style to find this property
-   */  
-  public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
-    if (resolve) {
-      return ((Css1Style) style).getBottom();
-    } else {
-      return ((Css1Style) style).getBottom();
+    
+    /**
+     * Create a new CssBottom
+     */
+    public CssBottom() {
+	super();
     }
-  }
-
-  /**
-   * Compares two properties for equality.
-   *
-   * @param value The other property.
-   */  
-  public boolean equals(CssProperty property) {
-    return (property instanceof CssBottom && 
-	    value.equals(((CssBottom) property).value));
-  }
-
+    
+    /**
+     * Create a new CssBottom
+     *
+     * @param expression The expression for this property.
+     * @exception InvalidParamException Values are incorrect
+     */
+    public CssBottom(ApplContext ac, CssExpression expression) 
+    	throws InvalidParamException {
+	super(ac, expression);
+    }
+    
+    public CssBottom(ApplContext ac, CssExpression expression, boolean check)
+    	throws InvalidParamException {
+	super(ac, expression, check);
+    }
+    
+    /**
+     * Returns the name of this property
+     */  
+    public String getPropertyName() {
+	return "bottom";
+    }
+    
+    /**
+     * Add this property to the CssStyle.
+     *
+     * @param style The CssStyle
+     */
+    public void addToStyle(ApplContext ac, CssStyle style) {
+	Css1Style style0 = (Css1Style) style;
+	if (style0.cssBottom != null)
+	    style0.addRedefinitionWarning(ac, this);
+	style0.cssBottom = this;
+    }
+    
+    /**
+     * Get this property in the style.
+     *
+     * @param style The style where the property is
+     * @param resolve if true, resolve the style to find this property
+     */  
+    public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
+	if (resolve) {
+	    return ((Css1Style) style).getBottom();
+	} else {
+	    return ((Css1Style) style).getBottom();
+	}
+    }
+    
+    /**
+     * Compares two properties for equality.
+     *
+     * @param value The other property.
+     */  
+    public boolean equals(CssProperty property) {
+	return (property instanceof CssBottom && 
+		value.equals(((CssBottom) property).value));
+    }
+    
 }

Index: CssFontVariantCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssFontVariantCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssFontVariantCSS2.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssFontVariantCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -49,11 +59,10 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  *   <H4>
@@ -109,8 +118,13 @@
      * @param expression the font variant
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssFontVariantCSS2(ApplContext ac, CssExpression expression) 
-	    throws InvalidParamException {
+    public CssFontVariantCSS2(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
 	if (expression.getValue() instanceof CssIdent) {
 	    int hash = expression.getValue().hashCode();
@@ -126,6 +140,11 @@
 					getPropertyName(), ac);
     }
     
+    public CssFontVariantCSS2(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the current value
      */  

Index: CssMarkerOffsetATSC.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssMarkerOffsetATSC.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssMarkerOffsetATSC.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssMarkerOffsetATSC.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -9,13 +9,13 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
+import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssLength;
 import org.w3c.css.values.CssNumber;
-import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  */
@@ -38,8 +38,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssMarkerOffsetATSC(ApplContext ac, CssExpression expression) 
-	    throws InvalidParamException {
+    public CssMarkerOffsetATSC(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 
 	setByUser();
@@ -62,6 +67,11 @@
 	expression.next();
     }
     
+    public CssMarkerOffsetATSC(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssBorderFaceColor.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderFaceColor.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CssBorderFaceColor.java	8 Jan 2003 10:24:47 -0000	1.3
+++ CssBorderFaceColor.java	8 Aug 2005 13:18:12 -0000	1.4
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.4  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.3  2003/01/08 10:24:47  sijtsche
  * changes for CSS3 border
  *
@@ -21,12 +31,11 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  * @version $Revision$
@@ -67,28 +76,37 @@
      * @param expression The expression for this property.
      * @exception InvalidParamException color is not a color
      */
-    public CssBorderFaceColor(ApplContext ac, CssExpression expression)
-	throws InvalidParamException {
-
+    public CssBorderFaceColor(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
-
+	
 	if (val instanceof org.w3c.css.values.CssColor) {
 	    face = val;
 	} else if (val.equals(CssProperty.inherit)) {
 	    face = CssProperty.inherit;
 	} else if (val instanceof CssIdent) {
-		if (val.equals(transparent)) {
-			face = transparent;
-		} else {
-	    	face = new org.w3c.css.values.CssColor(ac, (String) val.get());
-		}
+	    if (val.equals(transparent)) {
+		face = transparent;
+	    } else {
+		face = new org.w3c.css.values.CssColor(ac, (String) val.get());
+	    }
 	} else {
 	    throw new InvalidParamException("value", val.toString(),
-					    "border-color", ac);
+		    "border-color", ac);
 	}
-	expression.next();
+	expression.next();	
     }
 
+    public CssBorderFaceColor(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the internal color
      */

Index: CssTextShadowATSC.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssTextShadowATSC.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssTextShadowATSC.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssTextShadowATSC.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -15,15 +25,12 @@
 import java.util.Vector;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
+import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssOperator;
-import org.w3c.css.values.CssColor;
 import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssIdent;
-import org.w3c.css.values.CssLength;
-import org.w3c.css.values.CssNumber;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  * @version $Revision$
@@ -50,19 +57,28 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssTextShadowATSC(ApplContext ac, CssExpression expression) 
-	    throws InvalidParamException {
+    public CssTextShadowATSC(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
 	CssValue val = expression.getValue();
 	
 	setByUser();
 
+	int count = expression.getCount();
+	
 	ac.getFrame().addWarning("atsc", val.toString());
 
 	if (val.equals(none)) {
+	    if(count > 1) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    value = none;
 	    expression.next();
 	    return;
 	} else if (val.equals(inherit)) {
+	    if(count > 1) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    value = inherit;
 	    expression.next();
 	    return;
@@ -75,11 +91,19 @@
 		op = face.op;
 		faces.addElement(face);
 	    }
+	    if(check && !expression.end()) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	}
 	val = null;
 	
     }
     
+    public CssTextShadowATSC(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssFontVariantCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssFontVariantCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssFontVariantCSS1.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssFontVariantCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -49,11 +59,10 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  *   <H4>
@@ -109,8 +118,14 @@
      * @param expression the font variant
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssFontVariantCSS1(ApplContext ac, CssExpression expression) 
+    public CssFontVariantCSS1(ApplContext ac, CssExpression expression,
+	    boolean check) 
 	    throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
 	if (expression.getValue() instanceof CssIdent) {
 	    int hash = expression.getValue().hashCode();
@@ -126,6 +141,11 @@
 					getPropertyName(), ac);
     }
     
+    public CssFontVariantCSS1(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the current value
      */  

Index: CssBorderFaceWidthCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderFaceWidthCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderFaceWidthCSS1.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderFaceWidthCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -27,99 +37,110 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
+import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssLength;
 import org.w3c.css.values.CssNumber;
-import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  * @version $Revision$
  */
 public class CssBorderFaceWidthCSS1 {
-
-  CssValue value;
-
-  /**
-   * Create a new CssBorderFaceWidthCSS1
-   */
-  public CssBorderFaceWidthCSS1() {
-    value = medium;
-  }
-
-  /**
-   * Create a new CssBorderFaceWidthCSS1 from an another CssBorderFaceWidthCSS1
-   *
-   * @param another The another side.
-   */
-  public CssBorderFaceWidthCSS1(CssBorderFaceWidthCSS1 another) {
-    value = another.value;
-  }
-
-  /**
-   * Create a new CssBorderFaceWidth
-   *
-   * @param expression The expression for this property
-   * @exception InvalidParamException Values are incorrect
-   */
-  public CssBorderFaceWidthCSS1(ApplContext ac, CssExpression expression) 
-    throws InvalidParamException {
-
-    CssValue val = expression.getValue();
-
-    if (val instanceof CssLength) {
-      float f = ((Float) val.get()).floatValue();
-      if (f >= 0) 
-	this.value = val;
-      else
-	throw new InvalidParamException("negative-value", val.toString(), ac);
-    } else if (val instanceof CssNumber) {
-      value = ((CssNumber) val).getLength();
-    } else if (val.equals(thin)) {
-      value = thin;
-    } else if (val.equals(medium)) {
-      value = medium;
-    } else if (val.equals(thick)) {
-      value = thick;
-    } else if (val.equals(CssProperty.inherit)) {
-	value = CssProperty.inherit;
-    } else {
-      throw new InvalidParamException("value", val.toString(), "width", ac);
+    
+    CssValue value;
+    
+    /**
+     * Create a new CssBorderFaceWidthCSS1
+     */
+    public CssBorderFaceWidthCSS1() {
+	value = medium;
     }
-
-    expression.next();
-  }  
-
-  /**
-   * Returns the internal value
-   */  
-  public CssValue getValue() {
-    return value;
-  }
-
-  /**
-   * Returns a string representation of the object.
-   */
-  public String toString() {  
-    return value.toString();
-  }
-
-  /**
-   * Compares two sides for equality.
-   *
-   * @param value The another side.
-   */  
-  public boolean equals(CssBorderFaceWidthCSS1 another) {
-    return value.equals(another.value);
-  }
-  
-  private static CssIdent thin = new CssIdent("thin");
-  private static CssIdent medium = new CssIdent("medium");
-  private static CssIdent thick = new CssIdent("thick");
-  
+    
+    /**
+     * Create a new CssBorderFaceWidthCSS1 from an another CssBorderFaceWidthCSS1
+     *
+     * @param another The another side.
+     */
+    public CssBorderFaceWidthCSS1(CssBorderFaceWidthCSS1 another) {
+	value = another.value;
+    }
+    
+    /**
+     * Create a new CssBorderFaceWidth
+     *
+     * @param expression The expression for this property
+     * @exception InvalidParamException Values are incorrect
+     */
+    public CssBorderFaceWidthCSS1(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
+	CssValue val = expression.getValue();
+	
+	if (val instanceof CssLength) {
+	    float f = ((Float) val.get()).floatValue();
+	    if (f >= 0) 
+		this.value = val;
+	    else
+		throw new InvalidParamException("negative-value", val.toString(), ac);
+	} else if (val instanceof CssNumber) {
+	    value = ((CssNumber) val).getLength();
+	} else if (val.equals(thin)) {
+	    value = thin;
+	} else if (val.equals(medium)) {
+	    value = medium;
+	} else if (val.equals(thick)) {
+	    value = thick;
+	} else if (val.equals(CssProperty.inherit)) {
+	    value = CssProperty.inherit;
+	} else {
+	    throw new InvalidParamException("value", val.toString(), "width", ac);
+	}
+	
+	expression.next();
+    }  
+    
+    public CssBorderFaceWidthCSS1(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
+    /**
+     * Returns the internal value
+     */  
+    public CssValue getValue() {
+	return value;
+    }
+    
+    /**
+     * Returns a string representation of the object.
+     */
+    public String toString() {  
+	if(value != null) {
+	    return value.toString();
+	}
+	return "";
+    }
+    
+    /**
+     * Compares two sides for equality.
+     *
+     * @param value The another side.
+     */  
+    public boolean equals(CssBorderFaceWidthCSS1 another) {
+	return value.equals(another.value); // FIXME
+    }
+    
+    private static CssIdent thin = new CssIdent("thin");
+    private static CssIdent medium = new CssIdent("medium");
+    private static CssIdent thick = new CssIdent("thick");
+    
 }
 
 

Index: CssBorderBottomColorCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderBottomColorCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderBottomColorCSS1.java	8 Apr 2002 21:17:42 -0000	1.2
+++ CssBorderBottomColorCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:42  plehegar
  * New
  *
@@ -21,12 +31,12 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssPrinterStyle;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
 import org.w3c.css.values.CssValue;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  * Be careful, this is not a CSS1 property !
@@ -61,12 +71,20 @@
    * @param expression The expression for this property.
    * @exception InvalidParamException Values are incorrect
    */
-  public CssBorderBottomColorCSS1(ApplContext ac, CssExpression expression) 
-    throws InvalidParamException {
+  public CssBorderBottomColorCSS1(ApplContext ac, CssExpression expression,
+	  boolean check) throws InvalidParamException {
+      
+      if(check && expression.getCount() > 1) {
+	  throw new InvalidParamException("unrecognize", ac);
+      }
 
       setByUser();
-
-    face = new CssBorderFaceColorCSS1(ac, expression);
+      face = new CssBorderFaceColorCSS1(ac, expression);
+  }
+  
+  public CssBorderBottomColorCSS1(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
   }
   
   /**
@@ -80,14 +98,20 @@
    * Returns the color of this property
    */
   public CssValue getColor() {
-    return face.getColor();
+      if(face != null) {
+	  return face.getColor();
+      }
+      return null;
   }
 
   /**
    * Returns a string representation of the object.
    */
   public String toString() {
-    return face.toString();
+      if(face != null) {
+	  return face.toString();
+      }
+      return "";
   }
 
   /**
@@ -140,7 +164,7 @@
    * @see #getPropertyName()
    */  
   public void print(CssPrinterStyle printer) {
-    if (!face.isDefault())
+    if (face != null && !face.isDefault())
       printer.print(this);
   }
 }

Index: CssBorderLeftStyle.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderLeftStyle.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderLeftStyle.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderLeftStyle.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -22,111 +32,125 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
-import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
+import org.w3c.css.values.CssExpression;
 
 /**
  * Be careful, this is not a CSS1 property !
  * @version $Revision$
  */
 public class CssBorderLeftStyle extends CssProperty {
-
-  CssBorderFaceStyle face;
-  
-  /**
-   * Create a new CssBorderLeftStyle
-   */
-  public CssBorderLeftStyle() {
-    face = new CssBorderFaceStyle();
-  }
-  
-  /**
-   * Create a new CssBorderLeftStyle with an another CssBorderFaceStyle
-   *
-   * @param another The another side.
-   */
-  public CssBorderLeftStyle(CssBorderFaceStyle another) {
+    
+    CssBorderFaceStyle face;
+    
+    /**
+     * Create a new CssBorderLeftStyle
+     */
+    public CssBorderLeftStyle() {
+	face = new CssBorderFaceStyle();
+    }
+    
+    /**
+     * Create a new CssBorderLeftStyle with an another CssBorderFaceStyle
+     *
+     * @param another The another side.
+     */
+    public CssBorderLeftStyle(CssBorderFaceStyle another) {
 	setByUser();
-
-    face = another;
-  }
-  
-  /**
-   * Create a new CssBorderLeftStyle
-   *
-   * @param expression The expression for this property.
-   * @exception InvalidParamException Values are incorrect
-   */
-  public CssBorderLeftStyle(ApplContext ac, CssExpression expression) 
-    throws InvalidParamException {
-
+	
+	face = another;
+    }
+    
+    /**
+     * Create a new CssBorderLeftStyle
+     *
+     * @param expression The expression for this property.
+     * @exception InvalidParamException Values are incorrect
+     */
+    public CssBorderLeftStyle(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
-    face = new CssBorderFaceStyle(ac, expression);
-  }
-  
-  /**
-   * Returns the value of this property
-   */
-  public Object get() {
-    return face;
-  }
-
-  /**
-   * Returns the value
-   */
-  public String getStyle() {
-    return face.getStyle();
-  }
-
-  /**
-   * Returns a string representation of the object.
-   */
-  public String toString() {
-    return face.toString();
-  }
-
-  /**
-   * Returns the name of this property
-   */  
-  public String getPropertyName() {
-    return "border-left-style";
-  }
-
-  /**
-   * Add this property to the CssStyle.
-   *
-   * @param style The CssStyle
-   */
-  public void addToStyle(ApplContext ac, CssStyle style) {
-    CssBorderLeft left = ((Css1Style) style).cssBorder.left;
-    if (left.style != null)
-      style.addRedefinitionWarning(ac, this);
-    left.style = this;
-  }
-
-  /**
-   * Get this property in the style.
-   *
-   * @param style The style where the property is
-   * @param resolve if true, resolve the style to find this property
-   */  
-  public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
-    if (resolve) {
-      return ((Css1Style) style).getBorderLeftStyle();
-    } else {
-      return ((Css1Style) style).cssBorder.getLeft().style;
+	face = new CssBorderFaceStyle(ac, expression);
     }
-  }
-
-  /**
-   * Compares two properties for equality.
-   *
-   * @param value The other property.
-   */  
-  public boolean equals(CssProperty property) {
-    return (property instanceof CssBorderLeftStyle && face.equals(((CssBorderLeftStyle) property).face));
-  }
-
+    
+    public CssBorderLeftStyle(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
+    /**
+     * Returns the value of this property
+     */
+    public Object get() {
+	return face;
+    }
+    
+    /**
+     * Returns the value
+     */
+    public String getStyle() {
+	if(face != null) {
+	    return face.getStyle();
+	}
+	return null;
+    }
+    
+    /**
+     * Returns a string representation of the object.
+     */
+    public String toString() {
+	if(face != null) {
+	    return face.toString();
+	}
+	return "";
+    }
+    
+    /**
+     * Returns the name of this property
+     */  
+    public String getPropertyName() {
+	return "border-left-style";
+    }
+    
+    /**
+     * Add this property to the CssStyle.
+     *
+     * @param style The CssStyle
+     */
+    public void addToStyle(ApplContext ac, CssStyle style) {
+	CssBorderLeft left = ((Css1Style) style).cssBorder.left;
+	if (left.style != null)
+	    style.addRedefinitionWarning(ac, this);
+	left.style = this;
+    }
+    
+    /**
+     * Get this property in the style.
+     *
+     * @param style The style where the property is
+     * @param resolve if true, resolve the style to find this property
+     */  
+    public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
+	if (resolve) {
+	    return ((Css1Style) style).getBorderLeftStyle();
+	} else {
+	    return ((Css1Style) style).cssBorder.getLeft().style;
+	}
+    }
+    
+    /**
+     * Compares two properties for equality.
+     *
+     * @param value The other property.
+     */  
+    public boolean equals(CssProperty property) {
+	return (property instanceof CssBorderLeftStyle && face.equals(((CssBorderLeftStyle) property).face));
+    }
+    
 }

Index: CssWidthMob.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssWidthMob.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssWidthMob.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssWidthMob.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -34,14 +44,13 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssNumber;
-import org.w3c.css.values.CssLength;
-import org.w3c.css.values.CssPercentage;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssLength;
+import org.w3c.css.values.CssNumber;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -89,7 +98,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssWidthMob(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssWidthMob(ApplContext ac, CssExpression expression, boolean check)
+    	throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	
 	setByUser();
@@ -108,13 +123,18 @@
 	} else if (val instanceof CssNumber) {
 	    value = ((CssNumber) val).getLength();
 	} else {
-	    throw new InvalidParamException("value", expression.getValue(), 
+	    throw new InvalidParamException("value", val, 
 					    getPropertyName(), ac);
 	}
 	
 	expression.next();
     }
     
+    public CssWidthMob(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property.
      */

Index: CssBackgroundCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBackgroundCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBackgroundCSS2.java	8 Apr 2002 21:17:42 -0000	1.2
+++ CssBackgroundCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:42  plehegar
  * New
  *
@@ -36,15 +46,14 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssPrinterStyle;
 import org.w3c.css.parser.CssSelectors;
-import org.w3c.css.values.CssOperator;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
+import org.w3c.css.values.CssOperator;
 import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  *   <H4>
@@ -106,29 +115,21 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssBackgroundCSS2(ApplContext ac, CssExpression expression) 
-	    throws InvalidParamException {
+    public CssBackgroundCSS2(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {			
+
 	CssValue val = expression.getValue();
 	char op = SPACE;
 	boolean find = true;
+	
+	// too many values
+	if(check && expression.getCount() > 6) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
 
-	if (val.equals(inherit)) {
-	    color = new CssBackgroundColorCSS2();
-	    color.color = inherit;
-	    image = new CssBackgroundImageCSS2();
-	    image.url = inherit;
-	    repeat = new CssBackgroundRepeatCSS2();
-	    repeat.repeat = REPEAT.length - 1;
-	    attachment = new CssBackgroundAttachmentCSS2();
-	    attachment.attachment = ATTACHMENT.length - 1;
-	    position = new CssBackgroundPositionCSS2();
-	    position.horizontal = inherit;
-	    position.vertical = inherit;
-	    same = true;
-	    expression.next();
-	    return;
-	}
+	boolean manyValues = (expression.getCount() > 1);
 	
 	while (find) {
 	    find = false;
@@ -139,11 +140,17 @@
 		break;
 	    }
 	    
+	    // if there are many values, we can't have inherit as one of them
+	    if(manyValues && val != null && val.equals(inherit)) {
+		throw new InvalidParamException("unrecognize", null, null, ac);
+	    }
+	    
 	    if (color == null) {
 		try {
 		    color = new CssBackgroundColorCSS2(ac, expression);
 		    find = true;
 		} catch (InvalidParamException e) {
+		    // nothing to do, image will test this value
 		}
 	    }
 	    if (!find && image == null) {
@@ -151,6 +158,7 @@
 		    image = new CssBackgroundImageCSS2(ac, expression);
 		    find = true;
 		} catch (InvalidParamException e) {
+		    // nothing to do, repeat will test this value
 		}
 	    }
 	    if (!find && repeat == null) {
@@ -158,6 +166,7 @@
 		    repeat = new CssBackgroundRepeatCSS2(ac, expression);
 		    find = true;
 		} catch (InvalidParamException e) {
+		    // nothing to do, attachment will test this value
 		}
 	    }
 	    if (!find && attachment == null) {
@@ -165,14 +174,15 @@
 		    attachment = new CssBackgroundAttachmentCSS2(ac, expression);
 		    find = true;
 		} catch (InvalidParamException e) {
+		    // nothing to do, position will test this value
 		}
 	    }
 	    if (!find && position == null) {
-		try {
-		    position = new CssBackgroundPositionCSS2(ac, expression);
-		    find = true;
-		} catch (InvalidParamException e) {
-		}
+		position = new CssBackgroundPositionCSS2(ac, expression);
+		find = true;
+	    }
+	    if(check && val != null && !find) {		
+		throw new InvalidParamException("unrecognize", ac);
 	    }
 	    if (op != SPACE) {
 		throw new InvalidParamException("operator", 
@@ -180,7 +190,7 @@
 						ac);
 	    }
 	}
-
+	/*
 	if (color == null)
 	    color = new CssBackgroundColorCSS2();
 	if (image == null)
@@ -191,6 +201,12 @@
 	    attachment = new CssBackgroundAttachmentCSS2();
 	if (position == null)
 	    position = new CssBackgroundPositionCSS2();
+	*/
+    }
+    
+    public CssBackgroundCSS2(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
     }
     
     /**
@@ -222,22 +238,53 @@
      * Returns a string representation of the object.
      */
     public String toString() {
+	/*
 	if (same) {
 	    return inherit.toString();
-	} else {
-	    String ret = "";
-	    if (color.byUser)
-		ret += " " + color.toString();
-	    if (image.byUser)
-		ret += " " + image.toString();
-	    if (image.byUser)
-		ret += " " + repeat.toString();
-	    if (attachment.byUser)
-		ret += " " + attachment.toString();
-	    if (position.byUser)
-		ret += " " + position.toString();
-	    return ret.trim();
+	} else {*/
+	String ret = "";
+	if(color != null) {
+	    ret += color;
 	}
+	if(image != null) {
+	    if(ret != null) {
+		ret += " ";
+	    }
+	    ret += image;
+	}
+	if(repeat != null) {
+	    if(ret != null) {
+		ret += " ";
+	    }
+	    ret += repeat;
+	}
+	if(attachment != null) {
+	    if(ret != null) {
+		ret += " ";
+	    }
+	    ret += attachment;
+	}
+	if(position != null) {
+	    if(ret != null) {
+		ret += " ";
+	    }
+	    ret += position;
+	}
+	return ret;
+	/*
+	if (color.byUser)
+	    ret += " " + color.toString();
+	if (image.byUser)
+	    ret += " " + image.toString();
+	if (image.byUser)
+	    ret += " " + repeat.toString();
+	if (attachment.byUser)
+	    ret += " " + attachment.toString();
+	if (position.byUser)
+	    ret += " " + position.toString();
+	return ret.trim();
+	*/
+	//}
     }
     
     /**
@@ -245,11 +292,21 @@
      * Overrides this method for a macro
      */  
     public void setImportant() {
-	color.important = true;
-	image.important = true;
-	repeat.important = true;
-	attachment.important = true;
-	position.important = true;
+	if(color != null) {
+	    color.important = true;
+	}
+	if(image != null) {
+	    image.important = true;
+	}
+	if(repeat != null) {
+	    repeat.important = true;
+	}
+	if(attachment != null) {
+	    attachment.important = true;
+	}
+	if(position != null) {
+	    position.important = true;
+	}
     }
     
     /**
@@ -333,12 +390,22 @@
     public void addToStyle(ApplContext ac, CssStyle style) {
 	((Css1Style) style).cssBackgroundCSS2.same = same;
 	((Css1Style) style).cssBackgroundCSS2.byUser = byUser;
-
-	color.addToStyle(ac, style);
-	image.addToStyle(ac, style);
-	repeat.addToStyle(ac, style);
-	attachment.addToStyle(ac, style);
-	position.addToStyle(ac, style);
+	
+	if(color != null) {
+	    color.addToStyle(ac, style);
+	}
+	if(image != null) {
+	    image.addToStyle(ac, style);
+	}
+	if(repeat != null) {
+	    repeat.addToStyle(ac, style);
+	}
+	if(attachment != null) {
+	    attachment.addToStyle(ac, style);
+	}
+	if(position != null) {
+	    position.addToStyle(ac, style);
+	}	
     }
     
     /**
@@ -373,11 +440,21 @@
      */  
     public void setInfo(int line, String source) {
 	super.setInfo(line, source);
-	color.setInfo(line, source);
-	image.setInfo(line, source);
-	repeat.setInfo(line, source);
-	attachment.setInfo(line, source);
-	position.setInfo(line, source);
+	if(color != null) {
+	    color.setInfo(line, source);
+	}
+	if(image != null) {
+	    image.setInfo(line, source);
+	}
+	if(repeat != null) {
+	    repeat.setInfo(line, source);
+	}
+	if(attachment != null) {
+	    attachment.setInfo(line, source);
+	}
+	if(position != null) {
+	    position.setInfo(line, source);
+	}
     }
     
 }

Index: CssFontFamily.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssFontFamily.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CssFontFamily.java	7 Aug 2002 12:57:54 -0000	1.3
+++ CssFontFamily.java	8 Aug 2005 13:18:12 -0000	1.4
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.4  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.3  2002/08/07 12:57:54  sijtsche
  * value none added
  *
@@ -25,17 +35,18 @@
 
 package org.w3c.css.properties;
 
-import java.util.Vector;
 import java.util.Enumeration;
-import org.w3c.css.util.Util;
-import org.w3c.css.values.CssOperator;
+import java.util.Vector;
+
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
+import org.w3c.css.util.Util;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
+import org.w3c.css.values.CssOperator;
 import org.w3c.css.values.CssString;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -124,8 +135,16 @@
      * @param expression the font name
      * @exception InvalidParamException The expression is incorrect
      */
-    public CssFontFamily(ApplContext ac, CssExpression expression)
+    public CssFontFamily(ApplContext ac, CssExpression expression,
+	    boolean check)
 	    throws InvalidParamException {
+	
+	boolean manyValues = expression.getCount() > 1;
+	
+	if(check && manyValues) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	boolean family = true;
 	CssValue val = expression.getValue();
 	char op;
@@ -135,25 +154,39 @@
 
 
 	if (val.equals(inherit)) {
+	    if(expression.getCount() > 1) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    inheritedValue = true;
 	    expression.next();
 	    return;
 	} else if (val.equals(none)) {
-		fontfamily = none;
-		expression.next();
-		return;
+	    if(expression.getCount() > 1) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    fontfamily = none;
+	    expression.next();
+	    return;
 	}
 
 	while (family) {
 	    val = expression.getValue();
 	    op = expression.getOperator();
 
+	    if(manyValues && val != null && val.equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    
 	    if ((op != COMMA) && (op != SPACE)) {
 		throw new InvalidParamException("operator",
-						((new Character(op)).toString()),
-						ac);
+			((new Character(op)).toString()),
+			ac);
 	    }
 
+	    if(val != null && val.equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    
 	    if (val instanceof CssString) {
 		String familyName = null;
 		if (op == COMMA) { // "helvetica", "roman"
@@ -169,9 +202,9 @@
 		    for (int i = 0; i < genericFamily.length; i++) {
 			if (genericFamily[i].equals(tmp)) {
 			    throw new InvalidParamException("generic-family.quote",
-							    genericFamily[i],
-							    getPropertyName(),
-							    ac);
+				    genericFamily[i],
+				    getPropertyName(),
+				    ac);
 			}
 		    }
 		}
@@ -183,6 +216,10 @@
 		} else {
 		    CssValue next = expression.getNextValue();
 
+		    if(manyValues && next != null && next.equals(inherit)) {
+			throw new InvalidParamException("unrecognize", ac);
+		    }
+		    
 		    if (next instanceof CssIdent) {
 			CssIdent New = new CssIdent(val.get() + " "
 						    + next.get());
@@ -202,12 +239,19 @@
 		throw new InvalidParamException("value", expression.getValue(),
 						getPropertyName(), ac);
 	}
-
+	if(check && !expression.end()) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
 	if (!containsGenericFamily()) {
 	    ac.getFrame().addWarning("no-generic-family", "font-family");
 	}
     }
 
+    public CssFontFamily(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns all fonts name
      */

Index: CssBackgroundImageCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBackgroundImageCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBackgroundImageCSS1.java	8 Apr 2002 21:17:42 -0000	1.2
+++ CssBackgroundImageCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:42  plehegar
  * New
  *
@@ -38,12 +48,12 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssURL;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -83,18 +93,19 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssBackgroundImageCSS1(ApplContext ac, CssExpression expression) 
-	throws InvalidParamException {
+    public CssBackgroundImageCSS1(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
 	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+
 	setByUser();
 
 	CssValue val = expression.getValue();
 	if (val instanceof CssURL) {
 	    url = val;
 	    expression.next();
-	} else if (val.equals(inherit)) {
-	    url = inherit;
-	    expression.next();
 	} else if (val.equals(none)) {
 	    url = none;
 	    expression.next();
@@ -104,6 +115,11 @@
 	}
     }
     
+    public CssBackgroundImageCSS1(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */
@@ -116,14 +132,20 @@
      * e.g. his value equals inherit
      */
     public boolean isSoftlyInherited() {
-	return url.equals(inherit);
+	if (url != null) {
+	    return url.equals(inherit);
+	}
+	return false;
     }
     
     /**
      * Returns a string representation of the object.
      */
     public String toString() {
-	return url.toString();
+	if (url != null) {
+	    return url.toString();
+	}
+	return "";
     }
     
     /**
@@ -165,8 +187,10 @@
      * @param value The other property.
      */  
     public boolean equals(CssProperty property) {
-	return (property instanceof CssBackgroundImageCSS1 && 
-		url.equals(((CssBackgroundImageCSS1) property).url));
+	return ((url == null && property == null) || 
+		(property instanceof CssBackgroundImageCSS1 &&
+		url != null &&
+		url.equals(((CssBackgroundImageCSS1) property).url)));
     }
     
     /**

Index: CssTextShadow.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssTextShadow.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssTextShadow.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssTextShadow.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -15,15 +25,12 @@
 import java.util.Vector;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
+import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssOperator;
-import org.w3c.css.values.CssColor;
 import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssIdent;
-import org.w3c.css.values.CssLength;
-import org.w3c.css.values.CssNumber;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  * @version $Revision$
@@ -51,31 +58,54 @@
      * @exception InvalidParamException Values are incorrect
      */  
     public CssTextShadow(ApplContext ac, CssExpression expression) 
+	    throws InvalidParamException {		
+	this(ac, expression, false);	
+    }
+    
+    /**
+     * Create a new CssTextShadow
+     *
+     * @param expression The expression for this property
+     * @param check if true, checks the number of parameters
+     * @exception InvalidParamException Values are incorrect
+     */  
+    public CssTextShadow(ApplContext ac, CssExpression expression, boolean check) 
 	    throws InvalidParamException {
+		
+	int count = expression.getCount();
+	
 	CssValue val = expression.getValue();
 	
 	setByUser();
 
 	if (val.equals(none)) {
+	    if(count > 1) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    value = none;
 	    expression.next();
 	    return;
 	} else if (val.equals(inherit)) {
+	    if(count > 1) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    value = inherit;
 	    expression.next();
 	    return;
 	} else {
 	    TextShadowFace face;
 	    char op = CssOperator.COMMA;
-	    while (op == CssOperator.COMMA) {
-		face = new TextShadowFace(ac, expression);
+	    while (op == CssOperator.COMMA) {		
+		face = new TextShadowFace(ac, expression);		
 		value = null;
 		op = face.op;
 		faces.addElement(face);
 	    }
+	    if(check && !expression.end()) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	}
-	val = null;
-	
+	val = null;	
     }
     
     /**

Index: CssBorder.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorder.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- CssBorder.java	29 Aug 2003 15:23:39 -0000	1.4
+++ CssBorder.java	8 Aug 2005 13:18:12 -0000	1.5
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.5  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.4  2003/08/29 15:23:39  plehegar
  * Fix from Sijtsche
  *
@@ -34,27 +44,25 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssPrinterStyle;
 import org.w3c.css.parser.CssSelectors;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssOperator;
-import org.w3c.css.values.CssURL;
-import org.w3c.css.properties3.CssBorderImageTransform;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  * @version $Revision$
  */
 public class CssBorder extends CssProperty implements CssOperator {
 
-    CssBorderTopWidth width;
-    CssBorderTopStyle style;
-    CssBorderTopColor color;
-    CssValue uri = null;
-    CssBorderImageTransform imagetransform = null;
+//    CssBorderTopWidth width;
+//    CssBorderTopStyle style;
+//    CssBorderTopColor color;
+//    CssValue uri = null;
+//    CssBorderImageTransform imagetransform = null;
 
     CssBorderTop top = new CssBorderTop();
     CssBorderRight right = new CssBorderRight();
@@ -77,14 +85,65 @@
      * @param value The value for this property
      * @exception InvalidParamException The value is incorrect
      */
-    public CssBorder(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssBorder(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	CssValue val = expression.getValue();
 
-	CssValue val = null;
+	if(check && expression.getCount() > 4) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
+	setByUser();
+	
+	
+	top = new CssBorderTop(ac, expression);
+	
+	if (val == expression.getValue()) {
+	    throw new InvalidParamException("value", 
+					    expression.getValue(), 
+					    getPropertyName(), ac);
+	}	
+	right = new CssBorderRight();
+	bottom = new CssBorderBottom();
+	left = new CssBorderLeft();
+	
+	CssBorderTopWidth w = top.width;
+	CssBorderTopStyle s = top.style;
+	CssBorderTopColor c = top.color;	
+	
+	if(w != null) {	    
+	    right.width  = 
+		new CssBorderRightWidth((CssBorderFaceWidth) w.get());	    
+	    left.width = 
+		new CssBorderLeftWidth((CssBorderFaceWidth) w.get());	    
+	    bottom.width = 
+		new CssBorderBottomWidth((CssBorderFaceWidth) w.get());	    
+	}	
+	if(s != null) {
+	    right.style = 
+		new CssBorderRightStyle((CssBorderFaceStyle) s.get());
+	    left.style = 
+		new CssBorderLeftStyle((CssBorderFaceStyle) s.get());
+	    bottom.style = 
+		new CssBorderBottomStyle((CssBorderFaceStyle) s.get());
+	}	
+	if(c != null) {
+	    right.color = 
+		new CssBorderRightColor((CssBorderFaceColor) c.get());
+	    left.color = 
+		new CssBorderLeftColor((CssBorderFaceColor) c.get());
+	    bottom.color = 
+		new CssBorderBottomColor((CssBorderFaceColor) c.get());
+	}
+	/*
+	CssValue val = expression.getValue();
 	char op = SPACE;
 	boolean find = true;
 
 	setByUser();
 
+	boolean manyValues = (expression.getCount() > 1);
+	
 	while (find) {
 	    find = false;
 	    val = expression.getValue();
@@ -93,50 +152,57 @@
 	    if (val == null)
 		break;
 
+	    // if there are many values, we can't have inherit as one of them
+	    if(manyValues && val.equals(inherit)) {
+		throw new InvalidParamException("unrecognize", null, null, ac);
+	    }
+	    
 	    if (op != SPACE)
-			throw new InvalidParamException("operator",
-						((new Character(op)).toString()), ac);
+		throw new InvalidParamException("operator",
+			((new Character(op)).toString()), ac);
 
 	    if (width == null) {
-			try {
-			    width = new CssBorderTopWidth(ac, expression);
-			    find = true;
-			} catch (InvalidParamException e) {}
+		try {
+		    width = new CssBorderTopWidth(ac, expression);
+		    find = true;
+		} catch (InvalidParamException e) {
+		    // nothing to do, style will test the value
+		}
 	    }
 
 	    if (!find && style == null) {
-			try {
-			    style = new CssBorderTopStyle(ac, expression);
-			    find = true;
-			}
-			catch (InvalidParamException e) {}
+		try {
+		    style = new CssBorderTopStyle(ac, expression);
+		    find = true;
+		}
+		catch (InvalidParamException e) {
+		    // nothing to do, color will test the value
+		}
 	    }
 
 	    if (!find && color == null) {
-
-			try {
-			    color = new CssBorderTopColor(ac, expression);
-			    find = true;
-			}
-			catch (InvalidParamException e) {}
+		try {
+		    color = new CssBorderTopColor(ac, expression);
+		    find = true;
+		}
+		catch (InvalidParamException e) {
+		    // nothing to do, uri will test the value
+		}
 	    }
 
 	    if (!find && uri == null) {
-			if (val instanceof CssURL) {
-				uri = val;
-				find = true;
-			}
-		}
-
-		if (!find && imagetransform == null) {
-			try {
-				imagetransform = new CssBorderImageTransform(ac, expression);
-				find = true;
-			} catch (InvalidParamException e) {}
+		if (val instanceof CssURL) {
+		    uri = val;
+		    find = true;
 		}
+	    }
 
-	}
-
+	    if (!find && imagetransform == null) {
+		imagetransform = new CssBorderImageTransform(ac, expression);
+		find = true;
+	    }
+	}*/
+	/*
 	if (width == null) {
 	    width = new CssBorderTopWidth();
 	}
@@ -147,15 +213,15 @@
 	if (color == null) {
 	    color = new CssBorderTopColor();
 	}
-
+	*/
 	//
 
 
 //	top = new CssBorderTop(ac, expression);
-
+/*
 	right = new CssBorderRight();
 	bottom = new CssBorderBottom();
-	left = new CssBorderLeft();
+	left = new CssBorderLeft();*/
 /*
 	right.width  =  new CssBorderRightWidth((CssBorderFaceWidth) top.width.get());
 	left.width   =  new CssBorderLeftWidth((CssBorderFaceWidth) top.width.get());
@@ -171,6 +237,11 @@
 */
     }
 
+    public CssBorder(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */
@@ -210,17 +281,10 @@
      * Returns a string representation of the object.
      */
     public String toString() {
-		String ret = width + " " + style;
-		if (!color.face.isDefault())
-		    ret += " " + color;
-		if (uri != null) {
-			ret += " " + uri.toString();
-		}
-		if (imagetransform != null) {
-			ret += imagetransform;
-		}
-
-		return ret;
+	if(top != null) {
+	    return top.toString();
+	}
+	return "";
     }
 
     public boolean equals(CssProperty property) {
@@ -239,10 +303,18 @@
      * Overrides this method for a macro
      */
     public void setImportant() {
-	top.setImportant();
-	right.setImportant();
-	left.setImportant();
-	bottom.setImportant();
+	if(top != null) {
+	    top.setImportant();
+	}
+	if(right != null) {
+	    right.setImportant();
+	}
+	if(left != null) {
+	    left.setImportant();
+	}
+	if(bottom != null) {
+	    bottom.setImportant();
+	}
     }
 
     /**
@@ -366,10 +438,18 @@
      * @param style The CssStyle
      */
     public void addToStyle(ApplContext ac, CssStyle style) {
-		top.addToStyle(ac, style);
-		right.addToStyle(ac, style);
-		left.addToStyle(ac, style);
-		bottom.addToStyle(ac, style);
+	if(top != null) {
+	    top.addToStyle(ac, style);
+	}
+	if(right != null) {
+	    right.addToStyle(ac, style);
+	}
+	if(left != null) {
+	    left.addToStyle(ac, style);
+	}
+	if(bottom != null) {
+	    bottom.addToStyle(ac, style);
+	}
     }
 
     /**
@@ -401,7 +481,7 @@
 	//bottom.setInfo(line, source);
     }
 
-    void check() {
+    void check() {	
 	//top.check();
 	//bottom.check();
 	//right.check();

Index: CssBorderBottomColor.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderBottomColor.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderBottomColor.java	8 Apr 2002 21:17:42 -0000	1.2
+++ CssBorderBottomColor.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:42  plehegar
  * New
  *
@@ -21,12 +31,12 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssPrinterStyle;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
 import org.w3c.css.values.CssValue;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  * Be careful, this is not a CSS1 property !
@@ -61,12 +71,20 @@
    * @param expression The expression for this property.
    * @exception InvalidParamException Values are incorrect
    */
-  public CssBorderBottomColor(ApplContext ac, CssExpression expression) 
-    throws InvalidParamException {
+  public CssBorderBottomColor(ApplContext ac, CssExpression expression,
+	  boolean check) throws InvalidParamException {
+      
+      if(check && expression.getCount() > 1) {
+	  throw new InvalidParamException("unrecognize", ac);
+      }
 
       setByUser();
-
-    face = new CssBorderFaceColor(ac, expression);
+      face = new CssBorderFaceColor(ac, expression);
+  }
+  
+  public CssBorderBottomColor(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
   }
   
   /**
@@ -80,14 +98,20 @@
    * Returns the color of this property
    */
   public CssValue getColor() {
-    return face.getColor();
+      if(face != null) {
+	  return face.getColor();
+      }
+      return null;
   }
 
   /**
    * Returns a string representation of the object.
    */
   public String toString() {
-    return face.toString();
+      if(face != null) {
+	  return face.toString();
+      }
+      return "";
   }
 
   /**
@@ -140,7 +164,7 @@
    * @see #getPropertyName()
    */  
   public void print(CssPrinterStyle printer) {
-    if (!face.isDefault())
+    if (face != null && !face.isDefault())
       printer.print(this);
   }
 }

Index: CssBorderCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderCSS2.java	8 Apr 2002 21:17:42 -0000	1.2
+++ CssBorderCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:42  plehegar
  * New
  *
@@ -28,13 +38,13 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssPrinterStyle;
 import org.w3c.css.parser.CssSelectors;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
 import org.w3c.css.values.CssValue;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  * @version $Revision$
@@ -62,44 +72,61 @@
      * @param value The value for this property
      * @exception InvalidParamException The value is incorrect
      */  
-    public CssBorderCSS2(ApplContext ac, CssExpression value) throws InvalidParamException {
-	CssValue val = value.getValue();
+    public CssBorderCSS2(ApplContext ac, CssExpression value,
+	    boolean check) throws InvalidParamException {
 	
-	setByUser();
+	if(check && value.getCount() > 3) {
+	     throw new InvalidParamException("unrecognize", ac);
+	}
+	
+	CssValue val = value.getValue();
 	
+	setByUser();	
 	
 	top = new CssBorderTopCSS2(ac, value);
-
+	
 	if (val == value.getValue()) {
 	    throw new InvalidParamException("value", 
 					    value.getValue(), 
 					    getPropertyName(), ac);
-	}
-	
+	}	
 	right = new CssBorderRightCSS2();
 	bottom = new CssBorderBottomCSS2();
 	left = new CssBorderLeftCSS2();
-
-	right.width  = 
-	    new CssBorderRightWidthCSS2((CssBorderFaceWidthCSS2) top.width.get());
-	left.width = 
-	    new CssBorderLeftWidthCSS2((CssBorderFaceWidthCSS2) top.width.get());
-	bottom.width = 
-	    new CssBorderBottomWidthCSS2((CssBorderFaceWidthCSS2) top.width.get());
 	
-	right.style = 
-	    new CssBorderRightStyleCSS2((CssBorderFaceStyleCSS2) top.style.get());
-	left.style = 
-	    new CssBorderLeftStyleCSS2((CssBorderFaceStyleCSS2) top.style.get());
-	bottom.style = 
-	    new CssBorderBottomStyleCSS2((CssBorderFaceStyleCSS2) top.style.get());
+	CssBorderTopWidthCSS2 w = top.width;
+	CssBorderTopStyleCSS2 s = top.style;
+	CssBorderTopColorCSS2 c = top.color;	
 	
-	right.color = 
-	    new CssBorderRightColorCSS2((CssBorderFaceColorCSS2) top.color.get());
-	left.color = 
-	    new CssBorderLeftColorCSS2((CssBorderFaceColorCSS2) top.color.get());
-	bottom.color = 
-	    new CssBorderBottomColorCSS2((CssBorderFaceColorCSS2) top.color.get());
+	if(w != null) {	    
+	    right.width  = 
+		new CssBorderRightWidthCSS2((CssBorderFaceWidthCSS2) w.get());	    
+	    left.width = 
+		new CssBorderLeftWidthCSS2((CssBorderFaceWidthCSS2) w.get());	    
+	    bottom.width = 
+		new CssBorderBottomWidthCSS2((CssBorderFaceWidthCSS2) w.get());	    
+	}	
+	if(s != null) {
+	    right.style = 
+		new CssBorderRightStyleCSS2((CssBorderFaceStyleCSS2) s.get());
+	    left.style = 
+		new CssBorderLeftStyleCSS2((CssBorderFaceStyleCSS2) s.get());
+	    bottom.style = 
+		new CssBorderBottomStyleCSS2((CssBorderFaceStyleCSS2) s.get());
+	}	
+	if(c != null) {
+	    right.color = 
+		new CssBorderRightColorCSS2((CssBorderFaceColorCSS2) c.get());
+	    left.color = 
+		new CssBorderLeftColorCSS2((CssBorderFaceColorCSS2) c.get());
+	    bottom.color = 
+		new CssBorderBottomColorCSS2((CssBorderFaceColorCSS2) c.get());
+	}	
+    }
+    
+    public CssBorderCSS2(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
     }
     
     /**
@@ -141,7 +168,10 @@
      * Returns a string representation of the object.
      */
     public String toString() {
-	return top.toString();
+	if(top != null) {
+	    return top.toString();
+	}
+	return "";
     }
     
     public boolean equals(CssProperty property) {
@@ -160,17 +190,25 @@
      * Overrides this method for a macro
      */  
     public void setImportant() {
-	top.setImportant();
-	right.setImportant();
-	left.setImportant();
-	bottom.setImportant();
+	if(top != null) {
+	    top.setImportant();
+	}
+	if(right != null) {
+	    right.setImportant();
+	}
+	if(left != null) {
+	    left.setImportant();
+	}
+	if(bottom != null) {
+	    bottom.setImportant();
+	}
     }
     
     /**
      * Returns true if this property is important.
      * Overrides this method for a macro
      */
-    public boolean getImportant() {
+    public boolean getImportant() { // FIXME
 	return (top.getImportant() &&
 		right.getImportant() &&
 		left.getImportant() &&
@@ -287,10 +325,18 @@
      * @param style The CssStyle
      */
     public void addToStyle(ApplContext ac, CssStyle style) {
-	top.addToStyle(ac, style);
-	right.addToStyle(ac, style);
-	left.addToStyle(ac, style);
-	bottom.addToStyle(ac, style);
+	if(top != null) {
+	    top.addToStyle(ac, style);
+	}
+	if(right != null) {
+	    right.addToStyle(ac, style);
+	}
+	if(left != null) {
+	    left.addToStyle(ac, style);
+	}
+	if(bottom != null) {
+	    bottom.addToStyle(ac, style);
+	}
     }
     
     /**
@@ -316,16 +362,32 @@
      */  
     public void setInfo(int line, String source) {
 	super.setInfo(line, source);
-	top.setInfo(line, source);
-	right.setInfo(line, source);
-	left.setInfo(line, source);
-	bottom.setInfo(line, source);
+	if(top != null) {
+	    top.setInfo(line, source);
+	}
+	if(right != null) {
+	    right.setInfo(line, source);
+	}
+	if(left != null) {
+	    left.setInfo(line, source);
+	}
+	if(bottom != null) {
+	    bottom.setInfo(line, source);
+	}
     }
     
     void check() {
-	top.check();
-	bottom.check();
-	right.check();
-	left.check();
+	if(top != null) {
+	    top.check();
+	}
+	if(bottom != null) {
+	    bottom.check();
+	}
+	if(right != null) {
+	    right.check();
+	}
+	if(left != null) {
+	    left.check();
+	}
     }
 }

Index: CssBorderTopColor.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderTopColor.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderTopColor.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderTopColor.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -21,12 +31,12 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssPrinterStyle;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
 import org.w3c.css.values.CssValue;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  * Be careful, this is not a CSS1 property !
@@ -59,12 +69,22 @@
      * @param expression The expression fir this property
      * @exception InvalidParamException Values are incorrect
      */
-    public CssBorderTopColor(ApplContext ac, CssExpression expression) 
-	throws InvalidParamException {
+    public CssBorderTopColor(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
 	face = new CssBorderFaceColor(ac, expression);
     }
     
+    public CssBorderTopColor(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression,false);
+    }
+    
     /**
      * Returns the value of this property
      */
@@ -87,7 +107,10 @@
      * Returns a string representation of the object.
      */
     public String toString() {
-	return face.toString();
+	if(face != null) {
+	    return face.toString();
+	}
+	return "";
     }
     
     /**
@@ -140,7 +163,7 @@
      * @see #print(CssPrinterStyle)
      */  
     public void print(CssPrinterStyle printer) {
-	if (!face.isDefault())
+	if (face != null && !face.isDefault())
 	    printer.print(this);
     }
     

Index: CssPaddingBottom.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssPaddingBottom.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssPaddingBottom.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssPaddingBottom.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -28,9 +38,9 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
-import org.w3c.css.values.CssExpression;
-import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
+import org.w3c.css.values.CssExpression;
 
 /**
  *   <H4>
@@ -75,8 +85,14 @@
    * @param expression The expression for this property.
    * @exception InvalidParamException Values are incorrect
    */
-  public CssPaddingBottom(ApplContext ac, CssExpression expression) throws InvalidParamException {
-    super(ac, expression);
+  public CssPaddingBottom(ApplContext ac, CssExpression expression,
+	  boolean check) throws InvalidParamException {
+    super(ac, expression, check);
+  }
+  
+  public CssPaddingBottom(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
   }
   
   /**

Index: CssBorderRightWidthCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderRightWidthCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderRightWidthCSS1.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderRightWidthCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -22,10 +32,10 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
 import org.w3c.css.values.CssValue;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  *   <H4>
@@ -59,103 +69,118 @@
  * @version $Revision$ 
  */
 public class CssBorderRightWidthCSS1 extends CssProperty {
-
-  CssBorderFaceWidthCSS1 face;
-  
-  /**
-   * Create a new CssBorderRightWidth
-   */
-  public CssBorderRightWidthCSS1() {
-    face = new CssBorderFaceWidthCSS1();
-  }
-  
-  /**
-   * Create a new CssBorderRightWidthCSS1 with an another CssBorderFaceWidthCSS1
-   *
-   * @param another The another side.
-   */
-  public CssBorderRightWidthCSS1(CssBorderFaceWidthCSS1 another) {
+    
+    CssBorderFaceWidthCSS1 face;
+    
+    /**
+     * Create a new CssBorderRightWidth
+     */
+    public CssBorderRightWidthCSS1() {
+	face = new CssBorderFaceWidthCSS1();
+    }
+    
+    /**
+     * Create a new CssBorderRightWidthCSS1 with an another CssBorderFaceWidthCSS1
+     *
+     * @param another The another side.
+     */
+    public CssBorderRightWidthCSS1(CssBorderFaceWidthCSS1 another) {
 	setByUser();
-
-    face = another;
-  }
-  
-  /**
-   * Create a new CssBorderRightWidthCSS1
-   *
-   * @param expression The expression for this property.
-   * @exception InvalidParamException Values are incorrect
-   */
-  public CssBorderRightWidthCSS1(ApplContext ac, CssExpression expression)
-    throws InvalidParamException {
+	
+	face = another;
+    }
     
+    /**
+     * Create a new CssBorderRightWidthCSS1
+     *
+     * @param expression The expression for this property.
+     * @exception InvalidParamException Values are incorrect
+     */
+    public CssBorderRightWidthCSS1(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
-
-    face = new CssBorderFaceWidthCSS1(ac, expression);
-  }
-  
-  /**
-   * Returns the value of this property
-   */
-  public Object get() {
-    return face;
-  }
-
-  /**
-   * Return the value of this property
-   */
-  public CssValue getValue() {
-    return face.getValue();
-  }
-
-  /**
-   * Returns a string representation of the object.
-   */
-  public String toString() {
-    return face.toString();
-  }
-
-  /**
-   * Returns the name of this property
-   */  
-  public String getPropertyName() {
-    return "border-right-width";
-  }
-
-  /**
-   * Add this property to the CssStyle.
-   *
-   * @param style The CssStyle
-   */
-  public void addToStyle(ApplContext ac, CssStyle style) {
-    CssBorderRightCSS1 right = ((Css1Style) style).cssBorderCSS1.right;
-    if (right.width != null)
-      style.addRedefinitionWarning(ac, this);
-    right.width = this;
-  }
-
-  /**
-   * Get this property in the style.
-   *
-   * @param style The style where the property is
-   * @param resolve if true, resolve the style to find this property
-   */  
-  public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
-    if (resolve) {
-      return ((Css1Style) style).getBorderRightWidthCSS1();
-    } else {
-      return ((Css1Style) style).cssBorderCSS1.getRight().width;
+	
+	face = new CssBorderFaceWidthCSS1(ac, expression);
     }
-  }
-
-  /**
-   * Compares two properties for equality.
-   *
-   * @param value The other property.
-   */  
-  public boolean equals(CssProperty property) {
-    return (property instanceof CssBorderRightWidthCSS1 && 
-	    face.equals(((CssBorderRightWidthCSS1) property).face));
-  }
-
+    
+    public CssBorderRightWidthCSS1(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression,false);
+    }
+    
+    /**
+     * Returns the value of this property
+     */
+    public Object get() {
+	return face;
+    }
+    
+    /**
+     * Return the value of this property
+     */
+    public CssValue getValue() {
+	if(face != null) {
+	    return face.getValue();
+	}
+	return null;
+    }
+    
+    /**
+     * Returns a string representation of the object.
+     */
+    public String toString() {
+	if(face != null) {
+	    return face.toString();
+	}
+	return "";
+    }
+    
+    /**
+     * Returns the name of this property
+     */  
+    public String getPropertyName() {
+	return "border-right-width";
+    }
+    
+    /**
+     * Add this property to the CssStyle.
+     *
+     * @param style The CssStyle
+     */
+    public void addToStyle(ApplContext ac, CssStyle style) {
+	CssBorderRightCSS1 right = ((Css1Style) style).cssBorderCSS1.right;
+	if (right.width != null)
+	    style.addRedefinitionWarning(ac, this);
+	right.width = this;
+    }
+    
+    /**
+     * Get this property in the style.
+     *
+     * @param style The style where the property is
+     * @param resolve if true, resolve the style to find this property
+     */  
+    public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
+	if (resolve) {
+	    return ((Css1Style) style).getBorderRightWidthCSS1();
+	} else {
+	    return ((Css1Style) style).cssBorderCSS1.getRight().width;
+	}
+    }
+    
+    /**
+     * Compares two properties for equality.
+     *
+     * @param value The other property.
+     */  
+    public boolean equals(CssProperty property) {
+	return (property instanceof CssBorderRightWidthCSS1 && 
+		face.equals(((CssBorderRightWidthCSS1) property).face));
+    }
+    
 }

Index: CssListStyleCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssListStyleCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssListStyleCSS2.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssListStyleCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -33,14 +43,14 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssPrinterStyle;
 import org.w3c.css.parser.CssSelectors;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssOperator;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -120,7 +130,15 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssListStyleCSS2(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssListStyleCSS2(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	int exprLength = expression.getCount();
+	
+	if(check && exprLength > 3) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	char op = SPACE;
 	boolean find = true;
@@ -128,6 +146,9 @@
 	setByUser();
 
 	if (val.equals(inherit)) {
+	    if(exprLength > 1) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    inheritedValue = true;
 	    expression.next();
 	    return;
@@ -138,31 +159,30 @@
 	    val = expression.getValue();
 	    op = expression.getOperator();
 	    
-	    if ((listStyleType == null)
-		&& (val != null)) {
+	    if(val != null && val.equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    
+	    if ((listStyleType == null)	&& (val != null)) {
 		try {
 		    listStyleType = new CssListStyleTypeCSS2(ac, expression);
 		    find = true;
 		} catch (InvalidParamException e) {
 		}
 	    }
-	    if (!find 
-		&& (listStyleImage == null)
-		&& (val != null)) {
+	    if (!find && (listStyleImage == null) && (val != null)) {
 		try {
 		    listStyleImage = new CssListStyleImageCSS2(ac, expression);
 		    find = true;
 		} catch (InvalidParamException e) {
 		} 
 	    }
-	    if (!find 
-		&& (val != null)
-		&& (listStylePosition == null)) {
-		try {
-		    listStylePosition = new CssListStylePositionCSS2(ac, expression);
-		    find = true;
-		} catch (InvalidParamException e) {
-		}
+	    if (!find && (val != null) && (listStylePosition == null)) {
+		listStylePosition = new CssListStylePositionCSS2(ac, expression);
+		find = true;
+	    }
+	    if(val != null && !find) {		
+		throw new InvalidParamException("unrecognize", ac);
 	    }
 	    if (op != SPACE) {
 		throw new InvalidParamException("operator", 
@@ -170,7 +190,7 @@
 						ac);
 	    }
 	}
-	
+	/*
 	if (listStyleType == null) {
 	    listStyleType = new CssListStyleTypeCSS2();
 	}
@@ -182,6 +202,12 @@
 	if (listStylePosition == null) {
 	    listStylePosition = new CssListStylePositionCSS2();
 	}
+	*/
+    }
+    
+    public CssListStyleCSS2(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
     }
     
     /**
@@ -213,14 +239,17 @@
 	if (inheritedValue) {
 	    return inherit.toString();
 	} else {
-	    String ret = listStyleType.toString();
-	    if (!listStyleImage.isDefault()) {
+	    String ret = "";
+	    if(listStyleType != null) {		
+		ret = listStyleType.toString();
+	    }
+	    if (listStyleImage != null &&!listStyleImage.isDefault()) {
 		ret += " " + listStyleImage;
 	    }
-	    if (!listStylePosition.isDefault()) {
+	    if (listStylePosition != null && !listStylePosition.isDefault()) {
 		ret += " " + listStylePosition;
 	    }
-	    return ret;
+	    return ret.trim();
 	}
     }
     
@@ -232,9 +261,12 @@
      */  
     public void setImportant() {
 	if (!inheritedValue) {
-	    listStyleType.important = true;
-	    listStyleImage.important = true;
-	    listStylePosition.important = true;
+	    if(listStyleType != null)		
+		listStyleType.important = true;
+	    if(listStyleImage != null)
+		listStyleImage.important = true;
+	    if(listStylePosition != null)
+		listStylePosition.important = true;
 	}
     }
     
@@ -305,9 +337,12 @@
      */
     public void addToStyle(ApplContext ac, CssStyle style) {
 	if (!inheritedValue) {
-	    listStyleType.addToStyle(ac, style);
-	    listStyleImage.addToStyle(ac, style);
-	    listStylePosition.addToStyle(ac, style);
+	    if(listStyleType != null)
+		listStyleType.addToStyle(ac, style);
+	    if(listStyleImage != null)
+		listStyleImage.addToStyle(ac, style);
+	    if(listStylePosition != null)
+		listStylePosition.addToStyle(ac, style);
 	} else {
 	    ((Css1Style) style).cssListStyleCSS2.inheritedValue = true;
 	}
@@ -337,9 +372,12 @@
     public void setInfo(int line, String source) {
 	super.setInfo(line, source);
 	if (!inheritedValue) {
-	    listStyleType.setInfo(line, source);
-	    listStyleImage.setInfo(line, source);
-	    listStylePosition.setInfo(line, source);
+	    if(listStyleType != null)
+		listStyleType.setInfo(line, source);
+	    if(listStyleImage != null)
+		listStyleImage.setInfo(line, source);
+	    if(listStylePosition != null)
+		listStylePosition.setInfo(line, source);
 	}
     }
     

Index: CssBackground.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBackground.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CssBackground.java	22 Jul 2002 09:08:52 -0000	1.3
+++ CssBackground.java	8 Aug 2005 13:18:12 -0000	1.4
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.4  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.3  2002/07/22 09:08:52  sijtsche
  * shorthand for background-size added
  *
@@ -39,16 +49,15 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssPrinterStyle;
 import org.w3c.css.parser.CssSelectors;
-import org.w3c.css.values.CssOperator;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.properties3.CssBackgroundSize;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
+import org.w3c.css.values.CssOperator;
 import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
-import org.w3c.css.properties3.CssBackgroundSize;
 
 /**
  *   <H4>
@@ -95,8 +104,8 @@
     CssBackgroundRepeat repeat;
     CssBackgroundAttachment attachment;
     CssBackgroundPosition position;
-	CssBackgroundSize size;
-	boolean sizedefined;
+    CssBackgroundSize size;
+    boolean sizedefined;
 
     boolean same;
 
@@ -107,109 +116,107 @@
     }
 
     /**
-     * Set the value of the property
+     * Set the value of the property<br/>
+     * Does not check the number of values
      *
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */
     public CssBackground(ApplContext ac, CssExpression expression)
 	    throws InvalidParamException {
+	this(ac, expression, false);
+    }
+
+    /**
+     * Set the value of the property
+     *
+     * @param expression The expression for this property
+     * @param check set it to true to check the number of values
+     * @exception InvalidParamException The expression is incorrect
+     */
+    public CssBackground(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
 	CssValue val = expression.getValue();
 	char op = SPACE;
 	boolean find = true;
-	sizedefined = false;
 	setByUser();
-
-	if (val.equals(inherit)) {
-	    color = new CssBackgroundColor();
-	    color.color = inherit;
-	    image = new CssBackgroundImage();
-	    image.url = inherit;
-	    repeat = new CssBackgroundRepeat();
-	    repeat.repeat = REPEAT.length - 1;
-	    attachment = new CssBackgroundAttachment();
-	    attachment.attachment = ATTACHMENT.length - 1;
-	    position = new CssBackgroundPosition();
-	    position.horizontal = inherit;
-	    position.vertical = inherit;
-		size = new CssBackgroundSize();
-		size.value1 = inherit;
-	    same = true;
-	    expression.next();
-	    return;
+		
+	// if there are too many values -> error
+	if(check && expression.getCount() > 6) {	    
+	    throw new InvalidParamException("unrecognize", ac);
 	}
-
+	
+	boolean manyValues = (expression.getCount() > 1);
+	
 	while (find) {
 	    find = false;
 	    val = expression.getValue();
 	    op = expression.getOperator();
 
 	    if (val == null) {
-			break;
+		break;
 	    }
-
+	    
+	    // if there are many values, we can't have inherit as one of them
+	    if(manyValues && val != null && val.equals(inherit)) {
+		throw new InvalidParamException("unrecognize", null, null, ac);
+	    }
+	    
 	    if (color == null) {
-			try {
-			    color = new CssBackgroundColor(ac, expression);
-			    find = true;
-			} catch (InvalidParamException e) {}
+		try {
+		    color = new CssBackgroundColor(ac, expression);
+		    find = true;
+		} catch (InvalidParamException e) {
+		    // nothing to do, image will test this value
+		}
 	    }
 	    if (!find && image == null) {
-			try {
-			    image = new CssBackgroundImage(ac, expression);
-			    find = true;
-			} catch (InvalidParamException e) {}
+		try {
+		    image = new CssBackgroundImage(ac, expression);
+		    find = true;
+		} catch (InvalidParamException e) {
+		    // nothing to do, repeat will test this value
+		}
 	    }
 	    if (!find && repeat == null) {
-			try {
-			    repeat = new CssBackgroundRepeat(ac, expression);
-			    find = true;
-			} catch (InvalidParamException e) {}
+		try {
+		    repeat = new CssBackgroundRepeat(ac, expression);
+		    find = true;		    
+		} catch (InvalidParamException e) {		    
+		    // nothing to do, attachment will test this value
+		}
 	    }
 	    if (!find && attachment == null) {
-			try {
-			    attachment = new CssBackgroundAttachment(ac, expression);
-			    find = true;
-			} catch (InvalidParamException e) {}
+		try {
+		    attachment = new CssBackgroundAttachment(ac, expression);
+		    find = true;
+		} catch (InvalidParamException e) {
+		    // nothing to do, position will test this value
+		}
 	    }
 	    if (!find && position == null) {
-			try {
-			    position = new CssBackgroundPosition(ac, expression);
-			    find = true;
-			} catch (InvalidParamException e) {}
+		position = new CssBackgroundPosition(ac, expression);
+		find = true;
 	    }
 	    if (op != SPACE) {
-
-		    if (op != SLASH) {
-				throw new InvalidParamException("operator",
-							((new Character(op)).toString()),
-							ac);
-		    } else {
-				//try {
-					size = new CssBackgroundSize(ac, expression);
-					sizedefined = true;
-					break;
-				//} catch (InvalidParamException e) {
-					// error!
-				//}
-			}
+		if (op != SLASH) {
+		    throw new InvalidParamException("operator",
+			    ((new Character(op)).toString()),
+			    ac);
+		} else {
+		    //try {
+		    size = new CssBackgroundSize(ac, expression);
+		    sizedefined = true;
+		    break;
+		    //} catch (InvalidParamException e) {
+		    // error!
+		    //}
+		}
 	    }
 	}
-
-	if (color == null)
-	    color = new CssBackgroundColor();
-	if (image == null)
-	    image = new CssBackgroundImage();
-	if (repeat == null)
-	    repeat = new CssBackgroundRepeat();
-	if (attachment == null)
-	    attachment = new CssBackgroundAttachment();
-	if (position == null)
-	    position = new CssBackgroundPosition();
-    if (!sizedefined)
-    	size = new CssBackgroundSize();
     }
-
+    
 
     /**
      * Returns the value of this property
@@ -240,7 +247,40 @@
      * Returns a string representation of the object.
      */
     public String toString() {
-	if (same) {
+	String ret = "";
+	if(color != null) {
+	    ret += color;
+	}
+	if(image != null) {
+	    if(ret != null) {
+		ret += " ";
+	    }
+	    ret += image;
+	}
+	if(repeat != null) {
+	    if(ret != null) {
+		ret += " ";
+	    }
+	    ret += repeat;
+	}
+	if(attachment != null) {
+	    if(ret != null) {
+		ret += " ";
+	    }
+	    ret += attachment;
+	}
+	if(position != null) {
+	    if(ret != null) {
+		ret += " ";
+	    }
+	    ret += position;
+	}
+	if(sizedefined) {	    
+	    ret += "/";
+	    ret += size;
+	}
+	return ret;
+	/*if (same) {
 	    return inherit.toString();
 	} else {
 	    String ret = "";
@@ -254,10 +294,11 @@
 		ret += " " + attachment.toString();
 	    if (position.byUser)
 			ret += " " + position.toString();
+		
 	    if (sizedefined)
 			ret += "/" + size.toString();
 		return ret.trim();
-	}
+	}*/
     }
 
     /**
@@ -265,11 +306,21 @@
      * Overrides this method for a macro
      */
     public void setImportant() {
-	color.important = true;
-	image.important = true;
-	repeat.important = true;
-	attachment.important = true;
-	position.important = true;
+	if(color != null) {
+	    color.important = true;
+	}
+	if(image != null) {
+	    image.important = true;
+	}
+	if(repeat != null) {
+	    repeat.important = true;
+	}
+	if(attachment != null) {
+	    attachment.important = true;
+	}
+	if(position != null) {
+	    position.important = true;
+	}
     }
 
     /**
@@ -354,11 +405,21 @@
 	((Css1Style) style).cssBackground.same = same;
 	((Css1Style) style).cssBackground.byUser = byUser;
 
-	color.addToStyle(ac, style);
-	image.addToStyle(ac, style);
-	repeat.addToStyle(ac, style);
-	attachment.addToStyle(ac, style);
-	position.addToStyle(ac, style);
+	if(color != null) {
+	    color.addToStyle(ac, style);
+	}
+	if(image != null) {
+	    image.addToStyle(ac, style);
+	}
+	if(repeat != null) {
+	    repeat.addToStyle(ac, style);
+	}
+	if(attachment != null) {
+	    attachment.addToStyle(ac, style);
+	}
+	if(position != null) {
+	    position.addToStyle(ac, style);
+	}
     }
 
     /**
@@ -393,11 +454,21 @@
      */
     public void setInfo(int line, String source) {
 	super.setInfo(line, source);
-	color.setInfo(line, source);
-	image.setInfo(line, source);
-	repeat.setInfo(line, source);
-	attachment.setInfo(line, source);
-	position.setInfo(line, source);
+	if(color != null) {
+	    color.setInfo(line, source);
+	}
+	if(image != null) {
+	    image.setInfo(line, source);
+	}
+	if(repeat != null) {
+	    repeat.setInfo(line, source);
+	}
+	if(attachment != null) {
+	    attachment.setInfo(line, source);
+	}
+	if(position != null) {
+	    position.setInfo(line, source);
+	}
     }
 
 }

Index: CssMinWidthATSC.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssMinWidthATSC.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssMinWidthATSC.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssMinWidthATSC.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -9,14 +9,13 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssLength;
+import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssPercentage;
-import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  */
@@ -36,7 +35,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssMinWidthATSC(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssMinWidthATSC(ApplContext ac, CssExpression expression,
+	boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	
 	setByUser();
@@ -62,6 +67,11 @@
 	expression.next();
     }
     
+    public CssMinWidthATSC(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property.
      */

Index: CssUnicodeBidi.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssUnicodeBidi.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CssUnicodeBidi.java	28 Jul 2003 10:34:21 -0000	1.3
+++ CssUnicodeBidi.java	8 Aug 2005 13:18:12 -0000	1.4
@@ -9,13 +9,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssLength;
-import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  */
@@ -42,8 +40,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */
-    public CssUnicodeBidi(ApplContext ac, CssExpression expression)
+    public CssUnicodeBidi(ApplContext ac, CssExpression expression, boolean check)
 	    throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 
 	setByUser();
@@ -65,7 +68,12 @@
 	}
 
     }
-
+    
+    public CssUnicodeBidi(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssListStyleTV.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssListStyleTV.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CssListStyleTV.java	19 Aug 2002 07:39:13 -0000	1.1
+++ CssListStyleTV.java	8 Aug 2005 13:18:12 -0000	1.2
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.2  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.1  2002/08/19 07:39:13  sijtsche
  * new TV profile property variant
  *
@@ -36,14 +46,14 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssPrinterStyle;
 import org.w3c.css.parser.CssSelectors;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssOperator;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -123,7 +133,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */
-    public CssListStyleTV(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssListStyleTV(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 3) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	char op = SPACE;
 	boolean find = true;
@@ -131,6 +147,9 @@
 	setByUser();
 
 	if (val.equals(inherit)) {
+	    if(expression.getCount() > 1) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    inheritedValue = true;
 	    expression.next();
 	    return;
@@ -140,7 +159,11 @@
 	    find = false;
 	    val = expression.getValue();
 	    op = expression.getOperator();
-
+	    
+	    if(val.equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    
 	    if ((listStyleType == null)
 		&& (val != null)) {
 		try {
@@ -158,14 +181,9 @@
 		} catch (InvalidParamException e) {
 		}
 	    }
-	    if (!find
-		&& (val != null)
-		&& (listStylePosition == null)) {
-		try {
-		    listStylePosition = new CssListStylePositionCSS2(ac, expression);
-		    find = true;
-		} catch (InvalidParamException e) {
-		}
+	    if (!find && (val != null) && (listStylePosition == null)) {
+		listStylePosition = new CssListStylePositionCSS2(ac, expression);
+		find = true;
 	    }
 	    if (op != SPACE) {
 		throw new InvalidParamException("operator",
@@ -173,7 +191,7 @@
 						ac);
 	    }
 	}
-
+	/*
 	if (listStyleType == null) {
 	    listStyleType = new CssListStyleTypeTV();
 	}
@@ -185,8 +203,14 @@
 	if (listStylePosition == null) {
 	    listStylePosition = new CssListStylePositionCSS2();
 	}
+	*/
     }
 
+    CssListStyleTV(ApplContext ac, CssExpression expression)
+    	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */
@@ -216,14 +240,17 @@
 	if (inheritedValue) {
 	    return inherit.toString();
 	} else {
-	    String ret = listStyleType.toString();
-	    if (!listStyleImage.isDefault()) {
+	    String ret = "";
+	    if(listStyleType != null) {
+		ret = listStyleType.toString();
+	    }
+	    if (listStyleImage != null &&!listStyleImage.isDefault()) {
 		ret += " " + listStyleImage;
 	    }
-	    if (!listStylePosition.isDefault()) {
+	    if (listStyleImage != null && !listStylePosition.isDefault()) {
 		ret += " " + listStylePosition;
 	    }
-	    return ret;
+	    return ret.trim();
 	}
     }
 
@@ -235,9 +262,12 @@
      */
     public void setImportant() {
 	if (!inheritedValue) {
-	    listStyleType.important = true;
-	    listStyleImage.important = true;
-	    listStylePosition.important = true;
+	    if(listStyleType != null)	    
+		listStyleType.important = true;
+	    if(listStyleImage != null)
+		listStyleImage.important = true;
+	    if(listStylePosition != null)
+		listStylePosition.important = true;
 	}
     }
 
@@ -308,9 +338,12 @@
      */
     public void addToStyle(ApplContext ac, CssStyle style) {
 	if (!inheritedValue) {
-	    listStyleType.addToStyle(ac, style);
-	    listStyleImage.addToStyle(ac, style);
-	    listStylePosition.addToStyle(ac, style);
+	    if(listStyleType != null)
+		listStyleType.addToStyle(ac, style);
+	    if(listStyleImage != null)
+		listStyleImage.addToStyle(ac, style);
+	    if(listStylePosition != null)
+		listStylePosition.addToStyle(ac, style);
 	} else {
 	    ((Css1Style) style).cssListStyleTV.inheritedValue = true;
 	}
@@ -340,9 +373,12 @@
     public void setInfo(int line, String source) {
 	super.setInfo(line, source);
 	if (!inheritedValue) {
-	    listStyleType.setInfo(line, source);
-	    listStyleImage.setInfo(line, source);
-	    listStylePosition.setInfo(line, source);
+	    if(listStyleType != null)
+		listStyleType.setInfo(line, source);
+	    if(listStyleImage != null)
+		listStyleImage.setInfo(line, source);
+	    if(listStylePosition != null)
+		listStylePosition.setInfo(line, source);
 	}
     }
 

Index: CssListStylePositionCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssListStylePositionCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssListStylePositionCSS1.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssListStylePositionCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -31,11 +41,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -70,8 +80,12 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssListStylePositionCSS1(ApplContext ac, CssExpression expression)
-	throws InvalidParamException {
+    public CssListStylePositionCSS1(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
 	
 	CssValue val = expression.getValue();
 	
@@ -90,6 +104,11 @@
 	}
     }
     
+    public CssListStylePositionCSS1(ApplContext ac, CssExpression expression)
+    	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssWhiteSpace.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssWhiteSpace.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssWhiteSpace.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssWhiteSpace.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -31,11 +41,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -85,7 +95,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException values are incorrect
      */  
-    public CssWhiteSpace(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssWhiteSpace(ApplContext ac, CssExpression expression, boolean check)
+    	throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	
 	setByUser();
@@ -104,6 +120,10 @@
 					getPropertyName(), ac);
     }
     
+    public CssWhiteSpace(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
     
     /**
      * Returns the value of this property

Index: CssClear.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssClear.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssClear.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssClear.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -22,11 +32,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -69,7 +79,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssClear(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssClear(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	
 	setByUser();
@@ -86,6 +102,11 @@
 					getPropertyName(), ac);
     }
     
+    public CssClear(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssBackgroundCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBackgroundCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBackgroundCSS1.java	8 Apr 2002 21:17:42 -0000	1.2
+++ CssBackgroundCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:42  plehegar
  * New
  *
@@ -36,15 +46,14 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssPrinterStyle;
 import org.w3c.css.parser.CssSelectors;
-import org.w3c.css.values.CssOperator;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
+import org.w3c.css.values.CssOperator;
 import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  *   <H4>
@@ -106,30 +115,20 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssBackgroundCSS1(ApplContext ac, CssExpression expression) 
-	    throws InvalidParamException {
+    public CssBackgroundCSS1(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
 	CssValue val = expression.getValue();
 	char op = SPACE;
 	boolean find = true;
-	setByUser();
-
-	if (val.equals(inherit)) {
-	    color = new CssBackgroundColorCSS1();
-	    color.color = inherit;
-	    image = new CssBackgroundImageCSS1();
-	    image.url = inherit;
-	    repeat = new CssBackgroundRepeatCSS1();
-	    repeat.repeat = REPEAT.length - 1;
-	    attachment = new CssBackgroundAttachmentCSS1();
-	    attachment.attachment = ATTACHMENT.length - 1;
-	    position = new CssBackgroundPositionCSS1();
-	    position.horizontal = inherit;
-	    position.vertical = inherit;
-	    same = true;
-	    expression.next();
-	    return;
+	
+	// too many values
+	if(check  && expression.getCount() > 6) {
+	    throw new InvalidParamException("unrecognize", ac);
 	}
 	
+	setByUser();
+	
 	while (find) {
 	    find = false;
 	    val = expression.getValue();
@@ -151,6 +150,7 @@
 		    image = new CssBackgroundImageCSS1(ac, expression);
 		    find = true;
 		} catch (InvalidParamException e) {
+		    // nothing to do, repeat will test this value
 		}
 	    }
 	    if (!find && repeat == null) {
@@ -158,6 +158,7 @@
 		    repeat = new CssBackgroundRepeatCSS1(ac, expression);
 		    find = true;
 		} catch (InvalidParamException e) {
+		    // nothing to do, attachment will test this value
 		}
 	    }
 	    if (!find && attachment == null) {
@@ -165,14 +166,12 @@
 		    attachment = new CssBackgroundAttachmentCSS1(ac, expression);
 		    find = true;
 		} catch (InvalidParamException e) {
+		    // nothing to do, position will test this value
 		}
 	    }
 	    if (!find && position == null) {
-		try {
-		    position = new CssBackgroundPositionCSS1(ac, expression);
-		    find = true;
-		} catch (InvalidParamException e) {
-		}
+		position = new CssBackgroundPositionCSS1(ac, expression);
+		find = true;
 	    }
 	    if (op != SPACE) {
 		throw new InvalidParamException("operator", 
@@ -180,7 +179,7 @@
 						ac);
 	    }
 	}
-
+	/*
 	if (color == null)
 	    color = new CssBackgroundColorCSS1();
 	if (image == null)
@@ -191,6 +190,12 @@
 	    attachment = new CssBackgroundAttachmentCSS1();
 	if (position == null)
 	    position = new CssBackgroundPositionCSS1();
+	*/
+    }
+    
+    public CssBackgroundCSS1(ApplContext ac, CssExpression expression)
+	    throws InvalidParamException {
+	this(ac, expression, false);
     }
     
     /**
@@ -222,6 +227,36 @@
      * Returns a string representation of the object.
      */
     public String toString() {
+	String ret = "";
+	if(color != null) {
+	    ret += color;
+	}
+	if(image != null) {
+	    if(ret != null) {
+		ret += " ";
+	    }
+	    ret += image;
+	}
+	if(repeat != null) {
+	    if(ret != null) {
+		ret += " ";
+	    }
+	    ret += repeat;
+	}
+	if(attachment != null) {
+	    if(ret != null) {
+		ret += " ";
+	    }
+	    ret += attachment;
+	}
+	if(position != null) {
+	    if(ret != null) {
+		ret += " ";
+	    }
+	    ret += position;
+	}
+	return ret;
+	/*
 	if (same) {
 	    return inherit.toString();
 	} else {
@@ -237,7 +272,7 @@
 	    if (position.byUser)
 		ret += " " + position.toString();
 	    return ret.trim();
-	}
+	}*/
     }
     
     /**
@@ -245,11 +280,21 @@
      * Overrides this method for a macro
      */  
     public void setImportant() {
-	color.important = true;
-	image.important = true;
-	repeat.important = true;
-	attachment.important = true;
-	position.important = true;
+	if(color != null) {
+	    color.important = true;
+	}
+	if(image != null) {
+	    image.important = true;
+	}
+	if(repeat != null) {
+	    repeat.important = true;
+	}
+	if(attachment != null) {
+	    attachment.important = true;
+	}
+	if(position != null) {
+	    position.important = true;
+	}
     }
     
     /**
@@ -334,11 +379,21 @@
 	((Css1Style) style).cssBackgroundCSS1.same = same;
 	((Css1Style) style).cssBackgroundCSS1.byUser = byUser;
 
-	color.addToStyle(ac, style);
-	image.addToStyle(ac, style);
-	repeat.addToStyle(ac, style);
-	attachment.addToStyle(ac, style);
-	position.addToStyle(ac, style);
+	if(color != null) {
+	    color.addToStyle(ac, style);
+	}
+	if(image != null) {
+	    image.addToStyle(ac, style);
+	}
+	if(repeat != null) {
+	    repeat.addToStyle(ac, style);
+	}
+	if(attachment != null) {
+	    attachment.addToStyle(ac, style);
+	}
+	if(position != null) {
+	    position.addToStyle(ac, style);
+	}
     }
     
     /**
@@ -360,7 +415,7 @@
      *
      * @param value The other property.
      */  
-    public boolean equals(CssProperty property) {
+    public boolean equals(CssProperty property) {	
 	return false; // FIXME
     }
     
@@ -373,11 +428,20 @@
      */  
     public void setInfo(int line, String source) {
 	super.setInfo(line, source);
-	color.setInfo(line, source);
-	image.setInfo(line, source);
-	repeat.setInfo(line, source);
-	attachment.setInfo(line, source);
-	position.setInfo(line, source);
-    }
-    
+	if(color != null) {
+	    color.setInfo(line, source);
+	}
+	if(image != null) {
+	    image.setInfo(line, source);
+	}
+	if(repeat != null) {
+	    repeat.setInfo(line, source);
+	}
+	if(attachment != null) {
+	    attachment.setInfo(line, source);
+	}
+	if(position != null) {
+	    position.setInfo(line, source);
+	}
+    }    
 }

Index: CssListStyleImageCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssListStyleImageCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssListStyleImageCSS1.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssListStyleImageCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -31,12 +41,12 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssURL;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssURL;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -76,8 +86,13 @@
      * @param value The value for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssListStyleImageCSS1(ApplContext ac, CssExpression expression) 
-	    throws InvalidParamException {
+    public CssListStyleImageCSS1(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	
 	setByUser();
@@ -96,6 +111,11 @@
 	}
     }
     
+    public CssListStyleImageCSS1(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssTextAlignTV.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssTextAlignTV.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CssTextAlignTV.java	19 Aug 2002 07:38:04 -0000	1.1
+++ CssTextAlignTV.java	8 Aug 2005 13:18:12 -0000	1.2
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.2  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.1  2002/08/19 07:38:04  sijtsche
  * new tv profile property variant
  *
@@ -34,12 +44,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.values.CssString;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -90,7 +99,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */
-    public CssTextAlignTV(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssTextAlignTV(ApplContext ac, CssExpression expression, boolean check)
+    	throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	int hash = val.hashCode();
 
@@ -102,17 +117,22 @@
 	    return;
 	} else if (val instanceof CssIdent) {
 	    for (int i = 0; i < TEXTALIGNTV.length; i++) {
-			if (hash_values[i] == hash) {
-			    value = i;
-			    expression.next();
-			    return;
-			}
+		if (hash_values[i] == hash) {
+		    value = i;
+		    expression.next();
+		    return;
+		}
 	    }
 	}
 
 	throw new InvalidParamException("value", val.toString(), getPropertyName(), ac);
     }
 
+    public CssTextAlignTV(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssTextIndentMob.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssTextIndentMob.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssTextIndentMob.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssTextIndentMob.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -31,13 +41,12 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssPercentage;
 import org.w3c.css.values.CssLength;
 import org.w3c.css.values.CssNumber;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -77,7 +86,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssTextIndentMob(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssTextIndentMob(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	
 	setByUser();
@@ -96,6 +111,11 @@
 	expression.next();
     }
     
+    public CssTextIndentMob(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssMaxWidthATSC.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssMaxWidthATSC.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssMaxWidthATSC.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssMaxWidthATSC.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -9,14 +9,14 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssNumber;
+import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssLength;
+import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssPercentage;
-import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  */
@@ -39,7 +39,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssMaxWidthATSC(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssMaxWidthATSC(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	
 	setByUser();
@@ -67,6 +73,11 @@
 	expression.next();
     }
     
+    public CssMaxWidthATSC(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property.
      */

Index: CssBackgroundConstants.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBackgroundConstants.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBackgroundConstants.java	8 Apr 2002 21:17:42 -0000	1.2
+++ CssBackgroundConstants.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:42  plehegar
  * New
  *
@@ -23,8 +33,6 @@
  *
  */
 package org.w3c.css.properties;
-import org.w3c.css.values.*;
-import org.w3c.css.util.*;
 
 /**
  * @version $Revision$
@@ -61,4 +69,9 @@
    * The right position
    */  
   static int POSITION_RIGHT = 4;
+  
+  /**
+   * Inherit
+   */  
+  static int POSITION_INHERIT = 5;
 }

Index: CssBorderLeftStyleCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderLeftStyleCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderLeftStyleCSS2.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderLeftStyleCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -22,111 +32,125 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
-import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
+import org.w3c.css.values.CssExpression;
 
 /**
  * Be careful, this is not a CSS1 property !
  * @version $Revision$
  */
 public class CssBorderLeftStyleCSS2 extends CssProperty {
-
-  CssBorderFaceStyleCSS2 face;
-  
-  /**
-   * Create a new CssBorderLeftStyleCSS2
-   */
-  public CssBorderLeftStyleCSS2() {
-    face = new CssBorderFaceStyleCSS2();
-  }
-  
-  /**
-   * Create a new CssBorderLeftStyleCSS2 with an another CssBorderFaceStyleCSS2
-   *
-   * @param another The another side.
-   */
-  public CssBorderLeftStyleCSS2(CssBorderFaceStyleCSS2 another) {
+    
+    CssBorderFaceStyleCSS2 face;
+    
+    /**
+     * Create a new CssBorderLeftStyleCSS2
+     */
+    public CssBorderLeftStyleCSS2() {
+	face = new CssBorderFaceStyleCSS2();
+    }
+    
+    /**
+     * Create a new CssBorderLeftStyleCSS2 with an another CssBorderFaceStyleCSS2
+     *
+     * @param another The another side.
+     */
+    public CssBorderLeftStyleCSS2(CssBorderFaceStyleCSS2 another) {
 	setByUser();
-
-    face = another;
-  }
-  
-  /**
-   * Create a new CssBorderLeftStyleCSS2
-   *
-   * @param expression The expression for this property.
-   * @exception InvalidParamException Values are incorrect
-   */
-  public CssBorderLeftStyleCSS2(ApplContext ac, CssExpression expression) 
-    throws InvalidParamException {
-
+	
+	face = another;
+    }
+    
+    /**
+     * Create a new CssBorderLeftStyleCSS2
+     *
+     * @param expression The expression for this property.
+     * @exception InvalidParamException Values are incorrect
+     */
+    public CssBorderLeftStyleCSS2(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
-    face = new CssBorderFaceStyleCSS2(ac, expression);
-  }
-  
-  /**
-   * Returns the value of this property
-   */
-  public Object get() {
-    return face;
-  }
-
-  /**
-   * Returns the value
-   */
-  public String getStyle() {
-    return face.getStyle();
-  }
-
-  /**
-   * Returns a string representation of the object.
-   */
-  public String toString() {
-    return face.toString();
-  }
-
-  /**
-   * Returns the name of this property
-   */  
-  public String getPropertyName() {
-    return "border-left-style";
-  }
-
-  /**
-   * Add this property to the CssStyle.
-   *
-   * @param style The CssStyle
-   */
-  public void addToStyle(ApplContext ac, CssStyle style) {
-    CssBorderLeftCSS2 left = ((Css1Style) style).cssBorderCSS2.left;
-    if (left.style != null)
-      style.addRedefinitionWarning(ac, this);
-    left.style = this;
-  }
-
-  /**
-   * Get this property in the style.
-   *
-   * @param style The style where the property is
-   * @param resolve if true, resolve the style to find this property
-   */  
-  public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
-    if (resolve) {
-      return ((Css1Style) style).getBorderLeftStyleCSS2();
-    } else {
-      return ((Css1Style) style).cssBorderCSS2.getLeft().style;
+	face = new CssBorderFaceStyleCSS2(ac, expression);
     }
-  }
-
-  /**
-   * Compares two properties for equality.
-   *
-   * @param value The other property.
-   */  
-  public boolean equals(CssProperty property) {
-    return (property instanceof CssBorderLeftStyleCSS2 && face.equals(((CssBorderLeftStyleCSS2) property).face));
-  }
-
+    
+    public CssBorderLeftStyleCSS2(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression,false);
+    }
+    
+    /**
+     * Returns the value of this property
+     */
+    public Object get() {
+	return face;
+    }
+    
+    /**
+     * Returns the value
+     */
+    public String getStyle() {
+	if(face != null) {
+	    return face.getStyle();
+	}
+	return null;
+    }
+    
+    /**
+     * Returns a string representation of the object.
+     */
+    public String toString() {
+	if(face != null) {
+	    return face.toString();
+	}
+	return "";
+    }
+    
+    /**
+     * Returns the name of this property
+     */  
+    public String getPropertyName() {
+	return "border-left-style";
+    }
+    
+    /**
+     * Add this property to the CssStyle.
+     *
+     * @param style The CssStyle
+     */
+    public void addToStyle(ApplContext ac, CssStyle style) {
+	CssBorderLeftCSS2 left = ((Css1Style) style).cssBorderCSS2.left;
+	if (left.style != null)
+	    style.addRedefinitionWarning(ac, this);
+	left.style = this;
+    }
+    
+    /**
+     * Get this property in the style.
+     *
+     * @param style The style where the property is
+     * @param resolve if true, resolve the style to find this property
+     */  
+    public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
+	if (resolve) {
+	    return ((Css1Style) style).getBorderLeftStyleCSS2();
+	} else {
+	    return ((Css1Style) style).cssBorderCSS2.getLeft().style;
+	}
+    }
+    
+    /**
+     * Compares two properties for equality.
+     *
+     * @param value The other property.
+     */  
+    public boolean equals(CssProperty property) {
+	return (property instanceof CssBorderLeftStyleCSS2 && face.equals(((CssBorderLeftStyleCSS2) property).face));
+    }
+    
 }

Index: CssBorderLeftColorCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderLeftColorCSS1.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderLeftColorCSS1.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderLeftColorCSS1.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -21,12 +31,12 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssPrinterStyle;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
 import org.w3c.css.values.CssValue;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 
 /**
@@ -35,109 +45,125 @@
  * @version $Revision$
  */
 public class CssBorderLeftColorCSS1 extends CssProperty {
-
-  CssBorderFaceColorCSS1 face;
-  
-  /**
-   * Create a new CssBorderLeftColorCSS1
-   */
-  public CssBorderLeftColorCSS1() {
-    face = new CssBorderFaceColorCSS1();
-  }
-  
-  /**
-   * Create a new CssBorderLeftColorCSS1 with an another CssBorderFaceColorCSS1
-   * @param another The another side.
-   */
-  public CssBorderLeftColorCSS1(CssBorderFaceColorCSS1 another) {
-
-      setByUser();
-
-    face = another;
-  }
-  
-  /**
-   * Create a new CssBorderLeftColorCSS1
-   *
-   * @param expression The expression for this property.
-   * @exception InvalidParamException Values are incorrect
-   */
-  public CssBorderLeftColorCSS1(ApplContext ac, CssExpression expression) throws InvalidParamException {
-
+    
+    CssBorderFaceColorCSS1 face;
+    
+    /**
+     * Create a new CssBorderLeftColorCSS1
+     */
+    public CssBorderLeftColorCSS1() {
+	face = new CssBorderFaceColorCSS1();
+    }
+    
+    /**
+     * Create a new CssBorderLeftColorCSS1 with an another CssBorderFaceColorCSS1
+     * @param another The another side.
+     */
+    public CssBorderLeftColorCSS1(CssBorderFaceColorCSS1 another) {
+	
 	setByUser();
-    face = new CssBorderFaceColorCSS1(ac, expression);
-  }
-  
-  /**
-   * Returns the value of this property
-   */
-  public Object get() {
-    return face;
-  }
-
-  /**
-   * Returns the color of this property
-   */
-  public CssValue getColor() {
-    return face.getColor();
-  }
-
-  /**
-   * Returns a string representation of the object.
-   */
-  public String toString() {
-    return face.toString();
-  }
-
-  /**
-   * Returns the name of this property
-   */  
-  public String getPropertyName() {
-    return "border-left-color";
-  }
-
-  /**
-   * Add this property to the CssStyle.
-   *
-   * @param style The CssStyle
-   */
-  public void addToStyle(ApplContext ac, CssStyle style) {
-    CssBorderLeftCSS1 left = ((Css1Style) style).cssBorderCSS1.left;
-    if (left.color != null)
-      style.addRedefinitionWarning(ac, this);
-    left.color = this;
-  }
-
-  /**
-   * Get this property in the style.
-   *
-   * @param style The style where the property is
-   * @param resolve if true, resolve the style to find this property
-   */  
-  public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
-    if (resolve) {
-      return ((Css1Style) style).getBorderLeftColorCSS1();
-    } else {
-      return ((Css1Style) style).cssBorderCSS1.getLeft().color;
+	
+	face = another;
+    }
+    
+    /**
+     * Create a new CssBorderLeftColorCSS1
+     *
+     * @param expression The expression for this property.
+     * @exception InvalidParamException Values are incorrect
+     */
+    public CssBorderLeftColorCSS1(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
+	setByUser();
+	face = new CssBorderFaceColorCSS1(ac, expression);
+    }
+    
+    public CssBorderLeftColorCSS1(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
+    /**
+     * Returns the value of this property
+     */
+    public Object get() {
+	return face;
+    }
+    
+    /**
+     * Returns the color of this property
+     */
+    public CssValue getColor() {
+	if(face != null) {
+	    return face.getColor();
+	}
+	return null;
+    }
+    
+    /**
+     * Returns a string representation of the object.
+     */
+    public String toString() {
+	if(face != null) {
+	    return face.toString();
+	}
+	return "";
+    }
+    
+    /**
+     * Returns the name of this property
+     */  
+    public String getPropertyName() {
+	return "border-left-color";
+    }
+    
+    /**
+     * Add this property to the CssStyle.
+     *
+     * @param style The CssStyle
+     */
+    public void addToStyle(ApplContext ac, CssStyle style) {
+	CssBorderLeftCSS1 left = ((Css1Style) style).cssBorderCSS1.left;
+	if (left.color != null)
+	    style.addRedefinitionWarning(ac, this);
+	left.color = this;
+    }
+    
+    /**
+     * Get this property in the style.
+     *
+     * @param style The style where the property is
+     * @param resolve if true, resolve the style to find this property
+     */  
+    public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
+	if (resolve) {
+	    return ((Css1Style) style).getBorderLeftColorCSS1();
+	} else {
+	    return ((Css1Style) style).cssBorderCSS1.getLeft().color;
+	}
+    }
+    
+    /**
+     * Compares two properties for equality.
+     *
+     * @param value The other property.
+     */  
+    public boolean equals(CssProperty property) {
+	return (property instanceof CssBorderLeftColorCSS1 && face.equals(((CssBorderLeftColorCSS1) property).face));
+    }
+    
+    /**
+     * Print this property
+     *
+     * @param printer The printer.
+     */  
+    public void print(CssPrinterStyle printer) {
+	if (face != null && !face.isDefault())
+	    printer.print(this);
     }
-  }
-
-  /**
-   * Compares two properties for equality.
-   *
-   * @param value The other property.
-   */  
-  public boolean equals(CssProperty property) {
-    return (property instanceof CssBorderLeftColorCSS1 && face.equals(((CssBorderLeftColorCSS1) property).face));
-  }
-
-  /**
-   * Print this property
-   *
-   * @param printer The printer.
-   */  
-  public void print(CssPrinterStyle printer) {
-    if (!face.isDefault())
-      printer.print(this);
-  }
 }

Index: CssQuotesATSC.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssQuotesATSC.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssQuotesATSC.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssQuotesATSC.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -11,15 +11,13 @@
 import java.util.Vector;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssURL;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.values.CssFunction;
 import org.w3c.css.values.CssOperator;
 import org.w3c.css.values.CssString;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  */
@@ -42,7 +40,9 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssQuotesATSC(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssQuotesATSC(ApplContext ac, CssExpression expression, boolean check)
+    	throws InvalidParamException {
+	
 	CssValue val = expression.getValue();
 	int counter = 0;
 	char op = expression.getOperator();
@@ -51,10 +51,16 @@
 
 	setByUser();
 	if (val.equals(inherit)) {
+	    if(expression.getCount() > 1) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    values.addElement(inherit);
 	    expression.next();
 	    return;
 	} else if (val.equals(none)) {
+	    if(expression.getCount() > 1) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    values.addElement(none);
 	    expression.next();
 	    return;
@@ -91,6 +97,11 @@
 
     }
     
+    public CssQuotesATSC(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssMarginTop.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssMarginTop.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssMarginTop.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssMarginTop.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -28,9 +38,9 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
-import org.w3c.css.values.CssExpression;
-import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
+import org.w3c.css.values.CssExpression;
 
 /**
  *   <H4>
@@ -75,10 +85,16 @@
    * @param expression The expression for this property.
    * @exception InvalidParamException Values are incorrect
    */
-  public CssMarginTop(ApplContext ac, CssExpression expression) throws InvalidParamException {
+  public CssMarginTop(ApplContext ac, CssExpression expression)
+  	throws InvalidParamException {
     super(ac, expression);
   }
   
+  public CssMarginTop(ApplContext ac, CssExpression expression, boolean check)
+  	throws InvalidParamException {
+      super(ac, expression, check);
+    }
+  
   /**
    * Returns the name of this property
    */  

Index: CssTextDecorationMob.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssTextDecorationMob.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssTextDecorationMob.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssTextDecorationMob.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -34,11 +44,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  *   <H4>
@@ -100,29 +110,45 @@
      * @param expression The expression for this property
      * @exception InvalidParamException Values are incorrect
      */  
-    public CssTextDecorationMob(ApplContext ac, CssExpression expression) 
-	    throws InvalidParamException {
+    public CssTextDecorationMob(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
 	CssValue val = expression.getValue();
 	boolean find = true;
-	int computed = 0;
+	//int computed = 0;
 	int index = INVALID;
 	
 	setByUser();
 	
 	if (val.equals(none)) {
+	    if(expression.getCount() > 1) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    value = none;
 	    expression.next();
 	    return;
 	} else if (val.equals(inherit)) {
+	    if(expression.getCount() > 1) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
 	    value = inherit;
 	    expression.next();
 	    return;
 	}
 	val = null;
 	
+	if(check && expression.getCount() > 4) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	while (find) {
 	    find = false;
 	    val = expression.getValue();
+	    
+	    if(val != null && val.equals(inherit)) {
+		throw new InvalidParamException("unrecognize", ac);
+	    }
+	    
 	    if (val instanceof CssIdent) {
 		index = getIndex((CssIdent) val, ac);
 		if (values[index] == true) {
@@ -140,6 +166,11 @@
 	}
     }
     
+    public CssTextDecorationMob(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
     /**
      * Returns the value of this property
      */

Index: CssMarginLeft.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssMarginLeft.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssMarginLeft.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssMarginLeft.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:44  plehegar
  * New
  *
@@ -28,9 +38,9 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
-import org.w3c.css.values.CssExpression;
-import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
+import org.w3c.css.values.CssExpression;
 
 /**
  *   <H4>
@@ -75,8 +85,14 @@
    * @param expression The expression foir this property.
    * @exception InvalidParamException Values are incorrect
    */
-  public CssMarginLeft(ApplContext ac, CssExpression expression) throws InvalidParamException {
-    super(ac, expression);
+  public CssMarginLeft(ApplContext ac, CssExpression expression) 
+  	throws InvalidParamException {
+      super(ac, expression);
+  }
+  
+  public CssMarginLeft(ApplContext ac, CssExpression expression, boolean check)
+	throws InvalidParamException {
+      super(ac, expression, check);
   }
   
   /**

Index: CssBorderLeftColorCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderLeftColorCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderLeftColorCSS2.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderLeftColorCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -21,12 +31,12 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
 import org.w3c.css.parser.CssPrinterStyle;
+import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
 import org.w3c.css.values.CssValue;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 
 /**
@@ -35,109 +45,125 @@
  * @version $Revision$
  */
 public class CssBorderLeftColorCSS2 extends CssProperty {
-
-  CssBorderFaceColorCSS2 face;
-  
-  /**
-   * Create a new CssBorderLeftColorCSS2
-   */
-  public CssBorderLeftColorCSS2() {
-    face = new CssBorderFaceColorCSS2();
-  }
-  
-  /**
-   * Create a new CssBorderLeftColorCSS2 with an another CssBorderFaceColorCSS2
-   * @param another The another side.
-   */
-  public CssBorderLeftColorCSS2(CssBorderFaceColorCSS2 another) {
-
-      setByUser();
-
-    face = another;
-  }
-  
-  /**
-   * Create a new CssBorderLeftColorCSS2
-   *
-   * @param expression The expression for this property.
-   * @exception InvalidParamException Values are incorrect
-   */
-  public CssBorderLeftColorCSS2(ApplContext ac, CssExpression expression) throws InvalidParamException {
-
+    
+    CssBorderFaceColorCSS2 face;
+    
+    /**
+     * Create a new CssBorderLeftColorCSS2
+     */
+    public CssBorderLeftColorCSS2() {
+	face = new CssBorderFaceColorCSS2();
+    }
+    
+    /**
+     * Create a new CssBorderLeftColorCSS2 with an another CssBorderFaceColorCSS2
+     * @param another The another side.
+     */
+    public CssBorderLeftColorCSS2(CssBorderFaceColorCSS2 another) {
+	
 	setByUser();
-    face = new CssBorderFaceColorCSS2(ac, expression);
-  }
-  
-  /**
-   * Returns the value of this property
-   */
-  public Object get() {
-    return face;
-  }
-
-  /**
-   * Returns the color of this property
-   */
-  public CssValue getColor() {
-    return face.getColor();
-  }
-
-  /**
-   * Returns a string representation of the object.
-   */
-  public String toString() {
-    return face.toString();
-  }
-
-  /**
-   * Returns the name of this property
-   */  
-  public String getPropertyName() {
-    return "border-left-color";
-  }
-
-  /**
-   * Add this property to the CssStyle.
-   *
-   * @param style The CssStyle
-   */
-  public void addToStyle(ApplContext ac, CssStyle style) {
-    CssBorderLeftCSS2 left = ((Css1Style) style).cssBorderCSS2.left;
-    if (left.color != null)
-      style.addRedefinitionWarning(ac, this);
-    left.color = this;
-  }
-
-  /**
-   * Get this property in the style.
-   *
-   * @param style The style where the property is
-   * @param resolve if true, resolve the style to find this property
-   */  
-  public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
-    if (resolve) {
-      return ((Css1Style) style).getBorderLeftColorCSS2();
-    } else {
-      return ((Css1Style) style).cssBorderCSS2.getLeft().color;
+	
+	face = another;
+    }
+    
+    /**
+     * Create a new CssBorderLeftColorCSS2
+     *
+     * @param expression The expression for this property.
+     * @exception InvalidParamException Values are incorrect
+     */
+    public CssBorderLeftColorCSS2(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
+	setByUser();
+	face = new CssBorderFaceColorCSS2(ac, expression);
+    }
+    
+    public CssBorderLeftColorCSS2(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
+    /**
+     * Returns the value of this property
+     */
+    public Object get() {
+	return face;
+    }
+    
+    /**
+     * Returns the color of this property
+     */
+    public CssValue getColor() {
+	if(face != null) {
+	    return face.getColor();
+	}
+	return null;
+    }
+    
+    /**
+     * Returns a string representation of the object.
+     */
+    public String toString() {
+	if(face != null) {
+	    return face.toString();
+	}
+	return "";
+    }
+    
+    /**
+     * Returns the name of this property
+     */  
+    public String getPropertyName() {
+	return "border-left-color";
+    }
+    
+    /**
+     * Add this property to the CssStyle.
+     *
+     * @param style The CssStyle
+     */
+    public void addToStyle(ApplContext ac, CssStyle style) {
+	CssBorderLeftCSS2 left = ((Css1Style) style).cssBorderCSS2.left;
+	if (left.color != null)
+	    style.addRedefinitionWarning(ac, this);
+	left.color = this;
+    }
+    
+    /**
+     * Get this property in the style.
+     *
+     * @param style The style where the property is
+     * @param resolve if true, resolve the style to find this property
+     */  
+    public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
+	if (resolve) {
+	    return ((Css1Style) style).getBorderLeftColorCSS2();
+	} else {
+	    return ((Css1Style) style).cssBorderCSS2.getLeft().color;
+	}
+    }
+    
+    /**
+     * Compares two properties for equality.
+     *
+     * @param value The other property.
+     */  
+    public boolean equals(CssProperty property) {
+	return (property instanceof CssBorderLeftColorCSS2 && face.equals(((CssBorderLeftColorCSS2) property).face));
+    }
+    
+    /**
+     * Print this property
+     *
+     * @param printer The printer.
+     */  
+    public void print(CssPrinterStyle printer) {
+	if (face != null && !face.isDefault())
+	    printer.print(this);
     }
-  }
-
-  /**
-   * Compares two properties for equality.
-   *
-   * @param value The other property.
-   */  
-  public boolean equals(CssProperty property) {
-    return (property instanceof CssBorderLeftColorCSS2 && face.equals(((CssBorderLeftColorCSS2) property).face));
-  }
-
-  /**
-   * Print this property
-   *
-   * @param printer The printer.
-   */  
-  public void print(CssPrinterStyle printer) {
-    if (!face.isDefault())
-      printer.print(this);
-  }
 }

Index: CssOverflow.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssOverflow.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssOverflow.java	8 Apr 2002 21:17:44 -0000	1.2
+++ CssOverflow.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -9,13 +9,11 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
-import org.w3c.css.values.CssLength;
-import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  */
@@ -41,7 +39,13 @@
      * @param expression The expression for this property
      * @exception InvalidParamException The expression is incorrect
      */  
-    public CssOverflow(ApplContext ac, CssExpression expression) throws InvalidParamException {
+    public CssOverflow(ApplContext ac, CssExpression expression, boolean check)
+    	throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	CssValue val = expression.getValue();
 	
 	setByUser();
@@ -66,8 +70,12 @@
 	} else {
 	    throw new InvalidParamException("value", expression.getValue(), 
 					    getPropertyName(), ac);
-	}
-	
+	}	
+    }
+    
+    public CssOverflow(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression, false);
     }
     
     /**

Index: CssBorderRightWidthCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderRightWidthCSS2.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- CssBorderRightWidthCSS2.java	8 Apr 2002 21:17:43 -0000	1.2
+++ CssBorderRightWidthCSS2.java	8 Aug 2005 13:18:12 -0000	1.3
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.3  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.2  2002/04/08 21:17:43  plehegar
  * New
  *
@@ -22,10 +32,10 @@
 package org.w3c.css.properties;
 
 import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
 import org.w3c.css.values.CssValue;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
 
 /**
  *   <H4>
@@ -59,103 +69,118 @@
  * @version $Revision$ 
  */
 public class CssBorderRightWidthCSS2 extends CssProperty {
-
-  CssBorderFaceWidthCSS2 face;
-  
-  /**
-   * Create a new CssBorderRightWidth
-   */
-  public CssBorderRightWidthCSS2() {
-    face = new CssBorderFaceWidthCSS2();
-  }
-  
-  /**
-   * Create a new CssBorderRightWidthCSS2 with an another CssBorderFaceWidthCSS2
-   *
-   * @param another The another side.
-   */
-  public CssBorderRightWidthCSS2(CssBorderFaceWidthCSS2 another) {
+    
+    CssBorderFaceWidthCSS2 face;
+    
+    /**
+     * Create a new CssBorderRightWidth
+     */
+    public CssBorderRightWidthCSS2() {
+	face = new CssBorderFaceWidthCSS2();
+    }
+    
+    /**
+     * Create a new CssBorderRightWidthCSS2 with an another CssBorderFaceWidthCSS2
+     *
+     * @param another The another side.
+     */
+    public CssBorderRightWidthCSS2(CssBorderFaceWidthCSS2 another) {
 	setByUser();
-
-    face = another;
-  }
-  
-  /**
-   * Create a new CssBorderRightWidthCSS2
-   *
-   * @param expression The expression for this property.
-   * @exception InvalidParamException Values are incorrect
-   */
-  public CssBorderRightWidthCSS2(ApplContext ac, CssExpression expression)
-    throws InvalidParamException {
+	
+	face = another;
+    }
     
+    /**
+     * Create a new CssBorderRightWidthCSS2
+     *
+     * @param expression The expression for this property.
+     * @exception InvalidParamException Values are incorrect
+     */
+    public CssBorderRightWidthCSS2(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
 	setByUser();
-
-    face = new CssBorderFaceWidthCSS2(ac, expression);
-  }
-  
-  /**
-   * Returns the value of this property
-   */
-  public Object get() {
-    return face;
-  }
-
-  /**
-   * Return the value of this property
-   */
-  public CssValue getValue() {
-    return face.getValue();
-  }
-
-  /**
-   * Returns a string representation of the object.
-   */
-  public String toString() {
-    return face.toString();
-  }
-
-  /**
-   * Returns the name of this property
-   */  
-  public String getPropertyName() {
-    return "border-right-width";
-  }
-
-  /**
-   * Add this property to the CssStyle.
-   *
-   * @param style The CssStyle
-   */
-  public void addToStyle(ApplContext ac, CssStyle style) {
-    CssBorderRightCSS2 right = ((Css1Style) style).cssBorderCSS2.right;
-    if (right.width != null)
-      style.addRedefinitionWarning(ac, this);
-    right.width = this;
-  }
-
-  /**
-   * Get this property in the style.
-   *
-   * @param style The style where the property is
-   * @param resolve if true, resolve the style to find this property
-   */  
-  public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
-    if (resolve) {
-      return ((Css1Style) style).getBorderRightWidthCSS2();
-    } else {
-      return ((Css1Style) style).cssBorderCSS2.getRight().width;
+	
+	face = new CssBorderFaceWidthCSS2(ac, expression);
     }
-  }
-
-  /**
-   * Compares two properties for equality.
-   *
-   * @param value The other property.
-   */  
-  public boolean equals(CssProperty property) {
-    return (property instanceof CssBorderRightWidthCSS2 && 
-	    face.equals(((CssBorderRightWidthCSS2) property).face));
-  }
-
+    
+    public CssBorderRightWidthCSS2(ApplContext ac, CssExpression expression)
+	throws InvalidParamException {
+	this(ac, expression,false);
+    }
+    
+    /**
+     * Returns the value of this property
+     */
+    public Object get() {
+	return face;
+    }
+    
+    /**
+     * Return the value of this property
+     */
+    public CssValue getValue() {
+	if(face != null) {
+	    return face.getValue();
+	}
+	return null;
+    }
+    
+    /**
+     * Returns a string representation of the object.
+     */
+    public String toString() {
+	if(face != null) {
+	    return face.toString();
+	}
+	return "";
+    }
+    
+    /**
+     * Returns the name of this property
+     */  
+    public String getPropertyName() {
+	return "border-right-width";
+    }
+    
+    /**
+     * Add this property to the CssStyle.
+     *
+     * @param style The CssStyle
+     */
+    public void addToStyle(ApplContext ac, CssStyle style) {
+	CssBorderRightCSS2 right = ((Css1Style) style).cssBorderCSS2.right;
+	if (right.width != null)
+	    style.addRedefinitionWarning(ac, this);
+	right.width = this;
+    }
+    
+    /**
+     * Get this property in the style.
+     *
+     * @param style The style where the property is
+     * @param resolve if true, resolve the style to find this property
+     */  
+    public CssProperty getPropertyInStyle(CssStyle style, boolean resolve) {
+	if (resolve) {
+	    return ((Css1Style) style).getBorderRightWidthCSS2();
+	} else {
+	    return ((Css1Style) style).cssBorderCSS2.getRight().width;
+	}
+    }
+    
+    /**
+     * Compares two properties for equality.
+     *
+     * @param value The other property.
+     */  
+    public boolean equals(CssProperty property) {
+	return (property instanceof CssBorderRightWidthCSS2 && 
+		face.equals(((CssBorderRightWidthCSS2) property).face));
+    }
+    
 }

Index: CssBorderFaceWidth.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/properties/CssBorderFaceWidth.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CssBorderFaceWidth.java	24 Dec 2002 12:31:37 -0000	1.3
+++ CssBorderFaceWidth.java	8 Aug 2005 13:18:12 -0000	1.4
@@ -6,6 +6,16 @@
 // Please first read the full copyright statement in file COPYRIGHT.html
 /*
  * $Log$
+ * Revision 1.4  2005/08/08 13:18:12  ylafon
+ * All those changed made by Jean-Guilhem Rouel:
+ *
+ * Huge patch, imports fixed (automatic)
+ * Bug fixed: 372, 920, 778, 287, 696, 764, 233
+ * Partial bug fix for 289
+ *
+ * Issue with "inherit" in CSS2.
+ * The validator now checks the number of values (extraneous values were previously ignored)
+ *
  * Revision 1.3  2002/12/24 12:31:37  sijtsche
  * new value added for border widths
  *
@@ -30,110 +40,118 @@
  */
 package org.w3c.css.properties;
 
-import org.w3c.css.parser.CssStyle;
+import org.w3c.css.util.ApplContext;
+import org.w3c.css.util.InvalidParamException;
 import org.w3c.css.values.CssExpression;
-import org.w3c.css.values.CssValue;
+import org.w3c.css.values.CssIdent;
 import org.w3c.css.values.CssLength;
 import org.w3c.css.values.CssNumber;
 import org.w3c.css.values.CssPercentage;
-import org.w3c.css.values.CssIdent;
-import org.w3c.css.util.InvalidParamException;
-import org.w3c.css.util.ApplContext;
+import org.w3c.css.values.CssValue;
 
 /**
  * @version $Revision$
  */
 public class CssBorderFaceWidth {
-
-  CssValue value;
-
-  /**
-   * Create a new CssBorderFaceWidth
-   */
-  public CssBorderFaceWidth() {
-      //value = medium;
-  }
-
-  /**
-   * Create a new CssBorderFaceWidth from an another CssBorderFaceWidth
-   *
-   * @param another The another side.
-   */
-  public CssBorderFaceWidth(CssBorderFaceWidth another) {
-    value = another.value;
-  }
-
-  /**
-   * Create a new CssBorderFaceWidth
-   *
-   * @param expression The expression for this property
-   * @exception InvalidParamException Values are incorrect
-   */
-  public CssBorderFaceWidth(ApplContext ac, CssExpression expression)
-    throws InvalidParamException {
-
-    CssValue val = expression.getValue();
-    CssIdent initial = new CssIdent("initial");
-
-    if (val instanceof CssLength) {
-      float f = ((Float) val.get()).floatValue();
-      if (f >= 0)
-	this.value = val;
-      else
-	throw new InvalidParamException("negative-value", val.toString(), ac);
-    } else if (val instanceof CssNumber) {
-      value = ((CssNumber) val).getLength();
-    } else if (val instanceof CssPercentage) {
-	  value = val;
-    } else if (val.equals(thin)) {
-      value = thin;
-    } else if (val.equals(medium)) {
-      value = medium;
-    } else if (val.equals(thick)) {
-      value = thick;
-    } else if (val.equals(initial)) {
-	  value = initial;
-    } else if (val.equals(CssProperty.inherit)) {
-	value = CssProperty.inherit;
-    } else {
-      throw new InvalidParamException("value", val.toString(), "width", ac);
+    
+    CssValue value;
+    
+    /**
+     * Create a new CssBorderFaceWidth
+     */
+    public CssBorderFaceWidth() {
+	//value = medium;
     }
-
-    expression.next();
-  }
-
-  /**
-   * Returns the internal value
-   */
-  public CssValue getValue() {
-    return value;
-  }
-
-  /**
-   * Returns a string representation of the object.
-   */
-  public String toString() {
-
-     if (value != null) {
-	 return value.toString();
-      } else {
-	  return "";
-      }
-  }
-
-  /**
-   * Compares two sides for equality.
-   *
-   * @param value The another side.
-   */
-  public boolean equals(CssBorderFaceWidth another) {
-    return value.equals(another.value);
-  }
-
-  private static CssIdent thin = new CssIdent("thin");
-  private static CssIdent medium = new CssIdent("medium");
-  private static CssIdent thick = new CssIdent("thick");
-
+    
+    /**
+     * Create a new CssBorderFaceWidth from an another CssBorderFaceWidth
+     *
+     * @param another The another side.
+     */
+    public CssBorderFaceWidth(CssBorderFaceWidth another) {
+	value = another.value;
+    }
+    
+    /**
+     * Create a new CssBorderFaceWidth
+     *
+     * @param expression The expression for this property
+     * @exception InvalidParamException Values are incorrect
+     */
+    public CssBorderFaceWidth(ApplContext ac, CssExpression expression,
+	    boolean check) throws InvalidParamException {
+	
+	if(check && expression.getCount() > 1) {
+	    throw new InvalidParamException("unrecognize", ac);
+	}
+	
+	CssValue val = expression.getValue();
+	CssIdent initial = new CssIdent("initial");
+	
+	if (val instanceof CssLength) {
+	    float f = ((Float) val.get()).floatValue();
+	    if (f >= 0)
+		this.value = val;
+	    else
+		throw new InvalidParamException("negative-value", val.toString(), ac);
+	} else if (val instanceof CssNumber) {
+	    value = ((CssNumber) val).getLength();
+	} else if (val instanceof CssPercentage) {
+	    value = val;
+	} else if (val.equals(thin)) {
+	    value = thin;
+	} else if (val.equals(medium)) {
+	    value = medium;
+	} else if (val.equals(thick)) {
+	    value = thick;
+	} else if (val.equals(initial)) {
+	    value = initial;
+	} else if (val.equals(CssProperty.inherit)) {
+	    value = CssProperty.inherit;
+	} else {
+	    throw new InvalidParamException("value", val.toString(), "width", ac);
+	}
+	
+	expression.next();
+    }
+    
+    public CssBorderFaceWidth(ApplContext ac, CssExpression expression) 
+	throws InvalidParamException {
+	this(ac, expression, false);
+    }
+    
+    /**
+     * Returns the internal value
+     */
+    public CssValue getValue() {
+	return value;
+    }
+    
+    /**
+     * Returns a string representation of the object.
+     */
+    public String toString() {
+	
+	if (value != null) {
+	    return value.toString();
+	} else {
+	    return "";
+	}
+    }
+    
+    /**
+     * Compares two sides for equality.
+     *
+     * @param value The another side.
+     */
+    public boolean equals(CssBorderFaceWidth another) {
+	return value.equals(another.value); // FIXME
+    }
+    
+    private static CssIdent thin = new CssIdent("thin");
+    private static CssIdent medium = new CssIdent("medium");
+    private static CssIdent thick = new CssIdent("thick");
+    
 }
 
 

Received on Monday, 8 August 2005 22:47:43 UTC