From b8d8fa6472bdcdb76918dae57893910d411c8245 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Thu, 17 Jul 2014 09:41:21 +0400 Subject: [PATCH] Version 1.1.1: fix a bug in removing excessive namespaces (lxml) --- xml | 11 ++++++----- xml-ANNOUNCE | 12 +++--------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/xml b/xml index e8049dd..70df1c5 100755 --- a/xml +++ b/xml @@ -40,9 +40,9 @@ The VFS was inspired by a FUSE xmlfs: https://github.com/halhen/xmlfs """ -__version__ = "1.1.0" +__version__ = "1.1.1" __author__ = "Oleg Broytman " -__copyright__ = "Copyright (C) 2013 PhiloSoft Design" +__copyright__ = "Copyright (C) 2013, 2014 PhiloSoft Design" __license__ = "GPL" force_implementation = None # Can be None for default choice, @@ -327,9 +327,10 @@ if use_lxml: this_nsmap = node.nsmap parent = node.getparent() if parent is not None: - parents_nsmap = parent.nsmap - for key in parents_nsmap: - del this_nsmap[key] + parent_nsmap = parent.nsmap + for key in parent_nsmap: + if this_nsmap[key] == parent_nsmap[key]: + del this_nsmap[key] return this_nsmap def has_ns(self, node): diff --git a/xml-ANNOUNCE b/xml-ANNOUNCE index 50393e7..e80c4d3 100644 --- a/xml-ANNOUNCE +++ b/xml-ANNOUNCE @@ -5,6 +5,9 @@ WHAT IS IT View an XML file in Midnight Commander as a filesystem. +WHAT'S NEW in version 1.1.1 (2014-07-17) + Fix a bug in removing excessive namespaces (lxml). + WHAT'S NEW in version 1.1.0 (2013-11-26) Show comment(s) before the root element. @@ -12,15 +15,6 @@ WHAT'S NEW in version 1.0.0 (2013-11-23) With lxml.etree-based implementation show only child namespaces (calculated as combined namespaces minus parent's namespaces). -WHAT'S NEW in version 0.6.0 (2013-11-22) - Refactored _list() and attrs2text() to be completely generic. - -WHAT'S NEW in version 0.5.0 (2013-11-19) - Added lxml.etree-based implementation. - -WHAT'S NEW in version 0.4.0 (2013-11-19) - Added ElementTree-based implementation. - WHAT'S NEW in version 0.3.0 (2013-11-16) Initial release. Implementation based on minidom. -- 2.39.2