Update of /sources/public/2002/css-validator/org/w3c/css/css In directory hutz:/tmp/cvs-serv13393/org/w3c/css/css Modified Files: StyleReportFactory.java StyleSheetCom.java CssStyleRule.java xml.properties StyleSheetGeneratorHTML.java format.properties StyleReport.java XMLStyleSheetHandler.java StyleSheet.java StyleSheetGenerator.java CssRuleList.java DocumentParser.java NewStyleSheet.java Added Files: ucn.properties xhtml.properties soap12.properties .cvsignore Removed Files: xhtml.properties.nl xhtml.properties.ja StyleSheetGeneratorHTML2.java xhtml.properties.zh-cn ucn.properties.en xhtml.properties.pl-PL xhtml.properties.fr StyleReportUCN.java xhtml.properties.es xhtml.properties.it xhtml.properties.en soap12.properties.en xhtml.properties.de StyleReportSOAP12.java StyleSheetGenerator2.java Log Message: Adding patch to use Velocity template engine. And some other changes... --- xhtml.properties.fr DELETED --- --- xhtml.properties.pl-PL DELETED --- Index: DocumentParser.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/css/DocumentParser.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- DocumentParser.java 24 Apr 2007 11:14:22 -0000 1.1 +++ DocumentParser.java 13 Jul 2007 13:32:19 -0000 1.2 @@ -24,131 +24,122 @@ */ public final class DocumentParser { - private StyleSheet style; - private URL htmlURL; - private Exception exception; - private ApplContext ac; + private StyleSheet style; + private URL htmlURL; + private Exception exception; + private ApplContext ac; - /** - * Create a new DocumentParser - * - * @exception Exception An error - */ - public DocumentParser(ApplContext ac, String urlString) - throws Exception { - this.htmlURL = HTTPURL.getURL(urlString); - this.ac = ac; - urlString = htmlURL.toString(); - String urlLower = urlString.toLowerCase(); - String media = ac.getMedium(); - String urlProtocol = htmlURL.getProtocol(); + /** + * Create a new DocumentParser + * + * @exception Exception + * An error + */ + public DocumentParser(ApplContext ac, String urlString) throws Exception { + this.htmlURL = HTTPURL.getURL(urlString); + this.ac = ac; + urlString = htmlURL.toString(); + String urlLower = urlString.toLowerCase(); + String media = ac.getMedium(); + String urlProtocol = htmlURL.getProtocol(); - if (!"http".equals(urlProtocol) && !"https".equals(urlProtocol)) { - if (urlLower.endsWith(".css")) { - StyleSheetParser parser = new StyleSheetParser(); - parser.parseURL(ac, htmlURL, null, null, media, - StyleSheetOrigin.AUTHOR); - style = parser.getStyleSheet(); - } else if (urlLower.endsWith(".html") - || urlLower.endsWith(".shtml") - || urlLower.endsWith("/")) { - TagSoupStyleSheetHandler handler; - handler = new TagSoupStyleSheetHandler(htmlURL, ac); - handler.parse(htmlURL); - style = handler.getStyleSheet(); - if (style != null) { - style.setType("text/html"); - } - } else if (urlLower.endsWith(".xhtml") - || urlLower.endsWith(".xml")) { - XMLStyleSheetHandler handler; - handler = new XMLStyleSheetHandler(htmlURL, ac); - handler.parse(htmlURL); - style = handler.getStyleSheet(); - if (style != null) { - style.setType("text/xml"); - } - } else { - throw new Exception("Unknown file"); - } - } else { - URLConnection connection = null; + if (!"http".equals(urlProtocol) && !"https".equals(urlProtocol)) { + if (urlLower.endsWith(".css")) { + StyleSheetParser parser = new StyleSheetParser(); + parser.parseURL(ac, htmlURL, null, null, media, StyleSheetOrigin.AUTHOR); + style = parser.getStyleSheet(); + } else if (urlLower.endsWith(".html") || urlLower.endsWith(".shtml") || urlLower.endsWith("/")) { + TagSoupStyleSheetHandler handler = new TagSoupStyleSheetHandler(htmlURL, ac); + handler.parse(htmlURL); + style = handler.getStyleSheet(); + if (style != null) { + style.setType("text/html"); + } + } else if (urlLower.endsWith(".xhtml") || urlLower.endsWith(".xml")) { + // Seems like we need to use tagsout in this case as well + XMLStyleSheetHandler handler = new XMLStyleSheetHandler(htmlURL, ac); + handler.parse(htmlURL); + style = handler.getStyleSheet(); + if (style != null) { + style.setType("text/xml"); + } + } else { + throw new Exception("Unknown file"); + } + } else { + URLConnection connection = null; - try { - boolean isXML = false; - String cType; + try { + boolean isXML = false; + String cType; - // @@ hum, maybe? (plh, yes probably :-) ) - String credential = ac.getCredential(); + // @@ hum, maybe? (plh, yes probably :-) ) + String credential = ac.getCredential(); - connection = HTTPURL.getConnection(htmlURL, ac); - htmlURL = connection.getURL(); + connection = HTTPURL.getConnection(htmlURL, ac); + htmlURL = connection.getURL(); - String httpCL = connection.getHeaderField("Content-Location"); - if (httpCL != null) { - htmlURL = HTTPURL.getURL(htmlURL, httpCL); - } + String httpCL = connection.getHeaderField("Content-Location"); + if (httpCL != null) { + htmlURL = HTTPURL.getURL(htmlURL, httpCL); + } - cType = connection.getContentType(); - if (cType == null) { - cType = "unknown/unknown"; - } - MimeType contentType = null; - try { - contentType = new MimeType(cType); - } catch (MimeTypeFormatException ex) { - } + cType = connection.getContentType(); + if (cType == null) { + cType = "unknown/unknown"; + } + MimeType contentType = null; + try { + contentType = new MimeType(cType); + } catch (MimeTypeFormatException ex) { + } - if (Util.onDebug) { - System.err.println( "[DEBUG] content type is [" + - contentType + ']'); - } + if (Util.onDebug) { + System.err.println("[DEBUG] content type is [" + contentType + ']'); + } - if (contentType.match(MimeType.TEXT_HTML) == - MimeType.MATCH_SPECIFIC_SUBTYPE) { - TagSoupStyleSheetHandler handler; - handler = new TagSoupStyleSheetHandler(htmlURL, ac); - handler.parse(urlString, connection); - style = handler.getStyleSheet(); - - if (style != null) { - style.setType("text/html"); - } - } else if (contentType.match(MimeType.TEXT_CSS) == - MimeType.MATCH_SPECIFIC_SUBTYPE ) { - StyleSheetParser parser = new StyleSheetParser(); - parser.parseURL(ac, htmlURL, null, null, media, - StyleSheetOrigin.AUTHOR); - style = parser.getStyleSheet(); - } else if ((contentType.match(MimeType.TEXT_XML) == - MimeType.MATCH_SPECIFIC_SUBTYPE) || - (contentType.match(MimeType.APPLICATION_XHTML_XML) == - MimeType.MATCH_SPECIFIC_SUBTYPE)) { - XMLStyleSheetHandler handler; - handler = new XMLStyleSheetHandler(htmlURL, ac); - handler.parse(urlString, connection); - style = handler.getStyleSheet(); - - if (style != null) { - style.setType("text/xml"); - } - } else { - throw new IOException("Unknown mime type : "+ contentType); + if (contentType.match(MimeType.TEXT_HTML) == MimeType.MATCH_SPECIFIC_SUBTYPE) { + TagSoupStyleSheetHandler handler; + handler = new TagSoupStyleSheetHandler(htmlURL, ac); + handler.parse(urlString, connection); + style = handler.getStyleSheet(); + + if (style != null) { + style.setType("text/html"); + } + } else if (contentType.match(MimeType.TEXT_CSS) == MimeType.MATCH_SPECIFIC_SUBTYPE) { + StyleSheetParser parser = new StyleSheetParser(); + parser.parseURL(ac, htmlURL, null, null, media, StyleSheetOrigin.AUTHOR); + style = parser.getStyleSheet(); + } else if ((contentType.match(MimeType.TEXT_XML) == MimeType.MATCH_SPECIFIC_SUBTYPE) + || (contentType.match(MimeType.APPLICATION_XHTML_XML) == MimeType.MATCH_SPECIFIC_SUBTYPE)) { + // TagSoup ? + XMLStyleSheetHandler handler = new XMLStyleSheetHandler(htmlURL, ac); + handler.parse(urlString, connection); + style = handler.getStyleSheet(); + + if (style != null) { + style.setType("text/xml"); + } + } else { + throw new IOException("Unknown mime type : " + contentType); + } + } finally { + try { + connection.getInputStream().close(); + } catch (Exception e) { + } + } } - } finally { - try { - connection.getInputStream().close(); - } catch (Exception e) {} - } } - } - /** - * Returns the recognized style sheet. - * @return A style sheet. - */ - public StyleSheet getStyleSheet() { - return style; - } + /** + * Returns the recognized style sheet. + * + * @return A style sheet. + */ + public StyleSheet getStyleSheet() { + return style; + } } // HTMLStyleSheetParser Index: StyleSheetGeneratorHTML.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/css/StyleSheetGeneratorHTML.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- StyleSheetGeneratorHTML.java 19 Apr 2006 11:28:05 -0000 1.7 +++ StyleSheetGeneratorHTML.java 13 Jul 2007 13:32:19 -0000 1.8 @@ -1,577 +1,459 @@ -// -// $Id$ -// From Philippe Le Hegaret (http://www.w3.org/unicorn/observationresponse" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/unicorn/observationresponse file:observer-response.xsd"> <uri>$file_title</uri> <checkedby>http://jigsaw.w3.org/css-validator/</checkedby> <version>$cssversion</version> <date>$currentdate</date> <passed>$is_valid</passed> <result> #if ( $errors_count > 0 ) <errors xml:lang="$lang"> <errorcount>$errors_count</errorcount> #foreach ( $error_content in $errors_content ) #set ( $err = $error_content.get("Error") ) #set ( $error_msg = $error_content.get("ErrorMsg") ) #set ( $context_name = $error_content.get("CtxName") ) #set ( $context_msg = $error_content.get("CtxMsg") ) #set ( $class_name = $error_content.get("ClassName") ) <error> <line_number>$err.Line</line_number> <context_msg name="$context_name">#if ( $context_msg ) $context_msg #end</context_msg> <message name="$class_name">$error_msg</message> </error> #end </errors> #end #if ( $warnings_count > 0 ) <warnings xml:lang="$lang"> <warningcount>$warnings_count</warningcount> #foreach ( $warning in $warnings_list ) <warning> <line_number>$warning.Line</line_number> <code_context>#if ( $warning.Context ) $warning.Context #end</code_context> <message level="$warning.Level">$warning.WarningMessage</message> </warning> #end </warnings> #end #if ( $errors_count == 0 ) <informations xml:lang="$lang"> <infocount>1</infocount> <infolist> <uri>$file_title</uri> <info> <message>$doc_validates</message> <longmessage> <a href="http://jigsaw.w3.org/css-validator/"> <img src="http://jigsaw.w3.org/css-validator/images/vcss" alt="$valid_CSS" /> </a> </longmessage> <longmessage>$no_errors_interoperable_msg</longmessage> <longmessage> <code> <p> <a href="http://jigsaw.w3.org/css-validator/"> <img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" /> </a> </p> </code> ($no_errors_close_tags_msg) </longmessage> <longmessage>$no_errors_dl_local_msg</longmessage> <longmessage>$no_errors_create_link_msg</longmessage> <longmessage> <code> http://jigsaw.w3.org/css-validator/validator?uri=http://www.w3.org or http://jigsaw.w3.org/css-validator/check/referer </code> ($no_errors_forHTML_only_msg) </longmessage> <longmessage>($no_errors_bookmark_msg)</longmessage> <longmessage>$note_valide_html</longmessage> </info> </infolist> </informations> #end </result> </observationresponse> --- StyleSheetGenerator2.java DELETED --- --- NEW FILE: .cvsignore --- observer-response.xsd properties.zip Index: StyleReportFactory.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/css/StyleReportFactory.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- StyleReportFactory.java 12 Dec 2006 07:13:26 -0000 1.8 +++ StyleReportFactory.java 13 Jul 2007 13:32:19 -0000 1.9 @@ -9,37 +9,16 @@ public class StyleReportFactory { - /** - * Give back a "StyleReport" object based on various - * parameters, but mainly output" - */ - public static StyleReport getStyleReport(ApplContext ac, - String title, - StyleSheet style, - String document, - int warningLevel) { - if ((document == null) || (document.equals("html")) - || (document.equals("xhtml"))) { - return new StyleSheetGeneratorHTML2(ac, title, style, - "xhtml", // getting rid of duplicate templates - warningLevel); - } - if (document.equals("soap12")) { - return new StyleReportSOAP12(ac, title, style, - document, - warningLevel); - } - if(document.equals("text")) { - return new StyleSheetGenerator2(title, style, - document, - warningLevel); - } - if(document.equals("ucn")) { - return new StyleReportUCN(ac, title, style, document, warningLevel); + /** + * Give back a "StyleReport" object based on various parameters, but mainly + * output" + */ + public static StyleReport getStyleReport(ApplContext ac, String title, + StyleSheet style, String document, int warningLevel) { + if (document.equals("text")) + return new StyleSheetGenerator(title, style, document, warningLevel); + if (document.equals("soap12") || document.equals("ucn") || document.equals("xml")) + return new StyleSheetGeneratorHTML(ac, title, style, document, warningLevel); + return new StyleSheetGeneratorHTML(ac, title, style, "xhtml", warningLevel); } - return new StyleSheetGeneratorHTML2(ac, title, style, - "xhtml", - warningLevel); - } } - Index: NewStyleSheet.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/css/NewStyleSheet.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- NewStyleSheet.java 8 Aug 2005 13:18:04 -0000 1.4 +++ NewStyleSheet.java 13 Jul 2007 13:32:19 -0000 1.5 @@ -16,104 +16,113 @@ public class NewStyleSheet { - String uri; - String title; - private Errors errors; - private Warnings warnings; + String uri; + String title; + private Errors errors; + private Warnings warnings; - /** - * Add some errors to this style. - * - * @param errors Some errors. - */ - public void addErrors(Errors errors) { - if (errors.getErrorCount() != 0) { - getErrors().addErrors(errors); + /** + * Add some errors to this style. + * + * @param errors + * Some errors. + */ + public void addErrors(Errors errors) { + if (errors.getErrorCount() != 0) { + getErrors().addErrors(errors); + } } - } - /** - * Add some warnings to this style. - * - * @param warnings Some warnings. - */ - public void addWarnings(Warnings warnings) { - if (warnings.getWarningCount() != 0) - getWarnings().addWarnings(warnings); - } + /** + * Add some warnings to this style. + * + * @param warnings + * Some warnings. + */ + public void addWarnings(Warnings warnings) { + if (warnings.getWarningCount() != 0) + getWarnings().addWarnings(warnings); + } - /** - * Returns all errors. - */ - public final Errors getErrors() { - return errors; - } + /** + * Returns all errors. + */ + public final Errors getErrors() { + return errors; + } - /** - * Returns all warnings. - */ - public final Warnings getWarnings() { - return warnings; - } + /** + * Returns all warnings. + */ + public final Warnings getWarnings() { + return warnings; + } - static Vector atRuleList = new Vector(); //contains all @rules (CssRuleLists) + static Vector atRuleList = new Vector(); // contains all @rules - public void newAtRule(AtRule atRule) { - CssRuleList rulelist = new CssRuleList(); - rulelist.addAtRule(atRule); - atRuleList.addElement(rulelist); - indent = " "; - } + // (CssRuleLists) - public void endOfAtRule() { - CssRuleList rulelist = new CssRuleList(); - atRuleList.addElement(rulelist); //for the new set of rules - pseudopage = ""; - important = false; - selectortext = ""; - indent = ""; - } + public void newAtRule(AtRule atRule) { + CssRuleList rulelist = new CssRuleList(); + rulelist.addAtRule(atRule); + atRuleList.addElement(rulelist); + indent = " "; + } - public void setImportant(boolean important) { - this.important = important; - } + public void endOfAtRule() { + CssRuleList rulelist = new CssRuleList(); + atRuleList.addElement(rulelist); // for the new set of rules + pseudopage = ""; + important = false; + selectortext = ""; + indent = ""; + } - public void setSelectorList(Vector selectors) { - String slave = selectors.toString(); - slave = slave.substring(slave.indexOf("[") + 1, slave.indexOf("]")); - selectortext = slave; - } + public void setImportant(boolean important) { + this.important = important; + } - public void setProperty(Vector properties) { - this.properties = properties; - } + public void setSelectorList(Vector selectors) { + String slave = selectors.toString(); + slave = slave.substring(slave.indexOf("[") + 1, slave.indexOf("]")); + selectortext = slave; + } - public void endOfRule() { - CssStyleRule stylerule = new CssStyleRule(indent, selectortext, - properties, important); - CssRuleList rulelist; - if (!atRuleList.isEmpty()) { - rulelist = (CssRuleList)atRuleList.lastElement(); - useless = atRuleList.removeElement(rulelist); - } else { - rulelist = new CssRuleList(); + public void setProperty(Vector properties) { + this.properties = properties; } - rulelist.addStyleRule(stylerule); - atRuleList.addElement(rulelist); - } - public void pseudoPage(String name) { - pseudopage = name; - } + public void endOfRule() { + CssStyleRule stylerule = new CssStyleRule(indent, selectortext, + properties, important); + CssRuleList rulelist; + if (!atRuleList.isEmpty()) { + rulelist = (CssRuleList) atRuleList.lastElement(); + useless = atRuleList.removeElement(rulelist); + } else { + rulelist = new CssRuleList(); + } + rulelist.addStyleRule(stylerule); + atRuleList.addElement(rulelist); + } - public Vector getRules() { - return atRuleList; - } + public void pseudoPage(String name) { + pseudopage = name; + } - static String pseudopage; - static String selectortext; - static boolean important; - static Vector properties; - boolean useless; - static String indent = new String(); + public Vector getRules() { + return atRuleList; + } + + static String pseudopage; + + static String selectortext; + + static boolean important; + + static Vector properties; + + boolean useless; + + static String indent = new String(); } --- xhtml.properties.es DELETED --- --- xhtml.properties.en DELETED --- Index: format.properties =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/css/format.properties,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- format.properties 15 Dec 2006 02:09:31 -0000 1.7 +++ format.properties 13 Jul 2007 13:32:19 -0000 1.8 @@ -1,21 +1,7 @@ -# Available output format for the StyleSheetGenerator +# Available output format for the StyleSheetGeneratorHTML & StyleSheetGenerator(text) -# be careful, errors and warnings are not yet implemented -xhtml: xhtml.properties.en -xhtml.zh-cn: xhtml.properties.zh-cn -xhtml.zh: xhtml.properties.zh-cn -xhtml.en: xhtml.properties.en -xhtml.ja: xhtml.properties.ja -xhtml.fr: xhtml.properties.fr -xhtml.es: xhtml.properties.es -xhtml.de: xhtml.properties.de -xhtml.nl: xhtml.properties.nl -xhtml.pl: xhtml.properties.pl-PL -xhtml.pl-PL: xhtml.properties.pl-PL -xhtml.it: xhtml.properties.it +xhtml: xhtml.properties xml: xml.properties text: text.properties -soap12.en: soap12.properties.en -soap12: soap12.properties.en -ucn.en: ucn.properties.en -ucn: ucn.properties.en \ No newline at end of file +soap12: soap12.properties +ucn: ucn.properties \ No newline at end of file --- xhtml.properties.zh-cn DELETED --- --- StyleReportSOAP12.java DELETED --- Index: StyleSheet.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/css/StyleSheet.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- StyleSheet.java 16 Dec 2006 20:22:27 -0000 1.12 +++ StyleSheet.java 13 Jul 2007 13:32:19 -0000 1.13 @@ -178,7 +178,7 @@ } /** - * Returns the uniq context for a context + * Returns the unique context for a context * * @param selector the context to find. */ --- StyleReportUCN.java DELETED --- --- xhtml.properties.it DELETED --- --- NEW FILE: xhtml.properties --- <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'> <head> <meta name="ROBOTS" content="NOINDEX, NOFOLLOW" /> <title>$W3C_validator_results $file_title</title> <link href="http://jigsaw.w3.org/css-validator/" rel="validator" /> <link type="text/css" rel='stylesheet' href='style/base.css' /> <link type="text/css" rel='stylesheet' href='style/results.css' /> </head> <body> #if ( $link ) <ul id="lang_choice"> #foreach ( $language in $languages ) #set ( $name = $language.get("name") ) #if ( $language.get("real") ) #set ( $real = $language.get("real") ) #else #set ( $real = $language.get("name") ) #end <li><a href="$link&lang=$name" lang="$name" xml:lang="$name" hreflang="$name" rel="alternate">$real</a> </li> #end </ul> #end <div id="banner"> <h1 id="title"> <a href="http://www.w3.org/"> <img height="48" alt="W3C" id="logo" src="http://www.w3.org/Icons/WWW/w3c_home_nb" /> </a> <a href="./"> <img src="images/css_validation_service.png" alt="$CSS_validation_service" /> </a> </h1> </div> <p id="tagline"></p> <ul class="navbar" id="jumpbar"> <li><strong>$jump_to:</strong></li> #if ($errors_count > 0) <li><a href="#errors">$errors ($errors_count)</a></li> #end #if ($warnings_count > 0) <li><a href="#warnings">$warnings ($warnings_count)</a></li> #end <li><a href="#css">$validated_CSS</a></li> </ul> <h2>$W3C_validator_results <a href="$file_title">$file_title</a></h2> #if ( !$no_errors_report ) #if ($errors_count == 0) <!-- NO ERRORS --> <div id='congrats'> <h3>$congrats</h3> <p> <a style="float: right" href="http://jigsaw.w3.org/css-validator/"> <img src="http://jigsaw.w3.org/css-validator/images/vcss" alt="$valid_CSS" /> </a> $doc_validates </p> <p> $no_errors_interoperable_msg </p> <pre class='example'> <p> <a href="http://jigsaw.w3.org/css-validator/"> <img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="$valid_CSS" /> </a> </p> </pre> <p>($no_errors_close_tags_msg)</p> <p> $no_errors_dl_local_msg </p> <p> $no_errors_create_link_msg </p> <pre> http://jigsaw.w3.org/css-validator/validator?uri=$file_title or http://jigsaw.w3.org/css-validator/check/referer ($no_errors_forHTML_only_msg) </pre> <p>($no_errors_bookmark_msg)</p> </div> <p class="backtop"><a href="#banner">↑ $top</a></p> #else <!-- DEALING WITH ERRORS --> #if ( $hook_html_validator ) $hook_html_validator #end #set ( $sf = "" ) #set ( $open = false ) <div id="errors"> <h3>$errors_sorry_msg ($errors_count)</h3> #if ( $request ) <h4>$request</h4> #end <div class='error-section-all'> #foreach ( $error_content in $errors_content ) #set ( $err = $error_content.get("Error") ) #set ( $error_msg = $error_content.get("ErrorMsg") ) #set ( $context_name = $error_content.get("CtxName") ) #set ( $context_msg = $error_content.get("CtxMsg") ) #set ( $class_name = $error_content.get("ClassName") ) #if ( $sf != $err.SourceFile ) #if ( $open ) </table> <!--end of individual error section--> </div> #end #set ( $sf = $err.SourceFile ) <div class='error-section'> <h4>URI : <a href="$sf">$sf</a></h4> <table> #set ( $open = true ) #end <tr class='error'> <td class='linenumber' title='Line $err.Line'>$err.Line</td> <td class='$context_name'>#if ( $context_msg ) $context_msg #end</td> <td class='$class_name'>$error_msg</td> </tr> #end #if ( $open ) </table> </div> #end </div> </div> <p class="backtop"><a href="#banner">↑ $top</a></p> #end #end #if ($warnings_count > 0) <!-- DEALING WITH WARNINGS --> <div id="warnings"> <h3>$warnings ($warnings_count)</h3> <div class='warning-section-all'> #set ( $sf = "" ) #set ( $open = false ) #foreach ( $warning in $warnings_list ) #if ( $sf != $warning.SourceFile ) #if ( $open ) </table> <!--end of individual warning section--> </div> #end #set ( $sf = $warning.SourceFile ) <div class='warning-section'> <h4>URI : <a href="$sf">$sf</a></h4> <table> #set ( $open = true ) #end #if ( $warning.Level <= $warning_level ) <tr class='warning'> <td class='linenumber' title='Line $warning.Line'>$warning.Line</td> <td class='codeContext'>#if ( $warning.Context ) $warning.Context #end</td> <td class='level$warning.Level' title='warning level $warning.Level'>$warning.WarningMessage</td> </tr> #end #end #if ( $open ) </table> </div> #end </div> </div> <p class="backtop"><a href="#banner">↑ $top</a></p> #end <div id="css"> #if ($rules_count > 0 && $rules_list && $rules_list != "") <h3>$valid_CSS_info</h3> <div class='vAtRule'> #if ($style_charset) <div class='vCharset'>@charset "$charset";</div> #end $rules_list </div> #else <h2>$CSS_not_found</h2> #end </div> <p class="backtop"><a href="#banner">↑ $top</a></p> <ul class="navbar" id="menu"> <li><strong><a href="./" title="$home_title">$home</a></strong> <span class="hideme">|</span></li> <li><a href="about.html" title="$about_title">$about</a> <span class="hideme">|</span></li> <li><a href="documentation.html" title="$doc_title">$doc</a> <span class="hideme">|</span></li> <li><a href="DOWNLOAD.html" title="$dl_title">$dl</a> <span class="hideme">|</span></li> <li><a href="Email.html" title="$feedback_title">$feedback</a> <span class="hideme">|</span></li> <li><a href="thanks.html" title="$credits_title">$credits</a></li> </ul> <p id="activity_logos"> <a href="http://www.w3.org/QA/" title="$W3C_quality_msg"><img src="http://www.w3.org/QA/2002/12/qa-small.png" alt="QA" /></a><a href="http://www.w3.org/Style/CSS/learning" title="$learn_more_msg"><img src="images/woolly-icon" alt="CSS" /></a> </p> <p id="support_logo"> $support<br /> <a href="http://www.w3.org/Consortium/supporters"> <img src="http://www.w3.org/Consortium/supporter-logos/csupporter.png" alt="$supporter" /> </a> </p> <p class="copyright"> <a rel="Copyright" href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 1994-2007 <a href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a>® (<a href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>, <a href="http://www.ercim.org/"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>, <a href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a>, <a rel="Copyright" href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> and <a rel="Copyright" href="http://www.w3.org/Consortium/Legal/copyright-software">software licensing</a> rules apply. Your interactions with this site are in accordance with our <a href="http://www.w3.org/Consortium/Legal/privacy-statement#Public">public</a> and <a href="http://www.w3.org/Consortium/Legal/privacy-statement#Members">Member</a> privacy statements. </p> </body> </html> Index: CssRuleList.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/css/CssRuleList.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- CssRuleList.java 12 Dec 2006 04:36:17 -0000 1.14 +++ CssRuleList.java 13 Jul 2007 13:32:19 -0000 1.15 @@ -5,7 +5,6 @@ package org.w3c.css.css; -import java.io.PrintWriter; import java.util.Vector; import org.w3c.css.parser.AtRule; @@ -13,142 +12,115 @@ public class CssRuleList { - AtRule atRule; - String atRuleString; - Vector rulelist; - public String pseudopage; - String indent; - - public CssRuleList() { - atRule = null; - atRuleString = new String(); - rulelist = new Vector(); - String pseudopage = new String(); - indent = new String(); - } - - public void addStyleRule(CssStyleRule stylerule) { - rulelist.addElement(stylerule); - } - - public Vector getStyleRules() { - return rulelist; - } - - public void addAtRule(AtRule atRule) { - this.atRule = atRule; - atRuleString = atRule.toString(); - } + AtRule atRule; + String atRuleString; + Vector rulelist; + public String pseudopage; + String indent; - public String getAtRule() { - return atRuleString; - } + public CssRuleList() { + atRule = null; + atRuleString = new String(); + rulelist = new Vector(); + indent = new String(); + } - public String toString() { - StringBuffer ret = new StringBuffer(); - if (null != atRule && atRule.isEmpty()) { - if (!atRuleString.equals("")) { - ret.append(atRuleString); - ret.append("\n\n"); - } - } else { - if (!atRuleString.equals("")) { - ret.append(atRuleString); - ret.append(" {\n\n"); - } - for (int i = 0; i < rulelist.size() ; i++ ) { - ret.append((CssStyleRule)rulelist.elementAt(i)); - } + public void addStyleRule(CssStyleRule stylerule) { + rulelist.addElement(stylerule); + } - if (!atRuleString.equals("")) { - ret.append("}\n"); - } + public Vector getStyleRules() { + return rulelist; } - return ret.toString(); - } - -/* public String toString() { - StringBuffer ret = new StringBuffer(); - if (atRule == null || atRule.isEmpty()) { - if (null != atRule && !atRuleString.equals("")) { - ret.append(atRuleString); - ret.append(' '); - ret.append('\n'); - } - } else { - if (!atRuleString.equals("")) { - ret.append(atRuleString); - ret.append(' '); - ret.append('{'); - ret.append('\n'); - indent = " "; - } - for (int i = 0; i < rulelist.size() ; i++ ) { - ret.append(indent); - ret.append(((CssStyleRule)rulelist.elementAt(i)).toString()); - } + public void addAtRule(AtRule atRule) { + this.atRule = atRule; + atRuleString = atRule.toString(); + } - if (!atRuleString.equals("")) { - ret.append('}'); - ret.append('\n'); - } + public String getAtRule() { + return atRuleString; } - return ret.toString(); - }*/ - /* public String toHTML() { - StringBuffer ret = new StringBuffer(); + public String toString() { + StringBuffer ret = new StringBuffer(); + if (null != atRule && atRule.isEmpty()) { + if (!atRuleString.equals("")) { + ret.append(atRuleString); + ret.append("\n\n"); + } + } else { + if (!atRuleString.equals("")) { + ret.append(atRuleString); + ret.append(" {\n\n"); + } + for (int i = 0; i < rulelist.size(); i++) { + ret.append((CssStyleRule) rulelist.elementAt(i)); + } - if (null != atRule && atRule.isEmpty()) { - if (!atRuleString.equals("")) { - ret.append("<li><span class='atSelector'>"); - ret.append(atRuleString); - ret.append("</span></li> \n\n"); - } - } else { - if (!atRuleString.equals("")) { - ret.append("<li><span class='atSelector'>"); - ret.append(atRuleString); - ret.append("</span> {\n<ul>\n"); - } - for (int i = 0; i < rulelist.size() ; i++ ) { - ret.append(((CssStyleRule)rulelist.elementAt(i)).toHTML()); - } + if (!atRuleString.equals("")) { + ret.append("}\n"); + } + } + return ret.toString(); + } - if (!atRuleString.equals("")) { - ret.append("</ul>}</li>\n"); - } - } - return ret.toString(); - } - */ - public void toHTML(PrintWriter out) { - if (null != atRule && atRule.isEmpty()) { - if (!atRuleString.equals("")) { - out.print("<div class='atRule'><span class='atSelector'>"); - out.print(Util.escapeHTML(atRuleString)); - out.print("</span></div> \n\n"); - } - } else { - if (!atRuleString.equals("")) { - out.print("<div class='atRule'><span class='atSelector'>"); - out.print(Util.escapeHTML(atRuleString)); - out.print("</span> {\n<div>\n"); - } - for (int i = 0; i < rulelist.size() ; i++ ) { - ((CssStyleRule)rulelist.elementAt(i)).toHTML(out); - } + /* + * public String toString() { StringBuffer ret = new StringBuffer(); + * + * if (atRule == null || atRule.isEmpty()) { if (null != atRule && + * !atRuleString.equals("")) { ret.append(atRuleString); ret.append(' '); + * ret.append('\n'); } } else { if (!atRuleString.equals("")) { + * ret.append(atRuleString); ret.append(' '); ret.append('{'); + * ret.append('\n'); indent = " "; } for (int i = 0; i < rulelist.size() ; + * i++ ) { ret.append(indent); + * ret.append(((CssStyleRule)rulelist.elementAt(i)).toString()); } + * + * if (!atRuleString.equals("")) { ret.append('}'); ret.append('\n'); } } + * return ret.toString(); } + */ - if (!atRuleString.equals("")) { - out.print("</div>}</div>\n"); - } + /* + * public String toHTML() { StringBuffer ret = new StringBuffer(); + * + * if (null != atRule && atRule.isEmpty()) { if (!atRuleString.equals("")) { + * ret.append("<li><span class='atSelector'>"); ret.append(atRuleString); + * ret.append("</span></li> \n\n"); } } else { if + * (!atRuleString.equals("")) { ret.append("<li><span + * class='atSelector'>"); ret.append(atRuleString); ret.append("</span> {\n<ul>\n"); } + * for (int i = 0; i < rulelist.size() ; i++ ) { + * ret.append(((CssStyleRule)rulelist.elementAt(i)).toHTML()); } + * + * if (!atRuleString.equals("")) { ret.append("</ul>}</li>\n"); } } + * return ret.toString(); } + */ + public String toHTML() { + String ret = "\t\t\t\t\t"; + if (null != atRule && atRule.isEmpty()) { + if (!atRuleString.equals("")) { + ret += "<div class='atRule'><span class='atSelector'>"; + ret += Util.escapeHTML(atRuleString); + ret += "</span></div> \n\n"; + } + } else { + if (!atRuleString.equals("")) { + ret += "<div class='atRule'><span class='atSelector'>"; + ret += Util.escapeHTML(atRuleString); + ret += "</span> {\n\t\t\t\t\t\t<div>\n"; + } + for (int i = 0; i < rulelist.size(); i++) { + ret += ((CssStyleRule) rulelist.elementAt(i)).toHTML(); + } + if (!atRuleString.equals("")) { + ret += "\t\t\t\t\t\t</div>}\n\t\t\t\t\t</div>\n"; + } + } + return ret; } - } - public void clear() { - atRuleString = ""; - rulelist.removeAllElements(); - pseudopage = ""; - } + public void clear() { + atRuleString = ""; + rulelist.removeAllElements(); + pseudopage = ""; + } } --- soap12.properties.en DELETED --- Index: StyleReport.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/css/StyleReport.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- StyleReport.java 14 Sep 2005 15:14:17 -0000 1.3 +++ StyleReport.java 13 Jul 2007 13:32:19 -0000 1.4 @@ -10,7 +10,7 @@ public abstract class StyleReport { abstract public void print(PrintWriter out); - + abstract public void desactivateError(); } --- NEW FILE: soap12.properties --- <?xml version='1.0' encoding="$charset"?> <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> <env:Body> <m:cssvalidationresponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding" xmlns:m="http://www.w3.org/2005/07/css-validator"> <m:uri>$file_title</m:uri> <m:checkedby>http://jigsaw.w3.org/css-validator/</m:checkedby> <m:csslevel>$cssversion</m:csslevel> <m:date>$currentdate</m:date> <m:validity>$is_valid</m:validity> <m:result> #if ( $errors_count > 0 ) <m:errors xml:lang="$lang"> <m:errorcount>$errors_count</m:errorcount> #foreach ( $error_content in $errors_content ) #set ( $err = $error_content.get("Error") ) #set ( $error_msg = $error_content.get("ErrorMsg") ) #set ( $class_name = $error_content.get("ClassName") ) #if ( $sf != $err.SourceFile ) #if ( $open ) </m:errorlist> #end #set ( $sf = $err.SourceFile ) <m:errorlist> <m:uri>$sf</m:uri> #set ( $open = true ) #end <m:error> <m:line>$err.Line</m:line> <m:errortype>$class_name</m:errortype> <m:message>$error_msg</m:message> </m:error> #end #if ( $open ) </m:errorlist> #end </m:errors> #end #if ( $warnings_count > 0 ) <m:warnings xml:lang="$lang"> <m:warningcount>$warnings_count</m:warningcount> #set ( $sf = "" ) #set ( $open = false ) #foreach ( $warning in $warnings_list ) #if ( $sf != $warning.SourceFile ) #if ( $open ) </m:warninglist> #end #set ( $sf = $warning.SourceFile ) <m:warninglist> <m:uri>$sf</m:uri> #set ( $open = true ) #end #if ( $warning.Level <= $warning_level ) <m:warning> <m:line>$warning.Line</m:line> <m:level>$warning.Level</m:level> <m:message>$warning.WarningMessage</m:message> #if ( $warning.Context ) <m:context>$warning.Context</m:context> #end </m:warning> #end #end #if ( $open ) </m:warninglist> #end </m:warnings> #end </m:result> </m:cssvalidationresponse> </env:Body> </env:Envelope>Received on Friday, 13 July 2007 13:32:43 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:54:58 GMT