2002/css-validator/org/w3c/css/util ApplContext.java,1.11,1.12

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

Modified Files:
	ApplContext.java 
Log Message:
Adding the formatting method to the application context so it can be used everywhere. (StyleSheetGenerator for instance)

Index: ApplContext.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/util/ApplContext.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- ApplContext.java	13 Jul 2007 13:32:21 -0000	1.11
+++ ApplContext.java	7 Aug 2007 10:53:39 -0000	1.12
@@ -126,6 +126,19 @@
 		}
 		return cssversion;
 	}
+	
+	public String getFormatedCssVersion() {
+		if (!this.cssversion.toLowerCase().startsWith("css"))
+			return this.cssversion;
+		char number[] = this.cssversion.substring(3).toCharArray();
+		String css = "CSS ";
+		for (int i = 0; i < number.length; ++i) {
+			css += number[i];
+			if (i != number.length - 1)
+				css += ".";
+		}
+		return css;
+	}
 
 	public void setProfile(String profile) {
 		this.profile = profile;

Received on Tuesday, 7 August 2007 10:53:43 UTC