Created
March 8, 2012 08:23
-
-
Save sideshowbarker/1999640 to your computer and use it in GitHub Desktop.
patch for using validator.nu from the command-line
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r 6315b45b4827 log4j.properties | |
--- a/log4j.properties Wed Feb 08 01:27:21 2012 +0900 | |
+++ b/log4j.properties Thu Mar 08 17:25:26 2012 +0900 | |
@@ -1,4 +1,4 @@ | |
-log4j.rootLogger=DEBUG, A1 | |
+log4j.rootLogger=WARN, A1 | |
log4j.appender.A1=org.apache.log4j.ConsoleAppender | |
log4j.appender.A1.layout=org.apache.log4j.PatternLayout | |
diff -r 6315b45b4827 presets.txt | |
--- a/presets.txt Wed Feb 08 01:27:21 2012 +0900 | |
+++ b/presets.txt Thu Mar 08 17:25:26 2012 +0900 | |
@@ -1,9 +1,1 @@ | |
--1 - HTML5 + SVG 1.1 + MathML 2.0 http://s.validator.nu/html5.rnc http://s.validator.nu/html5/assertions.sch http://c.validator.nu/all/ | |
3 - HTML5 + SVG 1.1 + MathML 2.0 + RDFa Lite 1.1 http://s.validator.nu/html5-rdfalite.rnc http://s.validator.nu/html5/assertions.sch http://c.validator.nu/all/ | |
-2 - HTML 4.01 Strict + IRI / XHTML 1.0 Strict + IRI http://s.validator.nu/xhtml10/xhtml-strict.rnc http://s.validator.nu/xhtml10/xhtml.sch http://c.validator.nu/all-html4/ | |
-1 - HTML 4.01 Transitional + IRI / XHTML 1.0 Transitional + IRI http://s.validator.nu/xhtml10/xhtml-transitional.rnc http://s.validator.nu/xhtml10/xhtml.sch http://c.validator.nu/all-html4/ | |
--1 - HTML 4.01 Frameset + IRI / XHTML 1.0 Frameset + IRI http://s.validator.nu/xhtml10/xhtml-frameset.rnc http://s.validator.nu/xhtml10/xhtml.sch http://c.validator.nu/all-html4/ | |
--1 http://www.w3.org/1999/xhtml XHTML5 + SVG 1.1 + MathML 2.0 http://s.validator.nu/xhtml5.rnc http://s.validator.nu/html5/assertions.sch http://c.validator.nu/all/ | |
-7 http://www.w3.org/1999/xhtml XHTML5 + SVG 1.1 + MathML 2.0 + RDFa Lite 1.1 http://s.validator.nu/xhtml5-rdfalite.rnc http://s.validator.nu/html5/assertions.sch http://c.validator.nu/all/ | |
--1 - XHTML 1.0 Strict + IRI + Ruby + SVG 1.1 + MathML 2.0 http://s.validator.nu/xhtml1-ruby-rdf-svg-mathml.rnc http://s.validator.nu/xhtml10/xhtml.sch http://c.validator.nu/all-html4/ | |
--1 http://www.w3.org/2000/svg SVG 1.1 + IRI + XHTML5 + MathML 2.0 http://s.validator.nu/svg-xhtml5-rdf-mathml.rnc http://s.validator.nu/html5/assertions.sch http://c.validator.nu/all/ | |
diff -r 6315b45b4827 src/nu/validator/servlet/VerifierServletTransaction.java | |
--- a/src/nu/validator/servlet/VerifierServletTransaction.java Wed Feb 08 01:27:21 2012 +0900 | |
+++ b/src/nu/validator/servlet/VerifierServletTransaction.java Thu Mar 08 17:25:26 2012 +0900 | |
@@ -491,12 +491,6 @@ | |
i++; | |
} | |
- log4j.debug("Reading spec."); | |
- | |
- html5spec = Html5SpecBuilder.parseSpec(LocalCacheEntityResolver.getHtml5SpecAsStream()); | |
- | |
- log4j.debug("Spec read."); | |
- | |
log4j.debug("Initialization complete."); | |
} catch (Exception e) { | |
throw new RuntimeException(e); | |
@@ -1224,18 +1218,6 @@ | |
return null; | |
} | |
loadedValidatorUrls.add(url); | |
- if ("http://s.validator.nu/xhtml5.rnc".equals(url) | |
- || "http://s.validator.nu/html5.rnc".equals(url) | |
- || "http://s.validator.nu/xhtml5-rdfalite.rnc".equals(url) | |
- || "http://s.validator.nu/html5-rdfalite.rnc".equals(url) | |
- || "http://s.validator.nu/w3c-xhtml5.rnc".equals(url) | |
- || "http://s.validator.nu/w3c-xhtml5-microdata-rdfalite.rnc".equals(url) | |
- || "http://s.validator.nu/w3c-xhtml5-microdata-rdfa.rnc".equals(url) | |
- || "http://s.validator.nu/w3c-html5.rnc".equals(url) | |
- || "http://s.validator.nu/w3c-html5-microdata-rdfalite.rnc".equals(url) | |
- || "http://s.validator.nu/w3c-html5-microdata-rdfa.rnc".equals(url)) { | |
- errorHandler.setSpec(html5spec); | |
- } | |
Schema sch = resolveSchema(url, jingPropertyMap); | |
Validator validator = sch.createValidator(jingPropertyMap); | |
if (validator.getContentHandler() instanceof XmlPiChecker) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment