From 9c0de6834d7f40d221eba700ffef57f45b91fd81 Mon Sep 17 00:00:00 2001 From: Christian Berendt Date: Thu, 3 Jul 2014 10:12:37 +0200 Subject: [PATCH] Do not set xlink namespace for links Because of 'xmlns:xlink="http://www.w3.org/1999/xlink"' in the headers of the XML files it is not necessary to set the xlink namespace for links. Change-Id: I1ab2e074dafcd0af352810e181193d27f9948f37 --- os_doc_tools/handle_pot.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/os_doc_tools/handle_pot.py b/os_doc_tools/handle_pot.py index 1f00ae8a..70abc2c5 100644 --- a/os_doc_tools/handle_pot.py +++ b/os_doc_tools/handle_pot.py @@ -148,12 +148,10 @@ def changeXMLLangSetting(xmlFile, language): root.setAttribute("xml:lang", language[:2]) fileObj = codecs.open(xmlFile, "wb", encoding="utf-8") - # add namespace to link nodelists = root.getElementsByTagName("link") for node in nodelists: if node.hasAttribute("href"): node.setAttribute("xlink:href", node.getAttribute("href")) - node.setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink") if node.hasAttribute("title"): node.setAttribute("xlink:title", node.getAttribute("title")) dom.writexml(fileObj)