summaryrefslogtreecommitdiff
path: root/itstool.in
diff options
context:
space:
mode:
authorShaun McCance <shaunm@gnome.org>2012-09-20 19:58:18 -0400
committerShaun McCance <shaunm@gnome.org>2012-09-20 19:58:28 -0400
commit3a56e53c4cd157da0c5f21c18806047e6b64eddb (patch)
tree20d60d74b3f3da0cfc34a6ffead58623457a9d13 /itstool.in
parent70f6f5ef01dc03e624e47a341b146ac099be4ebd (diff)
parent5040a328ba73ec3dd119f013b9a12a2fdc99a6b9 (diff)
downloaditstool-3a56e53c4cd157da0c5f21c18806047e6b64eddb.tar.gz
Merge branch 'master' into its-2-0
Diffstat (limited to 'itstool.in')
-rwxr-xr-xitstool.in10
1 files changed, 8 insertions, 2 deletions
diff --git a/itstool.in b/itstool.in
index bc4ec58..cb724a9 100755
--- a/itstool.in
+++ b/itstool.in
@@ -216,7 +216,10 @@ class Message (object):
def add_start_tag (self, node):
if len(self._message) == 0 or not(isinstance(self._message[-1], basestring)):
self._message.append('')
- self._message[-1] += ('<%s' % node.name)
+ if node.ns() is not None and node.ns().name is not None:
+ self._message[-1] += ('<%s:%s' % (node.ns().name, node.name))
+ else:
+ self._message[-1] += ('<%s' % node.name)
for prop in xml_attr_iter(node):
name = prop.name
if prop.ns() is not None:
@@ -235,7 +238,10 @@ class Message (object):
if node.children is not None:
if len(self._message) == 0 or not(isinstance(self._message[-1], basestring)):
self._message.append('')
- self._message[-1] += (u'</%s>' % unicode(node.name, 'utf-8'))
+ if node.ns() is not None and node.ns().name is not None:
+ self._message[-1] += ('</%s:%s>' % (node.ns().name, node.name))
+ else:
+ self._message[-1] += ('</%s>' % node.name)
def is_empty (self):
return self._empty