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
This commit is contained in:
parent
ff06ec3aa2
commit
9c0de6834d
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user