Kaydet (Commit) 23b49f23 authored tarafından Miklos Vajna's avatar Miklos Vajna

writerfilter: fail on mistyped namespace URL's

And also fix one typo detected by this new check.

Change-Id: Iaa7a4bb0b6dc3f81e5dd0b352584029cfed4ffbb
üst 8957c941
...@@ -74,7 +74,7 @@ wps http://schemas.microsoft.com/office/word/2010/wordproces ...@@ -74,7 +74,7 @@ wps http://schemas.microsoft.com/office/word/2010/wordproces
wpg http://schemas.microsoft.com/office/word/2010/wordprocessingGroup wpg http://schemas.microsoft.com/office/word/2010/wordprocessingGroup
wp14 http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing wp14 http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing
w14 http://schemas.microsoft.com/office/word/2010/wordml w14 http://schemas.microsoft.com/office/word/2010/wordml
a14 http://schemas.microsoft.com/office/drawingml/2010/main a14 http://schemas.microsoft.com/office/drawing/2010/main
# extlst namespaces # extlst namespaces
......
...@@ -70,10 +70,7 @@ def check(model): ...@@ -70,10 +70,7 @@ def check(model):
def preprocess(model): def preprocess(model):
for i in model.getElementsByTagName("namespace-alias"): for i in model.getElementsByTagName("namespace-alias"):
name = i.getAttribute("name") name = i.getAttribute("name")
if name in list(ooxUrlIds.keys()): i.setAttribute("id", ooxUrlIds[name])
i.setAttribute("id", ooxUrlIds[name])
else:
i.setAttribute("id", ooxAliasIds[i.getAttribute("alias")])
namespaceAliases[name] = i.getAttribute("alias") namespaceAliases[name] = i.getAttribute("alias")
for i in model.getElementsByTagName("namespace"): for i in model.getElementsByTagName("namespace"):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment