2002/css-validator/org/w3c/css/parser AtRuleFontFace.java,1.2,1.3 AtRuleMedia.java,1.8,1.9 AtRuleMediaCSS1.java,1.3,1.4 AtRuleMediaCSS2.java,1.3,1.4 AtRulePage.java,1.3,1.4 AtRulePreference.java,1.3,1.4 CssError.java,1.3,1.4 CssErrorToken.java,1.3,1.4 CssFouffa.java,1.34,1.35 CssParseException.java,1.4,1.5 CssPropertyFactory.java,1.13,1.14 CssSelectors.java,1.16,1.17 CssSelectorsConstant.java,1.8,1.9 CssStyle.java,1.6,1.7 CssValidatorListener.java,1.5,1.6 Errors.java,1.4,1.5 Frame.java,1.7,1.8 MediaEnumeration.java,1.2,1.3

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

Modified Files:
	AtRuleFontFace.java AtRuleMedia.java AtRuleMediaCSS1.java 
	AtRuleMediaCSS2.java AtRulePage.java AtRulePreference.java 
	CssError.java CssErrorToken.java CssFouffa.java 
	CssParseException.java CssPropertyFactory.java 
	CssSelectors.java CssSelectorsConstant.java CssStyle.java 
	CssValidatorListener.java Errors.java Frame.java 
	MediaEnumeration.java 
Log Message:
>From Jean-Guilhem Rouel (again!)
Reformatting of code
Fix for bug 774 [1] (even more warnings)
Fix for bug 768 [2]
Modification of the soap output format (each warning list and error list has 
the URI it refers to)


[1] http://www.w3.org/Bugs/Public/show_bug.cgi?id=774
[2] http://www.w3.org/Bugs/Public/show_bug.cgi?id=768



Index: CssSelectors.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/CssSelectors.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- CssSelectors.java	8 Sep 2005 12:23:33 -0000	1.16
+++ CssSelectors.java	14 Sep 2005 15:14:18 -0000	1.17
@@ -44,49 +44,49 @@
  * @version $Revision$
  */
 public final class CssSelectors extends SelectorsList implements CssSelectorsConstant {
-    
+
     ApplContext ac;
-    
+
     /**
      * At rule statement
      */
     AtRule atRule;
-    
+
     /**
      * The element.
      */
     String element;
 
     char connector = DESCENDANT;
-    
+
     /**
      * The next context.
      */
     protected CssSelectors next;
-    
+
     // true if the element is a block-level element
     private  boolean isBlock;
-    
+
     CssStyle properties;
-    
+
     // all hashCode (for performance)
     private int hashElement;
-    
-    private int hashGeneral;
-    
+
+    //private int hashGeneral;
+
     // The CssStyle to use
     private static Class style;
-    
+
     // see isEmpty and addProperty
     private boolean Init;
-    
+
     /**
      * Create a new CssSelectors with no previous selector.
      */
     public CssSelectors(ApplContext ac) {
 	super(ac);
 	style = ac.getCssSelectorsStyle();
-	try {	    
+	try {
 	    properties = (CssStyle) style.newInstance();
 	} catch (Exception e) {
 	    e.printStackTrace();
@@ -104,18 +104,18 @@
 	}
 	this.ac = null;
     }
-    
+
     /**
      * Create a new CssSelectors with a previous selector.
      *
      * @param next
      *            the next selector
      */
-    public CssSelectors(CssSelectors next) {	
+    public CssSelectors(CssSelectors next) {
 	this(CssSelectors.style);
 	this.next = next;
     }
-    
+
     /**
      * Create a new CssSelectors with a previous selector.
      *
@@ -126,7 +126,7 @@
 	this(ac);
 	this.next = next;
     }
-    
+
     /**
      * Set the style for all contexts. Don't forget to invoke this method if you
      * want a style !
@@ -138,7 +138,7 @@
 	Util.verbose("Style is : " + style0);
 	style = style0;
     }
-    
+
     /**
      * Set the attribute atRule
      *
@@ -148,7 +148,7 @@
     public void setAtRule(AtRule atRule) {
 	this.atRule = atRule;
     }
-    
+
     /**
      * Returns the attribute atRule
      *
@@ -157,14 +157,14 @@
     public AtRule getAtRule() {
 	return atRule;
     }
-    
+
     /**
      * Get the element.
      */
     public String getElement() {
 	return element;
     }
-    
+
     /**
      * Returns <code>true</code> if the element is a block level element (HTML
      * only)
@@ -172,17 +172,17 @@
     public boolean isBlockLevelElement() {
 	return isBlock;
     }
-    
+
     public void addPseudo(String pseudo) throws InvalidParamException {
 	if(pseudo == null) {
 	    return;
-	}	
-	
+	}
+
 	String profile = ac.getProfile();
 	if(profile == null || profile.equals("")) {
-	    profile = ac.getCssVersion(); 
+	    profile = ac.getCssVersion();
 	}
-	
+
 	// is it a pseudo-class?
 	String[] ps = PseudoFactory.getPseudoClass(profile);
 	if(ps != null) {
@@ -194,7 +194,7 @@
 	    }
 	}
 	// it's not a pseudo-class
-	
+
 	// is it a pseudo-element?
 	ps = PseudoFactory.getPseudoElement(profile);
 	if(ps != null) {
@@ -206,23 +206,23 @@
 	    }
 	}
     }
-    
-    public void setPseudoFun(String pseudo, String param) 
+
+    public void setPseudoFun(String pseudo, String param)
     throws InvalidParamException {
 	String profile = ac.getProfile();
 	if(profile == null || profile.equals("")) {
-	    profile = ac.getCssVersion(); 
+	    profile = ac.getCssVersion();
 	}
-	
+
 	String[] ps = PseudoFactory.getPseudoFunction(profile);
 	if(ps != null) {
-	    for(int i = 0; i < ps.length; i++) {		
+	    for(int i = 0; i < ps.length; i++) {
 		if(pseudo.equals(ps[i])) {
 		    if(pseudo.equals("contains")) {
 			addPseudoFunction(
 				new PseudoFunctionContains(pseudo, param));
 			return;
-		    }	
+		    }
 		    if(pseudo.equals("lang")) {
 			addPseudoFunction(
 				new PseudoFunctionLang(pseudo, param));
@@ -276,48 +276,48 @@
 			}
 			return;
 		    }
-		}		    
+		}
 	    }
 	    throw new InvalidParamException("pseudo", ac);
 	}
     }
-    
+
     public void addType(TypeSelector type) throws InvalidParamException {
 	super.addType(type);
 	element = type.getName();
 	hashElement = element.hashCode();
     }
-    
-    public void addDescendant(DescendantSelector descendant) 
-    throws InvalidParamException {	
+
+    public void addDescendant(DescendantSelector descendant)
+    throws InvalidParamException {
 	super.addDescendant(descendant);
 	connector = DESCENDANT;
     }
-    
+
     public void addChild(ChildSelector child) throws InvalidParamException {
 	super.addChild(child);
 	connector = CHILD;
     }
-    
-    public void addAdjacent(AdjacentSelector adjacent) 
-    throws InvalidParamException {	
+
+    public void addAdjacent(AdjacentSelector adjacent)
+    throws InvalidParamException {
 	super.addAdjacent(adjacent);
 	connector = ADJACENT;
     }
-    
-    public void addAttribute(AttributeSelector attribute) 
-    throws InvalidParamException {	
+
+    public void addAttribute(AttributeSelector attribute)
+    throws InvalidParamException {
 	for(int i = 0; i < size(); i++) {
 	    Selector s = (Selector) getSelector(i);
 	    // add warnings if some selectors are incompatible
 	    // e.g. [lang=en][lang=fr]
-	    if(s instanceof AttributeSelector) {		
+	    if(s instanceof AttributeSelector) {
 		((AttributeSelector) s).applyAttribute(ac, attribute);
 	    }
 	}
 	super.addAttribute(attribute);
     }
-    
+
     /**
      * Adds a property to this selector.
      *
@@ -340,7 +340,7 @@
     public CssStyle getStyle() {
 	return properties;
     }
-    
+
     /**
      * Returns a string representation of the object.
      */
@@ -353,11 +353,11 @@
 	sbrep.append(super.toString());
 	return sbrep.toString();
     }
-    
+
     /**
      * Get a hashCode.
      */
-    public int hashCode() {
+    /*public int hashCode() {
 	if (hashGeneral == 0) {
 	    if (atRule instanceof AtRuleFontFace) {
 		hashGeneral = atRule.hashCode();
@@ -370,8 +370,8 @@
 	    }
 	}
 	return hashGeneral;
-    }
-    
+    }*/
+
     /**
      * Returns <code>true</code> if the selector is equals to an another.
      *
@@ -383,7 +383,7 @@
 	    return false;
 	}
 	CssSelectors s = (CssSelectors) selector;
-	
+
 	if ((atRule instanceof AtRulePage)
 		|| (atRule instanceof AtRuleFontFace)) {
 	    return atRule.equals(s.atRule);
@@ -398,7 +398,7 @@
 	    return false;
 	}
     }
-    
+
     /**
      * Set the previous selector.
      *
@@ -406,10 +406,10 @@
      *            the previous selector.
      */
     public void setNext(CssSelectors next) {
-	this.next = next;	
+	this.next = next;
 	Invalidate();
     }
-    
+
     /**
      * Get the previous selector.
      */
@@ -423,7 +423,7 @@
     public boolean isEmpty() {
 	return !Init;
     }
-    
+
     public void addAttribute(String attName, String value)
     throws InvalidParamException {
 	if (ac.getProfile() != null && !"".equals(ac.getProfile())) {
@@ -436,12 +436,12 @@
 	    Invalidate();
 	}
     }
-    
+
     void Invalidate() {
 	// invalidate all pre-computation in this selectors
 	setSpecificity(0);
-	hashGeneral = 0;
-	
+	//hashGeneral = 0;
+
 	if (Init) {
 	    // yes I invalidate all properties too !
 	    try {
@@ -456,7 +456,7 @@
 	if(attrs.size() > 0) {
 	    for(int i = 0; i < attrs.size(); i++) {
 		Selector selector = (Selector) attrs.get(i);
-		
+
 		Selector other = null;
 		int j = 0;
 		for(; j < attrs2.size(); j++) {
@@ -477,11 +477,11 @@
 		}
 	    }
 	    return true;
-	}	
+	}
 	return true;
-	
+
     }
-    
+
     /**
      * Returns <code>true</code> if the selector can matched this selector.
      *
@@ -508,18 +508,17 @@
      * @see            org.w3c.css.css.CssCascadingOrder#order
      */
     public boolean canApply(CssSelectors selector) {
-	System.out.println("CssSelectors.canApply(): " + selector);
 	if ((atRule instanceof AtRulePage)
 		|| (atRule instanceof AtRuleFontFace)) {
 	    return atRule.canApply(selector.atRule);
 	}
 	// current work - don't touch
-	Util.verbose(getSpecificity() + " canApply this " + this 
+	Util.verbose(getSpecificity() + " canApply this " + this
 		+ " selector: " + selector);
 	Util.verbose("connector " + connector);
 	Util.verbose(getSelectors().toString());
 	Util.verbose(selector.getSelectors().toString());
-	
+
 	if ((hashElement != selector.hashElement) && hashElement != 0) {
 	    // here we are in this case :
 	    // H1 and HTML BODY H1 EM
@@ -529,7 +528,7 @@
 	    // if (for all contexts) !canApply(selector)
 	    //       go and see canApply(selector.getNext())
 	    //
-	    // for further informations, 
+	    // for further informations,
 	    //                     see org.w3c.css.css.CssCascadingOrder#order
 	    Util.verbose("canApply RETURNS FALSE");
 	    return false;
@@ -543,7 +542,7 @@
 	    }
 	}
     }
-    
+
     /**
      * Returns true if the selector can matched another selector. called by
      * canApply
@@ -559,7 +558,7 @@
 	Util.verbose(getSelectors().toString());
 	Util.verbose(selector.getSelectors().toString());
 	Util.verbose("canMatched for attributes :" + result);
-	
+
 	if ((hashElement != selector.hashElement) && hashElement != 0) {
 	    if ((connector == DESCENDANT) && (selector.next != null)) {
 		// here we are in this case :
@@ -574,7 +573,7 @@
 		return false;
 	    }
 	}
-	
+
 	if (next == null || selector.next == null) {
 	    // here we are in this case :
 	    // H1 and BODY HTML H1

Index: Frame.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/Frame.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- Frame.java	8 Sep 2005 12:23:33 -0000	1.7
+++ Frame.java	14 Sep 2005 15:14:18 -0000	1.8
@@ -108,7 +108,7 @@
     warnings.addWarning(new Warning(getSourceFile(), getLine(),
                     warningMessage, 0, message1, message2, ac));
     }
-    
+
     /**
      * Get all warnings.
      */

Index: Errors.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/Errors.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- Errors.java	8 Sep 2005 12:23:33 -0000	1.4
+++ Errors.java	14 Sep 2005 15:14:18 -0000	1.5
@@ -25,7 +25,7 @@
    * Add an error.
    *
    * @param error The new error.
-   */  
+   */
   public final void addError(CssError error) {
     int oldCapacity = errorData.length;
     if (errorCount + 1 > oldCapacity) {
@@ -40,30 +40,30 @@
    * Add errors.
    *
    * @param errors All errors
-   */  
+   */
   public final void addErrors(Errors errors) {
     int oldCapacity = errorData.length;
     if (errorCount + errors.errorCount + 1 > oldCapacity) {
       CssError oldData[] = errorData;
-      errorData = 
+      errorData =
 	new CssError[oldCapacity + errors.errorCount + capacityIncrement];
       System.arraycopy(oldData, 0, errorData, 0, errorCount);
     }
-    System.arraycopy(errors.errorData, 0, errorData, 
+    System.arraycopy(errors.errorData, 0, errorData,
 		     errorCount, errors.errorCount);
     errorCount += errors.errorCount;
   }
 
   /**
    * Get the number of errors.
-   */  
+   */
   public final int getErrorCount() {
     return errorCount;
   }
 
   /**
    * Get an array with all errors.
-   */  
+   */
   public final CssError[] getErrors() {
     int oldCapacity = errorData.length;
     if (errorCount < oldCapacity) {
@@ -78,9 +78,9 @@
    * Get an error with an index.
    *
    * @param index the error index.
-   */  
+   */
   public final CssError getErrorAt(int index) {
     return errorData[index];
   }
-  
+
 }

Index: CssParseException.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/CssParseException.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- CssParseException.java	8 Sep 2005 12:23:33 -0000	1.4
+++ CssParseException.java	14 Sep 2005 15:14:18 -0000	1.5
@@ -16,34 +16,34 @@
  * @version $Revision$
  */
 public class CssParseException extends ParseException {
-    
+
     /**
      * The list of context when the error appears
-     */  
+     */
     Vector contexts;
-    
+
     /**
      * the property name
-     */  
+     */
     String property;
-    
+
     /**
      * the skipped text
-     */  
+     */
     String skippedString;
 
     /**
      * An expression
-     */    
+     */
     CssExpression exp;
-    
+
     /**
      * The real exception
      */
     Exception parseException;
-    
+
     private boolean error;
-    
+
     /**
      * Create a new CssParseException
      */
@@ -51,11 +51,11 @@
 	parseException = exc;
 	if (parseException instanceof ParseException) {
 	    ParseException e = (ParseException) exc;
-	    error = (e.currentToken != null 
-		     && e.expectedTokenSequences != null 
+	    error = (e.currentToken != null
+		     && e.expectedTokenSequences != null
 		     && e.tokenImage != null);
 	}
-    }  
+    }
 
     public Exception getException() {
 	return parseException;
@@ -64,10 +64,10 @@
     public boolean isParseException() {
 	return (parseException instanceof ParseException);
     }
-    
+
     /**
      * Get the exception message
-     */  
+     */
     public String getMessage() {
 	if (!error) {
 	    return parseException.getMessage();
@@ -75,7 +75,7 @@
 	    return null;
 	}
     }
-    
+
     /**
      * Set the attribute contexts
      *
@@ -129,7 +129,7 @@
     public String getSkippedString() {
         return skippedString;
     }
-    
+
     /**
      * Set the attribute exp
      *

Index: CssPropertyFactory.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/CssPropertyFactory.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- CssPropertyFactory.java	8 Sep 2005 12:23:33 -0000	1.13
+++ CssPropertyFactory.java	14 Sep 2005 15:14:18 -0000	1.14
@@ -29,9 +29,9 @@
 
     // all recognized properties are here.
     private Utf8Properties properties;
-    
+
     //private Utf8Properties allprops;
-    
+
     // does not seem to be used
 //    private String usermedium;
 
@@ -43,11 +43,11 @@
 	    return null;
 	}
     }
-    
+
     /**
      * Create a new CssPropertyFactory
      */
-    /*public CssPropertyFactory(URL url, URL allprop_url) {	
+    /*public CssPropertyFactory(URL url, URL allprop_url) {
 	properties = new Utf8Properties();
 	InputStream f = null;
 	try {
@@ -63,7 +63,7 @@
 		e.printStackTrace();
 	    } // ignore
 	}
-	
+
 	// list of all properties
 	allprops = new Utf8Properties();
 	InputStream f_all = null;
@@ -81,7 +81,7 @@
 	    } // ignore
 	}
     }*/
-    
+
     public CssPropertyFactory(String profile) {
 	properties = PropertiesLoader.getProfile(profile);
 	// It's not good to have null properties :-/
@@ -89,31 +89,31 @@
 	    throw new NullPointerException();
 	}
     }
-    
+
     public String getProperty(String name) {
 	return properties.getProperty(name);
     }
-    
+
     private Vector getVector(String media) {
 	Vector list = new Vector(4);
 	String medium = new String();
 	StringTokenizer tok = new StringTokenizer(media, ",");
-	
+
 	while (tok.hasMoreTokens()) {
 	    medium = tok.nextToken();
 	    medium = medium.trim();
 	    list.addElement(medium);
 	}
-	
+
 	return list;
     }
-    
-//    public void setUserMedium(String usermedium) {	
+
+//    public void setUserMedium(String usermedium) {
 //	this.usermedium = usermedium;
 //    }
-    
+
 //    bug: FIXME
-//	@media screen and (min-width: 400px) and (max-width: 700px), print { 
+//	@media screen and (min-width: 400px) and (max-width: 700px), print {
 //	  a {
 //	    border: 0;
 //	  }
@@ -125,11 +125,11 @@
 	String media = atRule.toString();
 	int pos = -1;
 	int pos2 = media.toUpperCase().indexOf("AND");
-	
+
 	if (pos2 == -1) {
 	    pos2 = media.length();
 	}
-	
+
 	if (media.toUpperCase().indexOf("NOT") != -1) {
 	    pos = media.toUpperCase().indexOf("NOT");
 	    media = media.substring(pos + 4, pos2);
@@ -140,12 +140,12 @@
 	    pos = media.indexOf(" ");
 	    media = media.substring(pos + 1, pos2);
 	}
-	
+
 	media = media.trim();
-	
+
 	String classname = properties.getProperty("mediafeature" + "."
 		+ property);
-	
+
 	if (classname == null) {
 	    if (atRule instanceof AtRuleMedia && (!media.equals("all"))) {
 		// I don't know this property
@@ -160,13 +160,13 @@
 			ac);
 	    }
 	}
-	
+
 	try {
 	    // create an instance of your property class
 	    Class expressionclass = new CssExpression().getClass();
 	    if (expression != null) {
 		expressionclass = expression.getClass();
-	    }        
+	    }
 	    // Maybe it will be necessary to add the check parameter as for
 	    // create property, so... FIXME
 	    Class[] parametersType = { ac.getClass(), expressionclass };
@@ -181,22 +181,22 @@
 	    Exception ex = (Exception) iv.getTargetException();
 	    throw ex;
 	}
-	
+
     }
-    
+
     public synchronized CssProperty createProperty(ApplContext ac,
 	    AtRule atRule, String property, CssExpression expression)
-    throws Exception {		
+    throws Exception {
 	String classname = null;
 	String media = atRule.toString();
 	int pos = -1;
 	String upperMedia = media.toUpperCase();
 	int pos2 = upperMedia.indexOf("AND ");
-	
+
 	if (pos2 == -1) {
 	    pos2 = media.length();
 	}
-	
+
 	if ((pos = upperMedia.indexOf("NOT")) != -1) {
 	    media = media.substring(pos + 4, pos2);
 	} else if ((pos = upperMedia.indexOf("ONLY")) != -1) {
@@ -205,31 +205,31 @@
 	    pos = media.indexOf(' ');
 	    media = media.substring(pos + 1, pos2);
 	}
-	
+
 	media = media.trim();
-	
+
 	Vector list = new Vector(getVector(media));
-	
+
 	if(atRule instanceof AtRuleMedia) {
-	    classname = properties.getProperty(property);	    
+	    classname = properties.getProperty(property);
 	    // a list of media has been specified
 	    if(classname != null && !media.equals("all")) {
-		String propMedia = PropertiesLoader.mediaProperties.getProperty(property); 
+		String propMedia = PropertiesLoader.mediaProperties.getProperty(property);
 		for(int i = 0; i < list.size(); i++) {
 		    String medium = (String) list.elementAt(i);
-		    if(propMedia.indexOf(medium) == -1 && 
+		    if(propMedia.indexOf(medium) == -1 &&
 			    !propMedia.equals("all")) {
 			ac.getFrame().addWarning("noexistence-media",
 				property, medium + " (" + propMedia + ")");
 		    }
 		}
-	    }	    
+	    }
 	}
 	else {
 	    classname = properties.getProperty("@" + atRule.keyword() + "."
 		    + property);
 	}
-	
+
 	// the property does not exist in this profile
 	// this is an error... or a warning if it exists in another
 	// profile... FIXME
@@ -239,16 +239,16 @@
 	}
 
 	CssIdent initial = new CssIdent("initial");
-	
+
 	if (expression.getValue().equals(initial)
-		&& ac.getCssVersion().equals("css3")) {		
+		&& ac.getCssVersion().equals("css3")) {
 	    try {
 		// create an instance of your property class
 		Class[] parametersType = {};
 		Constructor constructor = Class.forName(classname)
 		.getConstructor(parametersType);
 		Object[] parameters = {};
-		// invoke the constructor		
+		// invoke the constructor
 		return (CssProperty) constructor.newInstance(parameters);
 	    } catch (InvocationTargetException e) {
 		// catch InvalidParamException
@@ -256,21 +256,21 @@
 		Exception ex = (Exception) iv.getTargetException();
 		throw ex;
 	    }
-	} else {	    
+	} else {
 	    try {
 		// create an instance of your property class
 		Class[] parametersType = { ac.getClass(), expression.getClass(), boolean.class };
 		Constructor constructor = Class.forName(classname)
 		.getConstructor(parametersType);
 		Object[] parameters = { ac, expression, new Boolean(true)};
-		// invoke the constructor		
+		// invoke the constructor
 		return (CssProperty) constructor.newInstance(parameters);
-	    } catch (InvocationTargetException e) {		
+	    } catch (InvocationTargetException e) {
 		// catch InvalidParamException
 		InvocationTargetException iv = e;
 		Exception ex = (Exception) iv.getTargetException();
 		throw ex;
 	    }
-	}	
+	}
     }
 }

Index: CssErrorToken.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/CssErrorToken.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CssErrorToken.java	8 Sep 2005 12:23:33 -0000	1.3
+++ CssErrorToken.java	14 Sep 2005 15:14:18 -0000	1.4
@@ -16,27 +16,27 @@
 
   /**
    * The list of context when the error appears
-   */  
+   */
   Vector context;
 
   /**
    * the property name
-   */  
+   */
   String property;
 
   /**
    * the string description of the error
-   */  
+   */
   String errorString;
 
   /**
    * the expected text
-   */  
+   */
   String[] expectedTokens;
 
   /**
    * the skipped text
-   */  
+   */
   String skippedString;
 
   /**
@@ -50,7 +50,7 @@
     line = lin;
     errorString = error;
     expectedTokens = expected;
-  }  
+  }
 
   /**
    * Get contexts
@@ -61,7 +61,7 @@
 
   /**
    * Get the name of the property.
-   */  
+   */
   public String getPropertyName() {
     return property;
   }
@@ -82,7 +82,7 @@
 
   /**
    * Get the skipped text.
-   */  
+   */
   public String getSkippedString() {
     return skippedString;
   }

Index: AtRulePage.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/AtRulePage.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- AtRulePage.java	8 Aug 2005 13:18:11 -0000	1.3
+++ AtRulePage.java	14 Sep 2005 15:14:18 -0000	1.4
@@ -16,7 +16,7 @@
 
 /**
  * This class manages all media defines by CSS2
- * 
+ *
  * @version $Revision$
  * @author  Philippe Le H�garet
  */
@@ -32,7 +32,7 @@
 
     /**
      * Returns the at rule keyword
-     */    
+     */
     public String keyword() {
 	return "page";
     }
@@ -41,7 +41,7 @@
      * Sets the name of the page
      * name will be a pseudo name :first, :left, :right
      * or a random name without semi-colon at the beginning
-     */    
+     */
     public AtRulePage setName(String name, ApplContext ac)
 	     throws InvalidParamException {
 	if (name.charAt(0) == ':') {
@@ -97,7 +97,7 @@
 
     /**
      * The second must be exactly the same of this one
-     */    
+     */
     public boolean canApply(AtRule atRule) {
 	if (atRule instanceof AtRulePage) {
 	    AtRulePage other = (AtRulePage) atRule;
@@ -124,7 +124,7 @@
 
     /**
      * The second must only match this one
-     */    
+     */
     public boolean canMatched(AtRule atRule) {
 	if (atRule instanceof AtRulePage) {
 	    boolean res = true;
@@ -160,5 +160,5 @@
 	}
 	return ret;
     }
-    
+
 }

Index: CssStyle.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/CssStyle.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- CssStyle.java	8 Sep 2005 12:23:33 -0000	1.6
+++ CssStyle.java	14 Sep 2005 15:14:18 -0000	1.7
@@ -45,7 +45,12 @@
   public final void setSelector(CssSelectors selectors) {
       this.selector = selectors;
   }
-
+//public String toString() {
+//    String res = "";
+//    res += selector;
+//    res+=style;
+//    return res;
+//}
   /**
    * Set the style sheet of this style.
    *
@@ -73,7 +78,7 @@
    */
   public final void setProperty(ApplContext ac, CssProperty property, Warnings warnings) {
     this.warnings = warnings;
-    //property.addToStyle(ac, this);
+    property.addToStyle(ac, this);
   }
 
   /**

Index: CssError.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/CssError.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- CssError.java	8 Sep 2005 12:23:33 -0000	1.3
+++ CssError.java	14 Sep 2005 15:14:18 -0000	1.4
@@ -16,24 +16,24 @@
 
   /**
    * The source file
-   */  
+   */
   String sourceFile;
 
   /**
    * The line number in the file
-   */  
+   */
   int line;
 
   /**
    * The unknown error
-   */  
+   */
   Exception error;
 
   /**
    * Create a new CssError
    */
   public CssError() {
-  }  
+  }
 
   /**
    * Create a new CssError
@@ -46,7 +46,7 @@
     this.sourceFile = sourceFile;
     this.line = line;
     this.error = error;
-  }  
+  }
 
   /**
    * Create a new CssError
@@ -55,25 +55,25 @@
    */
   public CssError(Exception error) {
     this.error = error;
-  }  
+  }
 
   /**
    * Get the source file
-   */  
+   */
   public String getSourceFile() {
     return sourceFile;
   }
 
   /**
    * get the line number
-   */  
+   */
   public int getLine() {
     return line;
   }
 
   /**
    * get the unknown error
-   */  
+   */
   public Exception getException() {
     return error;
   }

Index: AtRulePreference.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/AtRulePreference.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- AtRulePreference.java	8 Aug 2005 13:18:11 -0000	1.3
+++ AtRulePreference.java	14 Sep 2005 15:14:18 -0000	1.4
@@ -41,7 +41,7 @@
     public boolean equals(Object other) {
 	return (other instanceof AtRulePreference);
     }
-    
+
     /**
      * The second must only match this one
      */

Index: CssFouffa.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/CssFouffa.java,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- CssFouffa.java	8 Sep 2005 12:23:33 -0000	1.34
+++ CssFouffa.java	14 Sep 2005 15:14:18 -0000	1.35
@@ -112,7 +112,7 @@
 	// @@this is a default media ...
 	/*
 	 * AtRuleMedia media = new AtRuleMedia();
-	 * 
+	 *
 	 * if (ac.getMedium() == null) { try { media.addMedia("all", ac); }
 	 * catch (InvalidParamException e) {} //ignore } else { try {
 	 * media.addMedia(ac.getMedium(), ac); } catch (Exception e) {
@@ -125,9 +125,19 @@
 		    + " medium " + ac.getMedium() + " at-rule " + getAtRule()
 		    + " profile " + ac.getProfile());
 	}
+
+	String profile = ac.getProfile();
+	if(profile == null || profile.equals("")) {
+	    profile = ac.getCssVersion();
+	}
+
 	//loadConfig(ac.getCssVersion(), ac.getProfile());
 	// load the CssStyle
-	String classStyle = PropertiesLoader.config.getProperty("style2");
+	String classStyle = PropertiesLoader.config.getProperty(profile);
+	if(classStyle == null) {
+	    classStyle = PropertiesLoader.config.getProperty("css2");
+	}
+
 	Class style;
 	try {
 	    style = Class.forName(classStyle);
@@ -138,14 +148,11 @@
 		    + " load the style");
 	    e.printStackTrace();
 	}
-	String profile = ac.getProfile();
-	if(profile == null || profile.equals("")) {
-	    profile = ac.getCssVersion(); 
-	}
+
 	properties = new CssPropertyFactory(profile);
 	listeners = new Vector();
     }
-    
+
     /**
      * Create a new CssFouffa with a data input.
      *
@@ -160,7 +167,7 @@
     throws IOException {
 	this(ac, input, file, 0);
     }
-    
+
     /**
      * Create a new CssFouffa.
      *
@@ -172,14 +179,14 @@
      */
     public CssFouffa(ApplContext ac, URL file) throws IOException {
 	this(ac, HTTPURL.getConnection(file, ac));
-	
+
     }
-    
+
     /**
      * Create a new CssFouffa. internal, to get the URLCOnnection and fill the
      * URL with the relevant one
      */
-    
+
     private CssFouffa(ApplContext ac, URLConnection uco) throws IOException {
 	this(ac, uco.getInputStream(), uco.getURL(), 0);
 	String httpCL = uco.getHeaderField("Content-Location");
@@ -187,7 +194,7 @@
 	    setURL(HTTPURL.getURL(getURL(), httpCL));
 	}
     }
-    
+
     /**
      * Create a new CssFouffa. Used by handleImport.
      *
@@ -211,7 +218,7 @@
 	this.properties = cssfactory;
 	this.mode = mode;
     }
-    
+
     private void ReInit(ApplContext ac, InputStream input, URL file, Frame frame) {
 	// reinitialize the parser with a new data input
 	// and a new frame for errors and warnings
@@ -238,27 +245,33 @@
 		    + " medium " + ac.getMedium() + " profile "
 		    + ac.getProfile());
 	}
-	
+
+	String profile = ac.getProfile();
+	if(profile == null || profile.equals("")) {
+	    profile = ac.getCssVersion();
+	}
+
 //	 load the CssStyle
-	String classStyle = PropertiesLoader.config.getProperty("style2");
+	String classStyle = PropertiesLoader.config.getProperty(profile);
+	if(classStyle == null) {
+	    classStyle = PropertiesLoader.config.getProperty("css2");
+	}
+
 	Class style;
 	try {
 	    style = Class.forName(classStyle);
 	    ac.setCssSelectorsStyle(style);
-	}	
+	}
 	catch (ClassNotFoundException e) {
 	    System.err.println("org.w3c.css.parser.CssFouffa: couldn't"
 		    + " load the style");
 	    e.printStackTrace();
 	}
-	String profile = ac.getProfile();	
-	if(profile == null || profile.equals("")) {
-	    profile = ac.getCssVersion(); 
-	}
+
 	properties = new CssPropertyFactory(profile);
 	//loadConfig(ac.getCssVersion(), ac.getProfile());
     }
-    
+
     /**
      * Reinitializes a new CssFouffa with a data input and a begin line number.
      *
@@ -277,7 +290,7 @@
 	ac.setFrame(f);
 	ReInit(ac, input, file, f);
     }
-    
+
     /**
      * Reinitializes a new CssFouffa with a data input.
      *
@@ -294,7 +307,7 @@
 	ac.setFrame(f);
 	ReInit(ac, input, file, f);
     }
-    
+
     /**
      * Reinitializes a new CssFouffa.
      *
@@ -310,7 +323,7 @@
 	URLConnection urlC = HTTPURL.getConnection(file, ac);
 	ReInit(ac, urlC.getInputStream(), urlC.getURL(), f);
     }
-    
+
     /**
      * Set the attribute origin
      *
@@ -320,7 +333,7 @@
     private final void setOrigin(int origin) {
 	this.origin = origin;
     }
-    
+
     /**
      * Returns the attribute origin
      *
@@ -329,7 +342,7 @@
     public final int getOrigin() {
 	return origin;
     }
-    
+
     /**
      * Adds a listener to the parser.
      *
@@ -340,7 +353,7 @@
     public final void addListener(CssValidatorListener listener) {
 	listeners.addElement(listener);
     }
-    
+
     /**
      * Removes a listener from the parser
      *
@@ -351,29 +364,29 @@
     public final void removeListener(CssValidatorListener listener) {
 	listeners.removeElement(listener);
     }
-    
+
     /**
      * Parse the style sheet. This is the main function of this parser.
      *
      * <p>
      * Example:<br>
      * <code>
-     * CssFouffa parser = new CssFouffa(new 
+     * CssFouffa parser = new CssFouffa(new
      *                                URL("http://www.w3.org/drafts.css"));<BR>
      * CssValidatorListener myListener = new MyParserListener();<BR>
      * <BR>
      * parser.addListener(myListener);<BR>
      * parser.parseStyle();<BR>
      * </code>
-     * 
+     *
      * @see            org.w3c.css.parser.CssFouffa#addListener
      */
     public void parseStyle() {
 	try {
 	    parserUnit();
-	} catch(TokenMgrError e) {	    
+	} catch(TokenMgrError e) {
 	    throw e;
-	} catch (Throwable e) {	    
+	} catch (Throwable e) {
 	    if (Util.onDebug) {
 		e.printStackTrace();
 	    }
@@ -381,16 +394,16 @@
 	    ne.fillInStackTrace();
 	    throw (ne);
 	}
-	
+
 	// That's all folks, notify all errors and warnings
 	for (Enumeration e = listeners.elements(); e.hasMoreElements();) {
 	    CssValidatorListener listener;
 	    listener = (CssValidatorListener) e.nextElement();
 	    listener.notifyErrors(ac.getFrame().getErrors());
 	    listener.notifyWarnings(ac.getFrame().getWarnings());
-	}	
+	}
     }
-    
+
     /**
      * Call by the import statement.
      *
@@ -399,13 +412,13 @@
      * @param file
      *            the file name in the import statement
      */
-    public void handleImport(URL url, String file, AtRuleMedia media) {	
+    public void handleImport(URL url, String file, AtRuleMedia media) {
 	//CssError cssError = null;
-	
+
 	try {
 	    URL importedURL = HTTPURL.getURL(url, file);
 	    String surl = importedURL.toString();
-	    
+
 	    if (visited == null) {
 		visited = new Vector(2);
 	    } else {
@@ -425,14 +438,14 @@
 	    }
 	    Vector newVisited = (Vector) visited.clone();
 	    newVisited.addElement(surl);
-	    
+
 	    if (Util.importSecurity) {
 		throw new FileNotFoundException("[SECURITY] You can't "
 			+ "import URL sorry.");
 	    }
-	    
+
 	    URLConnection importURL = HTTPURL.getConnection(importedURL, ac);
-	    
+
 	    if (importURL instanceof HttpURLConnection) {
 		HttpURLConnection httpURL = (HttpURLConnection) importURL;
 		String httpCL = httpURL.getHeaderField("Content-Location");
@@ -446,7 +459,7 @@
 		} else {
 		    if (mtype.toLowerCase().indexOf("text/html") != -1) {
 			throw new FileNotFoundException(importURL.getURL()
-				+": You can't import" 
+				+": You can't import"
 				+" an HTML document");
 		    }
 		}
@@ -472,7 +485,7 @@
 	    }
 	}
     }
-    
+
     /**
      * Call by the at-rule statement.
      *
@@ -481,7 +494,7 @@
      * @param string
      *            The string representation of this at-rule
      */
-    public void handleAtRule(String ident, String string) {	
+    public void handleAtRule(String ident, String string) {
 	if (mode) {
 	    Enumeration e = listeners.elements();
 	    while (e.hasMoreElements()) {
@@ -498,7 +511,7 @@
 	    }
 	}
     }
-    
+
     /**
      * Assign an expression to a property.  This function create a new property
      * with <code>property</code> and assign to it the expression with the
@@ -516,22 +529,22 @@
      */
     public CssProperty handleDeclaration(String property,
 	    CssExpression expression, boolean important)
-    throws InvalidParamException {	
+    throws InvalidParamException {
 	CssProperty prop;
 	if (Util.onDebug) {
 	    System.err.println("Creating " + property + ": " + expression);
 	}
-	
+
 	try {
 	    if (getMediaDeclaration().equals("on")
-		    && (getAtRule() instanceof AtRuleMedia)) {		
+		    && (getAtRule() instanceof AtRuleMedia)) {
 		prop = properties.createMediaFeature(ac, getAtRule(), property,
 			expression);
 	    } else {
 		prop = properties.createProperty(ac, getAtRule(), property,
 			expression);
 	    }
-	    
+
 	} catch (InvalidParamException e) {
 	    throw e;
 	} catch (Exception e) {
@@ -540,7 +553,7 @@
 	    }
 	    throw new InvalidParamException(e.toString(), ac);
 	}
-	
+
 	// set the importance
 	if (important) {
 	    prop.setImportant();
@@ -548,12 +561,12 @@
 	prop.setOrigin(origin);
 	// set informations for errors and warnings
 	prop.setInfo(ac.getFrame().getLine(), ac.getFrame().getSourceFile());
-	
-	// ok, return the new property	
+
+	// ok, return the new property
 	return prop;
-	
+
     }
-    
+
     /**
      * Parse only a list of declarations. This is useful to parse the
      * <code>STYLE</code> attribute in a HTML document.
@@ -580,7 +593,7 @@
 	// here we have an example for reusing the parser.
 	try {
 	    Vector properties = declarations();
-	    
+
 	    if (properties != null && properties.size() != 0) {
 		handleRule(context, properties);
 	    }
@@ -594,7 +607,7 @@
 		ac.getFrame().addError(error);
 	    }
 	}
-	
+
 	if (!Util.noErrorTrace) {
 	    for (Enumeration e = listeners.elements(); e.hasMoreElements();) {
 		CssValidatorListener listener = (CssValidatorListener) e
@@ -604,26 +617,26 @@
 	    }
 	}
     }
-    
+
     /**
      * used for the output of the stylesheet
-     * 
+     *
      * @param atRule
      *            the
      * @rule that just has been found by the parser in the stylesheet, it is
      *       added to the storage for the output
      */
-    public void newAtRule(AtRule atRule) {	
+    public void newAtRule(AtRule atRule) {
 	for (Enumeration e = listeners.elements(); e.hasMoreElements();) {
 	    ((CssValidatorListener) e.nextElement()).newAtRule(atRule);
 	}
     }
-    
+
     /**
      * used for the output of the stylesheet
-     * 
+     *
      * @param charset
-     *            the @charset 
+     *            the @charset
      *            rule that has been found by the parser
      */
     public void addCharSet(String charset) {
@@ -631,10 +644,10 @@
 	    ((CssValidatorListener) e.nextElement()).addCharSet(charset);
 	}
     }
-    
+
     /**
      * used for the output of the stylesheet the
-     * 
+     *
      * @rule that had been found before is closed here after the content that's
      *       in it.
      */
@@ -643,10 +656,10 @@
 	    ((CssValidatorListener) e.nextElement()).endOfAtRule();
 	}
     }
-    
+
     /**
      * used for the output of the stylesheet
-     * 
+     *
      * @param important
      *            true if the rule was declared important in the stylesheet
      */
@@ -655,23 +668,23 @@
 	    ((CssValidatorListener) e.nextElement()).setImportant(important);
 	}
     }
-    
+
     /**
      * used for the output of the stylesheet
-     * 
+     *
      * @param selectors
      *            a list of one or more selectors to be added to the output
      *            stylesheet
      */
-    public void setSelectorList(Vector selectors) {	
+    public void setSelectorList(Vector selectors) {
 	for (Enumeration e = listeners.elements(); e.hasMoreElements();) {
 	    ((CssValidatorListener) e.nextElement()).setSelectorList(selectors);
 	}
     }
-    
+
     /**
      * used for the output of the stylesheet
-     * 
+     *
      * @param properties
      *            A list of properties that are following eachother in the
      *            stylesheet (for example: all properties in an
@@ -682,7 +695,7 @@
 	    ((CssValidatorListener) e.nextElement()).setProperty(properties);
 	}
     }
-    
+
     /**
      * used for the output of the stylesheet used to close a rule when it has
      * been read by the parser
@@ -692,7 +705,7 @@
 	    ((CssValidatorListener) e.nextElement()).endOfRule();
 	}
     }
-    
+
     /**
      * used for the output of the stylesheet if an error is found this function
      * is used to remove the whole stylerule from the memorystructure so that it
@@ -703,11 +716,11 @@
 	    ((CssValidatorListener) e.nextElement()).removeThisRule();
 	}
     }
-    
+
     /**
      * used for the output of the stylesheet if an error is found this function
      * is used to remove the whole
-     * 
+     *
      * @rule from the memorystructure so that it won't appear on the screen
      */
     public void removeThisAtRule() {
@@ -715,7 +728,7 @@
 	    ((CssValidatorListener) e.nextElement()).removeThisAtRule();
 	}
     }
-    
+
     /**
      * Adds a vector of properties to a selector.
      *
@@ -724,13 +737,13 @@
      * @param declarations
      *            Properties to associate with contexts
      */
-    public void handleRule(CssSelectors selector, Vector declarations) {	
+    public void handleRule(CssSelectors selector, Vector declarations) {
 	for (Enumeration e = listeners.elements(); e.hasMoreElements();) {
 	    ((CssValidatorListener) e.nextElement()).handleRule(ac, selector,
 		    declarations);
 	}
     }
-    
+
     /**
      * Return the class name for a property
      *
@@ -741,14 +754,14 @@
     public String getProperty(String property) {
 	return properties.getProperty(property);
     }
-    
+
     /**
      * Set the style
      */
     public void setStyle(Class style) {
 	ac.setCssSelectorsStyle(style);
     }
-    
+
     /**
      * Load the parser properties configuration.
      *
@@ -758,7 +771,7 @@
      * <OL>
      * You have three parser properties :
      * <LI> style:      the class name of your CssStyle.
-     * <LI> properties: the file name where the parser can find all CSS 
+     * <LI> properties: the file name where the parser can find all CSS
      *                  properties names.
      * <LI> extended-parser: <code>true</code> if you want to parse cascading
      *                  style sheet 2 or 3.
@@ -766,18 +779,18 @@
      */
    /* public void loadConfig(String version, String profile) {
 	try {
-	    
+
 	    URL allprops = CssFouffa.class.getResource("allcss.properties");
 	    URL url = null;
-	    
+
 	    if (version == null) {
 		// load the CssStyle
 		String classStyle = config.getProperty("style2");
 		Class style = Class.forName(classStyle);
 		ac.setCssSelectorsStyle(style);
-		
+
 		properties = __s_nullprop.getClone();
-		
+
 		// aural mode
 		String mode0 = config.getProperty("extended-parser");
 		if (mode0 != null) {
@@ -788,7 +801,7 @@
 		String classStyle = config.getProperty("style1");
 		Class style = Class.forName(classStyle);
 		ac.setCssSelectorsStyle(style);
-		
+
 		if (__s_css1prop == null) {
 		    // css1
 		    url = style.getResource(config.getProperty("properties1"));
@@ -796,7 +809,7 @@
 		}
 		// load properties
 		properties = __s_css1prop.getClone();
-		
+
 		// aural mode
 		String mode0 = config.getProperty("extended-parser");
 		if (mode0 != null) {
@@ -816,7 +829,7 @@
 		String classStyle = config.getProperty("style2");
 		Class style = Class.forName(classStyle);
 		ac.setCssSelectorsStyle(style);
-		
+
 		// load properties
 		if (profile == null || "".equals(profile)) {
 		    properties = __s_css2prop.getClone();
@@ -835,7 +848,7 @@
 		    }
 		    properties = __s_css2tvprop.getClone();
 		}
-		
+
 		// aural mode
 		String mode0 = config.getProperty("extended-parser");
 		if (mode0 != null) {
@@ -846,14 +859,14 @@
 		String classStyle = config.getProperty("style3");
 		Class style = Class.forName(classStyle);
 		ac.setCssSelectorsStyle(style);
-		
+
 		// load properties
 		if (__s_css3prop == null) {
 		    url = style.getResource(config.getProperty("properties3"));
 		    __s_css3prop = new CssPropertyFactory(url, allprops);
 		}
 		properties = __s_css3prop.getClone();
-		
+
 		// aural mode
 		String mode0 = config.getProperty("extended-parser");
 		if (mode0 != null) {
@@ -864,13 +877,13 @@
 		String classStyle = config.getProperty("svgstyle");
 		Class style = Class.forName(classStyle);
 		ac.setCssSelectorsStyle(style);
-		
+
 		if (__s_svgprop == null) {
 		    url = style.getResource(config.getProperty("svg"));
 		    __s_svgprop = new CssPropertyFactory(url, allprops);
 		}
 		properties = __s_svgprop.getClone();
-		
+
 		// aural mode
 		String mode0 = config.getProperty("extended-parser");
 		if (mode0 != null) {
@@ -881,13 +894,13 @@
 		String classStyle = config.getProperty("svgtinystyle");
 		Class style = Class.forName(classStyle);
 		ac.setCssSelectorsStyle(style);
-		
+
 		if (__s_svgtinyprop == null) {
 		    url = style.getResource(config.getProperty("svgtiny"));
 		    __s_svgtinyprop = new CssPropertyFactory(url, allprops);
 		}
 		properties = __s_svgtinyprop.getClone();
-		
+
 		// aural mode
 		String mode0 = config.getProperty("extended-parser");
 		if (mode0 != null) {
@@ -898,27 +911,27 @@
 		String classStyle = config.getProperty("svgbasicstyle");
 		Class style = Class.forName(classStyle);
 		ac.setCssSelectorsStyle(style);
-		
+
 		if (__s_svgbasicprop == null) {
 		    url = style.getResource(config.getProperty("svgbasic"));
 		    __s_svgbasicprop = new CssPropertyFactory(url, allprops);
 		}
 		properties = __s_svgbasicprop.getClone();
-		
+
 		// aural mode
 		String mode0 = config.getProperty("extended-parser");
 		if (mode0 != null) {
 		    mode = mode0.equals("true");
 		}
 	    }
-	    
+
 	} catch (Exception e) {
 	    System.err.println("org.w3c.css.parser.CssFouffa: couldn't"
 		    + " load the style");
 	    e.printStackTrace();
 	}
     }*/
-    
+
     /* config by default! */
     /*static {
 	try {
@@ -933,37 +946,37 @@
 	    Class style = Class.forName(classStyle);
 	    url = style.getResource(config.getProperty("properties2"));
 	    __s_nullprop = new CssPropertyFactory(url, allprops);
-	    
+
 	    // css2
 	    // classStyle = config.getProperty("style2");
 	    // style = Class.forName(classStyle);
 	    // url = style.getResource(config.getProperty("properties2"));
 	    // __s_css2prop = new CssPropertyFactory(url, allprops);
 	    __s_css2prop = __s_nullprop;
-	    
+
 	} catch (Exception e) {
 	    System.err.println("org.w3c.css.parser.CssFouffa: couldn't"
 		    + " load the config");
 	    e.printStackTrace();
 	}
     }*/
-    
+
     public CssFouffa(java.io.InputStream stream) {
 	super(stream);
 	properties = new CssPropertyFactory("css2");
 	//loadConfig("css2", null);
     }
-    
+
     public CssFouffa(java.io.Reader stream) {
 	super(stream);
 	properties = new CssPropertyFactory("css2");
 	//loadConfig("css2", null);
     }
-    
+
     public CssFouffa(CssParserTokenManager tm) {
 	super(tm);
 	properties = new CssPropertyFactory("css2");
 	//loadConfig("css2", null);
     }
-    
+
 }

Index: MediaEnumeration.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/MediaEnumeration.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- MediaEnumeration.java	8 Apr 2002 21:24:12 -0000	1.2
+++ MediaEnumeration.java	14 Sep 2005 15:14:18 -0000	1.3
@@ -21,8 +21,8 @@
     int current = 0;
 
     MediaEnumeration(AtRuleMedia media) {
-	this.media = media.media;	
-	while ((current < this.media.length) 
+	this.media = media.media;
+	while ((current < this.media.length)
 	       && (this.media[current] != null)) {
 	    current++;
 	}

Index: AtRuleMedia.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/AtRuleMedia.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- AtRuleMedia.java	23 Aug 2005 16:22:54 -0000	1.8
+++ AtRuleMedia.java	14 Sep 2005 15:14:18 -0000	1.9
@@ -26,7 +26,7 @@
 public class AtRuleMedia extends AtRule {
 
     static final String[] mediaCSS3 = {
-	"all", "aural", "braille", "embossed", "handheld", "print", 
+	"all", "aural", "braille", "embossed", "handheld", "print",
 	"projection", "screen", "tty", "tv", "presentation", "atsc-tv"
     };
 
@@ -61,7 +61,7 @@
     }
 
     public void addMediaRestrictor(String restrictor, ApplContext ac) {
-	if (restrictor.toUpperCase().equals("ONLY") || 
+	if (restrictor.toUpperCase().equals("ONLY") ||
 	    restrictor.toUpperCase().equals("NOT")) {
 	    this.restrictor = restrictor;
 	}
@@ -135,7 +135,7 @@
      */
     public String toString() {
 	StringBuffer ret  = new StringBuffer();
-	
+
 	ret.append('@');
 	ret.append(keyword());
 	ret.append(' ');
@@ -155,7 +155,7 @@
 		ret.append(media[i]);
 	    }
 	}
-	
+
 	for (int i = 0; i < mediafeatures.size(); i++) {
 	    ret.append(" and (");
 	    ret.append(((String)mediafeatures.elementAt(i)));

Index: CssValidatorListener.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/CssValidatorListener.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- CssValidatorListener.java	8 Sep 2005 12:23:33 -0000	1.5
+++ CssValidatorListener.java	14 Sep 2005 15:14:18 -0000	1.6
@@ -17,15 +17,15 @@
  *
  * @version $Revision$
  */
-public interface CssValidatorListener {  
+public interface CssValidatorListener {
 
   /**
    * Adds a vector of properties to a selector.
    *
    * @param selector     the selector
    * @param declarations Properties to associate with contexts
-   */  
-  public void handleRule(ApplContext ac, CssSelectors selector, 
+   */
+  public void handleRule(ApplContext ac, CssSelectors selector,
 			 Vector declarations);
 
   /**
@@ -44,7 +44,7 @@
    * @param ident The ident for this at-rule (for example: 'font-face')
    * @param value The string representation of this at-rule
    * @see         org.w3c.css.parser.analyzer.Couple
-   */  
+   */
   public void handleAtRule(ApplContext ac, String ident, String string);
 
   /**
@@ -54,7 +54,7 @@
    * @see CssError
    * @see CssErrorDeclaration
    * @see CssErrorToken
-   */  
+   */
   public void notifyErrors(Errors errors);
 
   /**
@@ -62,7 +62,7 @@
    *
    * @param warnings All warnings in the style sheet
    * @see org.w3c.css.util.Warning
-   */  
+   */
   public void notifyWarnings(Warnings warnings);
 
     public void addCharSet(String charset);
@@ -74,9 +74,9 @@
     public void setImportant(boolean important);
 
     public void setSelectorList(Vector selectors);
-       
+
     public void setProperty(Vector properties);
-	
+
     public void endOfRule();
 
     public void removeThisRule();

Index: AtRuleMediaCSS1.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/AtRuleMediaCSS1.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- AtRuleMediaCSS1.java	8 Aug 2005 13:18:11 -0000	1.3
+++ AtRuleMediaCSS1.java	14 Sep 2005 15:14:18 -0000	1.4
@@ -17,7 +17,7 @@
 
 /**
  * This class manages all media defines by CSS2
- * 
+ *
  * @version $Revision$
  * @author  Philippe Le H�garet
  */
@@ -37,14 +37,14 @@
     public AtRuleMediaCSS1() {
         media[0] = mediaCSS1[0];
     }
-    
+
 
     /**
      * Adds a medium.
      *
      * @exception InvalidParamException the medium doesn't exist
-     */    
-    public AtRuleMedia addMedia(String medium, 
+     */
+    public AtRuleMedia addMedia(String medium,
 				ApplContext ac) throws InvalidParamException {
 
 	// do nothing
@@ -53,7 +53,7 @@
 
     /**
      * Returns the at rule keyword
-     */    
+     */
     public String keyword() {
 	return "media";
     }
@@ -64,7 +64,7 @@
 
     /**
      * The second must be exactly the same of this one
-     */    
+     */
     public boolean canApply(AtRule atRule) {
 	if (atRule instanceof AtRuleMedia) {
 	    return true;
@@ -75,7 +75,7 @@
 
     /**
      * The second must only match this one
-     */    
+     */
     public boolean canMatched(AtRule atRule) {
 	if (atRule instanceof AtRuleMedia) {
 	    return true;
@@ -95,5 +95,5 @@
 	return "@" + keyword() + " all ";
     }
 
-    
+
 }

Index: CssSelectorsConstant.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/CssSelectorsConstant.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- CssSelectorsConstant.java	8 Sep 2005 12:23:33 -0000	1.8
+++ CssSelectorsConstant.java	14 Sep 2005 15:14:18 -0000	1.9
@@ -12,7 +12,7 @@
  * @version $Revision$
  */
 public interface CssSelectorsConstant {
-    
+
     /** [lang="fr"] */
     public static final int ATTRIBUTE_EXACT = ' ';
     /** [lang~="fr"] */
@@ -29,10 +29,10 @@
     public static final int ATTRIBUTE_SUFFIX = '$';
     /** [foo*="bar"] */
     public static final int ATTRIBUTE_SUBSTR = '*';
-    
+
     /** Maximun of ATTRIBUTE_ONE_OF */
     public static final int ATTRIBUTE_LENGTH = 10;
-    
+
     /** descendant connector  */
     public static final char DESCENDANT = ' ';
     /** child connector */

Index: AtRuleMediaCSS2.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/AtRuleMediaCSS2.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- AtRuleMediaCSS2.java	8 Aug 2005 13:18:11 -0000	1.3
+++ AtRuleMediaCSS2.java	14 Sep 2005 15:14:18 -0000	1.4
@@ -17,7 +17,7 @@
 
 /**
  * This class manages all media defines by CSS2
- * 
+ *
  * @version $Revision$
  * @author  Philippe Le H�garet
  */
@@ -36,15 +36,15 @@
      * Adds a medium.
      *
      * @exception InvalidParamException the medium doesn't exist
-     */    
-    public AtRuleMedia addMedia(String medium, 
+     */
+    public AtRuleMedia addMedia(String medium,
 				ApplContext ac) throws InvalidParamException {
 
 	//This medium didn't exist for CSS2
 	//	if ((!cssversion.equals("css3")) && medium.equals("presentation")) {
 	// throw new InvalidParamException("media", medium, ac);
 	//}
-		
+
 	for (int i = 0; i < mediaCSS2.length; i++) {
 	    if (medium.equals(mediaCSS2[i])) {
 		media[i] = mediaCSS2[i];
@@ -58,7 +58,7 @@
 
     /**
      * Returns the at rule keyword
-     */    
+     */
     public String keyword() {
 	return "media";
     }
@@ -69,7 +69,7 @@
 
     /**
      * The second must be exactly the same of this one
-     */    
+     */
     public boolean canApply(AtRule atRule) {
 	if (atRule instanceof AtRuleMedia) {
 	    AtRuleMedia second = (AtRuleMedia) atRule;
@@ -88,7 +88,7 @@
 
     /**
      * The second must only match this one
-     */    
+     */
     public boolean canMatched(AtRule atRule) {
 	if (atRule instanceof AtRuleMedia) {
 	    AtRuleMedia second = (AtRuleMedia) atRule;
@@ -122,6 +122,6 @@
 	return "@" + keyword() + " " + ret.substring(2);
     }
 
-    
+
 }
 

Index: AtRuleFontFace.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/parser/AtRuleFontFace.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- AtRuleFontFace.java	8 Apr 2002 21:24:11 -0000	1.2
+++ AtRuleFontFace.java	14 Sep 2005 15:14:18 -0000	1.3
@@ -12,7 +12,7 @@
 
 /**
  * This class manages all media defines by CSS2
- * 
+ *
  * @version $Revision$
  * @author  Philippe Le Hégaret
  */
@@ -26,32 +26,32 @@
     public AtRuleFontFace() {
        hash = ++internal;
     }
-    
+
 
     /**
      * Returns the at rule keyword
-     */    
+     */
     public String keyword() {
 	return "font-face";
     }
 
     /**
      * The second must be exactly the same of this one
-     */    
+     */
     public boolean canApply(AtRule atRule) {
 	return (atRule instanceof AtRuleFontFace);
     }
 
     /**
      * Return true if other is an instance of AtRUleFontFace
-     */    
+     */
     public boolean equals(Object other) {
 	return (other instanceof AtRuleFontFace);
     }
 
     /**
      * The second must only match this one
-     */    
+     */
     public boolean canMatched(AtRule atRule) {
 	return (atRule instanceof AtRuleFontFace);
     }
@@ -66,5 +66,5 @@
     public int hashCode() {
 	return hash;
     }
-    
+
 }

Received on Wednesday, 14 September 2005 15:16:13 UTC