GNOME Bugzilla – Bug 329029
The --nsclean option is not working properly
Last modified: 2006-01-29 20:58:01 UTC
Please describe the problem: The --nsclean option should clean the namespace declaration but fails totaly on a very simple document: <moviedbns:moviedb xmlns:moviedbns="http://localhost/moviedb"> <moviedbns:movie> </moviedbns:movie> <ns0:movie xmlns:ns0="http://localhost/moviedb"> </ns0:movie> </moviedbns:moviedb> Andreas Steps to reproduce: 1. run xmllint -nsclean on the given document Actual results: I get the same document Expected results: I expect the ns0 namespace to "vanish" as it is redundant Does this happen every time? yes Other information:
The prefix is not the same so it won't get removed only completely identical declarations will get discarded. It is not a bug it is how the option is defined, and changing that behaviour would be a change of an existing long term parser API, that is not possible anyway. See nsPush() in parser.c Daniel
Hi, are you aware that this is wrong according to the xml spec? Namespaces are equal when the URI is equal which is the case for my example. As this should be fixed, at least for the next major release, I'm not sure wether I should reopen this bug, or open a new one with a proper description and subject? Andreas
I know that spec, I'm in the W3C XML Core Working Group which maintains it. I still stand on the fact that a lot of applications look at the prefixes, and that the way it's implemented cannot be changed without the risk of breaking a number of aplications. So my answer to your request of changing the NSCLEAN parser flag semantic is still no ! Daniel