Skip to content

armgit / nutch

Public Imported from GitHub
0

Apache Nutch is an extensible and scalable web crawler

NUTCH-1253 Incompatable versions of neko and xerces

Lewis John McGibbney432e20eff363
diff --git a/CHANGES.txt b/CHANGES.txt
index 98193138c..75193a060 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -2,6 +2,8 @@ Nutch Change Log
Nutch Development Trunk
+* NUTCH-1253 Incompatable neko and xerces versions (snagel, lewismc)
+
* NUTCH-1717 HostDB not to complain if filters/normalizers are disabled (markus)
* NUTCH-1715 RobotRulesParser adds additional '*' to the robots name (tejasp)
diff --git a/src/plugin/lib-nekohtml/ivy.xml b/src/plugin/lib-nekohtml/ivy.xml
index c35544c5c..ed70b8072 100644
--- a/src/plugin/lib-nekohtml/ivy.xml
+++ b/src/plugin/lib-nekohtml/ivy.xml
@@ -36,7 +36,7 @@
</publications>
<dependencies>
- <dependency org="nekohtml" name="nekohtml" rev="0.9.5" conf="*->master"/>
+ <dependency org="net.sourceforge.nekohtml" name="nekohtml" rev="1.9.19" conf="*->master"/>
</dependencies>
</ivy-module>
diff --git a/src/plugin/lib-nekohtml/plugin.xml b/src/plugin/lib-nekohtml/plugin.xml
index e650bc84c..513c9a748 100644
--- a/src/plugin/lib-nekohtml/plugin.xml
+++ b/src/plugin/lib-nekohtml/plugin.xml
@@ -16,20 +16,21 @@
limitations under the License.
-->
<!--
- ! NekoHTML is a simple HTML scanner and tag balancer.
- ! (http://people.apache.org/~andyc/neko/doc/html/index.html)
+ ! NekoHTML is a simple HTML scanner and tag balancer that enables
+ ! application programmers to parse HTML documents and access the
+ ! information using standard XML interfaces.
+ ! (http://sourceforge.net/projects/nekohtml/)
!
- ! Dowload : http://people.apache.org/~andyc/neko/doc/html/index.html
- ! License : http://people.apache.org/~andyc/neko/LICENSE
+ ! License : https://nekohtml.svn.sourceforge.net/svnroot/nekohtml/trunk/LICENSE.txt
!-->
<plugin
id="lib-nekohtml"
name="CyberNeko HTML Parser"
- version="1.9.11"
- provider-name="org.cyberneko">
+ version="1.9.19"
+ provider-name="net.sourceforge.nekohtml">
<runtime>
- <library name="nekohtml-0.9.5.jar">
+ <library name="nekohtml-1.9.19.jar">
<export name="*"/>
</library>
</runtime>
diff --git a/src/plugin/parse-html/src/java/org/apache/nutch/parse/html/HtmlParser.java b/src/plugin/parse-html/src/java/org/apache/nutch/parse/html/HtmlParser.java
index f3ddf0598..dbe79706f 100644
--- a/src/plugin/parse-html/src/java/org/apache/nutch/parse/html/HtmlParser.java
+++ b/src/plugin/parse-html/src/java/org/apache/nutch/parse/html/HtmlParser.java
@@ -228,6 +228,8 @@ public class HtmlParser implements Parser {
private DocumentFragment parseNeko(InputSource input) throws Exception {
DOMFragmentParser parser = new DOMFragmentParser();
try {
+ parser.setFeature("http://cyberneko.org/html/features/scanner/allow-selfclosing-iframe",
+ true);
parser.setFeature("http://cyberneko.org/html/features/augmentations",
true);
parser.setProperty("http://cyberneko.org/html/properties/default-encoding",
diff --git a/src/plugin/parse-html/src/test/org/apache/nutch/parse/html/TestDOMContentUtils.java b/src/plugin/parse-html/src/test/org/apache/nutch/parse/html/TestDOMContentUtils.java
index 97f8d19eb..ef3c49ae8 100644
--- a/src/plugin/parse-html/src/test/org/apache/nutch/parse/html/TestDOMContentUtils.java
+++ b/src/plugin/parse-html/src/test/org/apache/nutch/parse/html/TestDOMContentUtils.java
@@ -233,6 +233,11 @@ public class TestDOMContentUtils extends TestCase {
conf.setBoolean("parser.html.form.use_action", true);
utils = new DOMContentUtils(conf);
DOMFragmentParser parser= new DOMFragmentParser();
+ try {
+ parser.setFeature(
+ "http://cyberneko.org/html/features/scanner/allow-selfclosing-iframe",
+ true);
+ } catch (SAXException e) {}
for (int i= 0; i < testPages.length; i++) {
DocumentFragment node=
new HTMLDocumentImpl().createDocumentFragment();
diff --git a/src/plugin/parse-tika/src/test/org/apache/nutch/tika/TestDOMContentUtils.java b/src/plugin/parse-tika/src/test/org/apache/nutch/tika/TestDOMContentUtils.java
index 482a39699..373a1e4df 100644
--- a/src/plugin/parse-tika/src/test/org/apache/nutch/tika/TestDOMContentUtils.java
+++ b/src/plugin/parse-tika/src/test/org/apache/nutch/tika/TestDOMContentUtils.java
@@ -180,6 +180,9 @@ public class TestDOMContentUtils extends TestCase {
conf.setBoolean("parser.html.form.use_action", true);
utils = new DOMContentUtils(conf);
DOMFragmentParser parser = new DOMFragmentParser();
+ parser.setFeature(
+ "http://cyberneko.org/html/features/scanner/allow-selfclosing-iframe",
+ true);
for (int i = 0; i < testPages.length; i++) {
DocumentFragment node = new HTMLDocumentImpl().createDocumentFragment();
try {