2002/css-validator/org/w3c/css/servlet CssValidator.java,1.21,1.22

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

Modified Files:
	CssValidator.java 
Log Message:
Jean-Gui strikes back!
http://www.w3.org/Bugs/Public/show_bug.cgi?id=2560 -> @media case insensitive
http://www.w3.org/Bugs/Public/show_bug.cgi?id=3037 -> grammar correction
http://www.w3.org/Bugs/Public/show_bug.cgi?id=2920
http://www.w3.org/Bugs/Public/show_bug.cgi?id=2800
http://www.w3.org/Bugs/Public/show_bug.cgi?id=233
http://www.w3.org/Bugs/Public/show_bug.cgi?id=2919
http://www.w3.org/Bugs/Public/show_bug.cgi?id=2446
http://www.w3.org/Bugs/Public/show_bug.cgi?id=3099

output parameter bug fixed:
        accepted values :
            * text/html and html
            * application/xhtml+xml and xhtml
            * application/soap+xml and soap12
            * everything else: text/plain

fixed a bug with SOAP output



Index: CssValidator.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/servlet/CssValidator.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- CssValidator.java	14 Sep 2005 15:15:32 -0000	1.21
+++ CssValidator.java	19 Apr 2006 11:28:06 -0000	1.22
@@ -50,6 +50,8 @@
 
     final static String texthtml    = "text/html";
 
+    final static String applxhtml   = "application/xhtml+xml";
+    
     final static String textplain   = "text/plain";
 
     final static String textunknwon = "text/unknown";
@@ -220,7 +222,7 @@
 	}
 	String text = null;
 	try {
-	    text = req.getParameter("text");
+	    text = req.getParameter("text");            
 	} catch (Exception ex) {
 	    // pb in URI decoding (bad escaping, most probably)
 	    // not sure it will work here, as it may be catched by the first
@@ -257,7 +259,7 @@
 	    Util.onDebug = false;
 	}
 
-	text = Util.suppressWhiteSpace(text);
+	//text = Util.suppressWhiteSpace(text);
 	uri = Util.suppressWhiteSpace(uri);
 
 	if (output == null) {
@@ -350,6 +352,7 @@
 	    parser = new StyleSheetParser();
 
 	    try {
+                
 		parser.parseStyleElement(ac,
 			new ByteArrayInputStream(text.getBytes()),
 			null, usermedium,
@@ -617,9 +620,11 @@
 
 	// set the content-type for the response
 	MimeType outputMt = null;
-	if (output.equals(texthtml)) {
+	if (output.equals(texthtml) || output.equals("html")) {	    
 	    outputMt = MimeType.TEXT_HTML.getClone();
-	} else if (output.equals("soap12")) {
+	} else if (output.equals(applxhtml) || output.equals("xhtml")) {
+	    outputMt = MimeType.APPLICATION_XHTML_XML.getClone();
+	} else if (output.equals(soap12) || output.equals("soap12")) {
 	    // invert the comments on the following lines to (de)activate
 	    // the soap Mime Type
 	    try {

Received on Wednesday, 19 April 2006 11:28:17 UTC