X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=python%2Fxmltemplate.py;h=eb50625a600550b2e8bf38d992db0f8cf82366e1;hb=83e98596f1532628bff5d122735577d9615098e5;hp=94135251089c1df5e7ae3bf966be17b0e36d1a45;hpb=299dc26d42d1bde161e8bb4a4d1db50917fe24d0;p=xml-template diff --git a/python/xmltemplate.py b/python/xmltemplate.py index 9413525..eb50625 100644 --- a/python/xmltemplate.py +++ b/python/xmltemplate.py @@ -35,8 +35,8 @@ def process(node, obj, clean = True): attrs_to_remove = [] if not attrs is None: for i in range(attrs.length): - attr = attrs.item(0) - if attr.namespaceURI == "http://template.sesse.net/" or attr.name == "id": + attr = attrs.item(i) + if attr.namespaceURI == "http://template.sesse.net/" and attr.localName == "id": id = attr.value if clean: attrs_to_remove.append(attr.name)