2002/css-validator/org/w3c/css/css CssStyleRule.java,1.15,1.16

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

Modified Files:
	CssStyleRule.java 
Log Message:
Removing the toHTML and clear functions (not used anymore thanks to Velocity)

Index: CssStyleRule.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/css/CssStyleRule.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- CssStyleRule.java	13 Jul 2007 13:32:19 -0000	1.15
+++ CssStyleRule.java	30 Jul 2007 11:35:52 -0000	1.16
@@ -8,7 +8,6 @@
 import java.util.Vector;
 
 import org.w3c.css.properties.css1.CssProperty;
-import org.w3c.css.util.Util;
 
 public class CssStyleRule {
 
@@ -17,6 +16,21 @@
 		this.properties = properties;
 		this.indent = indent;
 	}
+	/**
+	 * This function is only used inside the velocity template
+	 * @return the list of selectors in a string
+	 */
+	public String getSelectors() {
+		return selectors;
+	}
+	
+	/**
+	 * This function is only used inside the velocity template
+	 * @return the list of properties in a Vector
+	 */
+	public Vector getProperties() {
+		return properties;
+	}
 
 	public String toString() {
 		StringBuffer ret = new StringBuffer();
@@ -67,33 +81,6 @@
 	 * Some identation (\t) was necessary to maintain the correct formatting
 	 * of the html output.
 	 */
-	public String toHTML() {
-		String ret = "";
-		if (properties != null) {
-			ret = "\n\t\t\t\t<div class='selector'>\n\t\t\t\t\t<span class='selectorValue'>";
-			if (selectors != null) {
-				ret += selectors;
-				ret += "</span> {\n\t\t\t\t\t<div class='RuleList'>\n";
-			}
-
-			for (int i = 0; i < properties.size(); i++) {
-				CssProperty property = (CssProperty) properties.elementAt(i);
-				ret += "\t\t\t\t\t\t<div class='Rule'>";
-				ret += "<span class='Property'>";
-				ret += Util.escapeHTML(property.getPropertyName());
-				ret += "</span>";
-				ret += " : <span class='PropertyValue'>";
-				ret += Util.escapeHTML(property.toString());
-				ret += "</span>";
-				if (property.getImportant()) {
-					ret += " !important";
-				}
-				ret += ";</div>\n";
-			}
-			ret += "\t\t\t\t\t</div>}\n\t\t\t\t</div>\n\n";
-		}
-		return ret;
-	}
 
 	private String indent;
 	private String selectors;

Received on Monday, 30 July 2007 11:36:05 UTC