Kaydet (Commit) 24a55a12 authored tarafından Miklos Vajna's avatar Miklos Vajna

writerfilter: fix namespace of CT_PictureLayer's r:embed

I just wanted to get rid of the duplicated xmlns:r attributes, but seems
model.xml had some inconsistency as well, that's how this refactoring
fixes a bug as a side effect.

Change-Id: I95d753253f03a001c68dbbac7c86740040a180fa
üst 8088aeab
......@@ -48,12 +48,6 @@ def parseNamespaces(fro):
sock.close()
def defaultNamespaceAliases():
return {
'xml': 'http://www.w3.org/XML/1998/namespace',
}
def check(model):
defines = [i.getAttribute("name") for i in model.getElementsByTagName("define")]
for reference in [i.getAttribute("name") for i in model.getElementsByTagName("ref")]:
......@@ -65,10 +59,12 @@ def check(model):
def preprocess(model):
for i in model.getElementsByTagName("namespace"):
modelNode = [i for i in model.childNodes if i.localName == "model"][0]
for i in modelNode.getElementsByTagName("namespace"):
grammarprefix = prefixForGrammar(i)
grammarNamespaceAliases = defaultNamespaceAliases()
grammarNamespaceAliases = {}
parseNamespaceAliases(modelNode, grammarNamespaceAliases)
grammar = i.getElementsByTagName("grammar")[0]
parseNamespaceAliases(grammar, grammarNamespaceAliases)
......
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