- From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
- Date: Fri, 06 Feb 2009 13:18:52 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/org/w3c/css/servlet In directory hutz:/tmp/cvs-serv27368/org/w3c/css/servlet Modified Files: CssValidator.java Log Message: pre-alpha json output Index: CssValidator.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/servlet/CssValidator.java,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- CssValidator.java 13 Sep 2007 10:15:33 -0000 1.37 +++ CssValidator.java 6 Feb 2009 13:18:50 -0000 1.38 @@ -63,7 +63,9 @@ final static String soap12 = "application/soap+xml"; - final static String server_name = "Jigsaw/2.2.2 " + final static String json = "application/json"; + + final static String server_name = "Jigsaw/2.2.5 " + "W3C_CSS_Validator_JFouffa/2.0"; final static String headers_name = "X-W3C-Validator-"; @@ -699,6 +701,8 @@ output = "html"; } else if (soap12.equals(output)) { output = "soap12"; + } else if (json.equals(output)) { + output = "json"; } else if(textplain.equals(output)) { output = "text"; } @@ -760,6 +764,13 @@ //outputMt = MimeType.TEXT_PLAIN.getClone(); } else if(output.equals("ucn")) { outputMt = MimeType.APPLICATION_XML.getClone(); + } else if(output.equals("json")) { + try { + outputMt = new MimeType(json); + } + catch (MimeTypeFormatException e) { + outputMt = MimeType.TEXT_PLAIN.getClone(); + } } else { // Change this line if you want text/html output when incorrect // output is passed
Received on Friday, 6 February 2009 13:19:02 UTC