diff --git a/pom.xml b/pom.xml
index 41f46725..0f6fc425 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,7 +25,7 @@
nu.validator.htmlparser
htmlparser
bundle
- 1.4
+ 1.5
htmlparser
http://about.validator.nu/htmlparser/
The Validator.nu HTML Parser is an implementation of the HTML5 parsing algorithm in Java for applications. The parser is designed to work as a drop-in replacement for the XML parser in applications that already support XHTML 1.x content with an XML parser and use SAX, DOM or XOM to interface with the parser.
@@ -69,8 +69,8 @@
- scm:hg:http://hg.mozilla.org/projects/htmlparser/
- http://hg.mozilla.org/projects/htmlparser/
+ scm:git:https://github.com/validator/htmlparser.git
+ https://github.com/validator/htmlparser
${project.build.directory}/src
@@ -80,22 +80,13 @@
org.apache.maven.plugins
maven-compiler-plugin
- 1.5
- 1.5
+ 1.7
+ 1.7
maven-antrun-plugin
1.7
-
-
- com.sun
- tools
- 1.5.0
- system
- ${java.home}/../lib/tools.jar
-
-
intitialize-sources
@@ -121,6 +112,7 @@
+
@@ -157,7 +149,8 @@
${project.name}
nu.validator.htmlparser
${project.version}
- J2SE-1.5
+ JavaSE-1.7
+ nu.validator.htmlparser
<_removeheaders>Built-By,Bnd-LastModified
@@ -214,7 +207,7 @@
xom
xom
- 1.1
+ [1.3.5,)
compile
true
diff --git a/src/nu/validator/htmlparser/common/DoctypeExpectation.java b/src/nu/validator/htmlparser/common/DoctypeExpectation.java
index a34af51f..31f69ba7 100644
--- a/src/nu/validator/htmlparser/common/DoctypeExpectation.java
+++ b/src/nu/validator/htmlparser/common/DoctypeExpectation.java
@@ -28,6 +28,7 @@
* @version $Id$
* @author hsivonen
*/
+@Deprecated
public enum DoctypeExpectation {
/**
* Be a pure HTML5 parser.
diff --git a/src/nu/validator/htmlparser/common/DocumentModeHandler.java b/src/nu/validator/htmlparser/common/DocumentModeHandler.java
index 55377e0e..6c301965 100644
--- a/src/nu/validator/htmlparser/common/DocumentModeHandler.java
+++ b/src/nu/validator/htmlparser/common/DocumentModeHandler.java
@@ -39,8 +39,10 @@ public interface DocumentModeHandler {
* @param mode the document mode
* @param publicIdentifier the public id of the doctype or null
if unavailable
* @param systemIdentifier the system id of the doctype or null
if unavailable
- * @param html4SpecificAdditionalErrorChecks true
if HTML 4-specific checks were enabled, false
otherwise
* @throws SAXException if things go wrong
*/
+ public void documentMode(DocumentMode mode, String publicIdentifier, String systemIdentifier) throws SAXException;
+
+ @Deprecated
public void documentMode(DocumentMode mode, String publicIdentifier, String systemIdentifier, boolean html4SpecificAdditionalErrorChecks) throws SAXException;
}
diff --git a/src/nu/validator/htmlparser/dom/DOMTreeBuilder.java b/src/nu/validator/htmlparser/dom/DOMTreeBuilder.java
index 2b8eff23..6ccf75a4 100644
--- a/src/nu/validator/htmlparser/dom/DOMTreeBuilder.java
+++ b/src/nu/validator/htmlparser/dom/DOMTreeBuilder.java
@@ -248,8 +248,15 @@ protected DOMTreeBuilder(DOMImplementation implementation) {
/**
*
* @see nu.validator.htmlparser.impl.TreeBuilder#documentMode(nu.validator.htmlparser.common.DocumentMode,
- * java.lang.String, java.lang.String, boolean)
+ * java.lang.String, java.lang.String)
*/
+ protected void documentMode(DocumentMode mode, String publicIdentifier,
+ String systemIdentifier)
+ throws SAXException {
+ document.setUserData("nu.validator.document-mode", mode, null);
+ }
+
+ @Deprecated
protected void documentMode(DocumentMode mode, String publicIdentifier,
String systemIdentifier, boolean html4SpecificAdditionalErrorChecks)
throws SAXException {
diff --git a/src/nu/validator/htmlparser/dom/HtmlDocumentBuilder.java b/src/nu/validator/htmlparser/dom/HtmlDocumentBuilder.java
index f4a307c9..f2619c05 100644
--- a/src/nu/validator/htmlparser/dom/HtmlDocumentBuilder.java
+++ b/src/nu/validator/htmlparser/dom/HtmlDocumentBuilder.java
@@ -462,6 +462,7 @@ public void setScriptingEnabled(boolean scriptingEnabled) {
*
* @return the doctypeExpectation
*/
+ @Deprecated
public DoctypeExpectation getDoctypeExpectation() {
return doctypeExpectation;
}
@@ -473,6 +474,7 @@ public DoctypeExpectation getDoctypeExpectation() {
* the doctypeExpectation to set
* @see nu.validator.htmlparser.impl.TreeBuilder#setDoctypeExpectation(nu.validator.htmlparser.common.DoctypeExpectation)
*/
+ @Deprecated
public void setDoctypeExpectation(DoctypeExpectation doctypeExpectation) {
this.doctypeExpectation = doctypeExpectation;
if (treeBuilder != null) {
@@ -526,6 +528,7 @@ public void setStreamabilityViolationPolicy(
* the name in the value.
* @param html4ModeCompatibleWithXhtml1Schemata
*/
+ @Deprecated
public void setHtml4ModeCompatibleWithXhtml1Schemata(
boolean html4ModeCompatibleWithXhtml1Schemata) {
this.html4ModeCompatibleWithXhtml1Schemata = html4ModeCompatibleWithXhtml1Schemata;
@@ -548,6 +551,7 @@ public Locator getDocumentLocator() {
*
* @return the html4ModeCompatibleWithXhtml1Schemata
*/
+ @Deprecated
public boolean isHtml4ModeCompatibleWithXhtml1Schemata() {
return html4ModeCompatibleWithXhtml1Schemata;
}
diff --git a/src/nu/validator/htmlparser/impl/Tokenizer.java b/src/nu/validator/htmlparser/impl/Tokenizer.java
index 45073f85..6bf71e86 100755
--- a/src/nu/validator/htmlparser/impl/Tokenizer.java
+++ b/src/nu/validator/htmlparser/impl/Tokenizer.java
@@ -748,6 +748,7 @@ public void setNamePolicy(XmlViolationPolicy namePolicy) {
* @param html4ModeCompatibleWithXhtml1Schemata
* the html4ModeCompatibleWithXhtml1Schemata to set
*/
+ @Deprecated
public void setHtml4ModeCompatibleWithXhtml1Schemata(
boolean html4ModeCompatibleWithXhtml1Schemata) {
this.html4ModeCompatibleWithXhtml1Schemata = html4ModeCompatibleWithXhtml1Schemata;
diff --git a/src/nu/validator/htmlparser/impl/TreeBuilder.java b/src/nu/validator/htmlparser/impl/TreeBuilder.java
index 02cc6409..13d9ecb3 100644
--- a/src/nu/validator/htmlparser/impl/TreeBuilder.java
+++ b/src/nu/validator/htmlparser/impl/TreeBuilder.java
@@ -6027,6 +6027,7 @@ public void setIsSrcdocDocument(boolean isSrcdocDocument) {
* @param doctypeExpectation
* the doctypeExpectation to set
*/
+ @Deprecated
public void setDoctypeExpectation(DoctypeExpectation doctypeExpectation) {
this.doctypeExpectation = doctypeExpectation;
}
diff --git a/src/nu/validator/htmlparser/io/Driver.java b/src/nu/validator/htmlparser/io/Driver.java
index d685e69d..e4d6931b 100644
--- a/src/nu/validator/htmlparser/io/Driver.java
+++ b/src/nu/validator/htmlparser/io/Driver.java
@@ -558,6 +558,7 @@ public void setTransitionHandler(TransitionHandler transitionHandler) {
* @param html4ModeCompatibleWithXhtml1Schemata
* @see nu.validator.htmlparser.impl.Tokenizer#setHtml4ModeCompatibleWithXhtml1Schemata(boolean)
*/
+ @Deprecated
public void setHtml4ModeCompatibleWithXhtml1Schemata(
boolean html4ModeCompatibleWithXhtml1Schemata) {
tokenizer.setHtml4ModeCompatibleWithXhtml1Schemata(html4ModeCompatibleWithXhtml1Schemata);
diff --git a/src/nu/validator/htmlparser/sax/HtmlParser.java b/src/nu/validator/htmlparser/sax/HtmlParser.java
index 714053e7..8eddd601 100644
--- a/src/nu/validator/htmlparser/sax/HtmlParser.java
+++ b/src/nu/validator/htmlparser/sax/HtmlParser.java
@@ -817,6 +817,7 @@ public void setScriptingEnabled(boolean scriptingEnabled) {
*
* @return the doctypeExpectation
*/
+ @Deprecated
public DoctypeExpectation getDoctypeExpectation() {
return doctypeExpectation;
}
@@ -828,6 +829,7 @@ public DoctypeExpectation getDoctypeExpectation() {
* the doctypeExpectation to set
* @see nu.validator.htmlparser.impl.TreeBuilder#setDoctypeExpectation(nu.validator.htmlparser.common.DoctypeExpectation)
*/
+ @Deprecated
public void setDoctypeExpectation(DoctypeExpectation doctypeExpectation) {
this.doctypeExpectation = doctypeExpectation;
if (treeBuilder != null) {
@@ -881,6 +883,7 @@ public void setStreamabilityViolationPolicy(
* the name in the value.
* @param html4ModeCompatibleWithXhtml1Schemata
*/
+ @Deprecated
public void setHtml4ModeCompatibleWithXhtml1Schemata(
boolean html4ModeCompatibleWithXhtml1Schemata) {
this.html4ModeCompatibleWithXhtml1Schemata = html4ModeCompatibleWithXhtml1Schemata;
@@ -903,6 +906,7 @@ public Locator getDocumentLocator() {
*
* @return the html4ModeCompatibleWithXhtml1Schemata
*/
+ @Deprecated
public boolean isHtml4ModeCompatibleWithXhtml1Schemata() {
return html4ModeCompatibleWithXhtml1Schemata;
}
diff --git a/src/nu/validator/htmlparser/xom/HtmlBuilder.java b/src/nu/validator/htmlparser/xom/HtmlBuilder.java
index 845ea15c..7c0d0834 100644
--- a/src/nu/validator/htmlparser/xom/HtmlBuilder.java
+++ b/src/nu/validator/htmlparser/xom/HtmlBuilder.java
@@ -499,6 +499,7 @@ public void setScriptingEnabled(boolean scriptingEnabled) {
*
* @return the doctypeExpectation
*/
+ @Deprecated
public DoctypeExpectation getDoctypeExpectation() {
return doctypeExpectation;
}
@@ -510,6 +511,7 @@ public DoctypeExpectation getDoctypeExpectation() {
* the doctypeExpectation to set
* @see nu.validator.htmlparser.impl.TreeBuilder#setDoctypeExpectation(nu.validator.htmlparser.common.DoctypeExpectation)
*/
+ @Deprecated
public void setDoctypeExpectation(DoctypeExpectation doctypeExpectation) {
this.doctypeExpectation = doctypeExpectation;
if (treeBuilder != null) {
@@ -563,6 +565,7 @@ public void setStreamabilityViolationPolicy(
* the name in the value.
* @param html4ModeCompatibleWithXhtml1Schemata
*/
+ @Deprecated
public void setHtml4ModeCompatibleWithXhtml1Schemata(
boolean html4ModeCompatibleWithXhtml1Schemata) {
this.html4ModeCompatibleWithXhtml1Schemata = html4ModeCompatibleWithXhtml1Schemata;
@@ -585,6 +588,7 @@ public Locator getDocumentLocator() {
*
* @return the html4ModeCompatibleWithXhtml1Schemata
*/
+ @Deprecated
public boolean isHtml4ModeCompatibleWithXhtml1Schemata() {
return html4ModeCompatibleWithXhtml1Schemata;
}
diff --git a/src/nu/validator/htmlparser/xom/XOMTreeBuilder.java b/src/nu/validator/htmlparser/xom/XOMTreeBuilder.java
index 623f3192..e10cb863 100644
--- a/src/nu/validator/htmlparser/xom/XOMTreeBuilder.java
+++ b/src/nu/validator/htmlparser/xom/XOMTreeBuilder.java
@@ -254,9 +254,19 @@ protected void start(boolean fragment) throws SAXException {
/**
* @see nu.validator.htmlparser.impl.TreeBuilder#documentMode(nu.validator.htmlparser.common.DocumentMode,
- * java.lang.String, java.lang.String, boolean)
+ * java.lang.String, java.lang.String)
*/
+ protected void documentMode(DocumentMode mode, String publicIdentifier,
+ String systemIdentifier)
+ throws SAXException {
+ if (document instanceof Mode) {
+ Mode modal = (Mode) document;
+ modal.setMode(mode);
+ }
+ }
+
@Override
+ @Deprecated
protected void documentMode(DocumentMode mode, String publicIdentifier,
String systemIdentifier, boolean html4SpecificAdditionalErrorChecks)
throws SAXException {