[library-web] Remove DOCTYPE of remote documents, as it makes xsltproc fail, sometimes
- From: Frederic Peters <fpeters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [library-web] Remove DOCTYPE of remote documents, as it makes xsltproc fail, sometimes
- Date: Sat, 4 Dec 2010 16:27:44 +0000 (UTC)
commit ec940bce72c06e0ea533ccc4c0398e2125333055
Author: Frédéric Péters <fpeters 0d be>
Date: Sat Dec 4 17:26:13 2010 +0100
Remove DOCTYPE of remote documents, as it makes xsltproc fail, sometimes
src/document.py | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/src/document.py b/src/document.py
index 9402d5e..b3b709c 100644
--- a/src/document.py
+++ b/src/document.py
@@ -225,6 +225,7 @@ class RemoteDocument(Document):
parser = html5lib.HTMLParser()
doc = parser.parse(open(filename))
doc.childNodes[-1].attributes['xmlns'] = 'http://www.w3.org/1999/xhtml'
+ del doc.childNodes[:-1]
cmd = ['xsltproc', '--output', dst,
'--stringparam', 'libgo.originalhref', self.href[lang],
'--stringparam', 'libgo.channel', self.channel,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]