After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 329347 - remove redundant namespaces in serialization
remove redundant namespaces in serialization
Status: RESOLVED OBSOLETE
Product: libxml2
Classification: Platform
Component: general
2.6.x
Other All
: Normal enhancement
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2006-01-31 13:22 UTC by Andreas Pakulat
Modified: 2021-07-05 13:27 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement



Description Andreas Pakulat 2006-01-31 13:22:32 UTC
Hi, 
 
I'd like to have an option for the serializer so it removes redundant 
namespaces, based on the assumption that 2 namespaces are equal when their 
URI's are equal.  
 
Andreas
Comment 1 kbuchcik 2006-02-01 11:53:03 UTC
Since I'm monitoring the lxml mailing-list, I suppose the issue is related to extensive copy of nodes with xmlCopyNode() or xmlDocCopyNode() and the fact that those functions will add namespace declaration attributes to the copied element-node if a namespace binding is not is scope, resulting in many redundant ns-decls.

This issue might be a duplicate of bug #142880.
Comment 2 kbuchcik 2006-02-01 16:40:43 UTC
I just enhanced xmlDOMWrapReconcileNamespaces() in tree.c (revision 1.361) to remove redundant ns-decls if the option XML_DOM_RECONNS_REMOVEREDUND was given. Note that I haven't moved this option to the header file yet; so just call this function with an @option of 1 to test the behaviour.

I know this is not what you requested, but maybe you'll find it usefull for the redundant-ns-decls issue.
Comment 3 kbuchcik 2006-02-02 12:15:14 UTC
Fixed some bugs xmlDOMWrapReconcileNamespaces() wrt the previous addition of the removal of redundant ns-decls - tree.c, revision 1.362.
Performed some rudimental tests.
Comment 4 kbuchcik 2006-02-15 10:51:36 UTC
Whoops, sorry I changed the status of this bug by accident - it was intended for an other bug :-/
Comment 5 GNOME Infrastructure Team 2021-07-05 13:27:13 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/libxml2/-/issues/

Thank you for your understanding and your help.