- From: Julien Grand-Mourcel via cvs-syncmail <cvsmail@w3.org>
- Date: Fri, 13 Jul 2007 13:32:22 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/org/w3c/css/servlet
In directory hutz:/tmp/cvs-serv13393/org/w3c/css/servlet
Modified Files:
check.java CssValidator.java
Log Message:
Adding patch to use Velocity template engine.
And some other changes...
Index: CssValidator.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/servlet/CssValidator.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- CssValidator.java 24 Apr 2007 11:14:23 -0000 1.27
+++ CssValidator.java 13 Jul 2007 13:32:20 -0000 1.28
@@ -189,6 +189,7 @@
public void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
+
boolean errorReport = true;
int warningLevel = 2;
CssParser parser = null;
@@ -208,6 +209,7 @@
lang += ',' + req.getHeader("Accept-Language");
}
ApplContext ac = new ApplContext(lang);
+ ac.setLink(req.getQueryString());
ac.setContentEncoding(req.getHeader("Accept-Charset"));
String output = req.getParameter("output");
@@ -331,7 +333,8 @@
try {
uri = HTTPURL.getURL(uri).toString(); // needed to be sure
// that it is a valid
- // url
+ // url
+ uri = uri.replaceAll(" ", "%20");
DocumentParser URLparser = new DocumentParser(ac, uri);
handleRequest(ac, res, uri, URLparser.getStyleSheet(), output,
@@ -425,13 +428,14 @@
lang += ',' + req.getHeader("Accept-Language");
}
ApplContext ac = new ApplContext(lang);
+ ac.setLink(req.getQueryString());
boolean errorReport = true;
int warningLevel = 2;
CssParser parser = null;
FakeFile file = null;
String output = null;
- boolean XMLinput = false;
+ //boolean XMLinput = false;
String warning = null;
String error = null;
String profile = null;
@@ -497,8 +501,8 @@
warning = (String) tmp[i].getValue();
} else if (tmp[i].getName().equals("error")) {
warning = (String) tmp[i].getValue();
- } else if (tmp[i].getName().equals("input")) {
- XMLinput = ((String) tmp[i].getValue()).equals("XML");
+ //} else if (tmp[i].getName().equals("input")) {
+ // XMLinput = ((String) tmp[i].getValue()).equals("XML");
} else if (tmp[i].getName().equals("profile")) {
profile = (String) tmp[i].getValue();
} else if (tmp[i].getName().equals("usermedium")) {
@@ -590,6 +594,8 @@
+ title);
}
+ System.err.println(output);
+
// if the output parameter was a mime type, we convert it
// to an understandable value for the StyleReportFactory
if ("text/xml".equals(ac.getInput()) && texthtml.equals(output)) {
Index: check.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/servlet/check.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- check.java 28 May 2007 05:36:04 -0000 1.11
+++ check.java 13 Jul 2007 13:32:20 -0000 1.12
@@ -16,7 +16,6 @@
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import java.net.URLEncoder;
/**
* This class is a servlet to use the validator.
Received on Friday, 13 July 2007 13:32:34 UTC