W3C home > Mailing lists > Public > www-validator-cvs@w3.org > February 2012

2002/css-validator/org/w3c/css/servlet CssValidator.java,1.51,1.52

From: Yves Lafon via cvs-syncmail <cvsmail@w3.org>
Date: Thu, 16 Feb 2012 13:29:24 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1Ry1Om-0004sY-KZ@lionel-hutz.w3.org>
Update of /sources/public/2002/css-validator/org/w3c/css/servlet
In directory hutz:/tmp/cvs-serv18719/servlet

Modified Files:
	CssValidator.java 
Log Message:
switch back to TagSoup, as there are performance issues and memory usage issues with HTMLParser (the issue might be the way it is used, so it might be used again in the future)

Index: CssValidator.java
===================================================================
RCS file: /sources/public/2002/css-validator/org/w3c/css/servlet/CssValidator.java,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -d -r1.51 -r1.52
--- CssValidator.java	31 Oct 2011 13:22:33 -0000	1.51
+++ CssValidator.java	16 Feb 2012 13:29:22 -0000	1.52
@@ -7,13 +7,7 @@
 
 package org.w3c.css.servlet;
 
-import org.w3c.css.css.CssParser;
-import org.w3c.css.css.DocumentParser;
-import org.w3c.css.css.HTMLParserStyleSheetHandler;
-import org.w3c.css.css.StyleReport;
-import org.w3c.css.css.StyleReportFactory;
-import org.w3c.css.css.StyleSheet;
-import org.w3c.css.css.StyleSheetParser;
+import org.w3c.css.css.*;
 import org.w3c.css.error.ErrorReport;
 import org.w3c.css.error.ErrorReportFactory;
 import org.w3c.css.index.IndexGenerator;
@@ -399,7 +393,8 @@
                             .getStyleSheet(), output, warningLevel, errorReport);
                 } else {
                     // else, trying HTML
-                    HTMLParserStyleSheetHandler handler = new HTMLParserStyleSheetHandler(null, ac);
+//                    HTMLParserStyleSheetHandler handler = new HTMLParserStyleSheetHandler(null, ac);
+                    TagSoupStyleSheetHandler handler = new TagSoupStyleSheetHandler(null, ac);
                     handler.parse(is, fileName);
 
                     handleRequest(ac, res, fileName, handler.getStyleSheet(), output,
@@ -664,7 +659,8 @@
                         output, warningLevel, errorReport);
             } else {
                 // else, trying HTML
-                HTMLParserStyleSheetHandler handler = new HTMLParserStyleSheetHandler(null, ac);
+//                HTMLParserStyleSheetHandler handler = new HTMLParserStyleSheetHandler(null, ac);
+                TagSoupStyleSheetHandler handler = new TagSoupStyleSheetHandler(null, ac);
                 handler.parse(is, fileName);
 
                 handleRequest(ac, res, fileName, handler.getStyleSheet(),
Received on Thursday, 16 February 2012 13:29:29 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:55:33 GMT