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 329029 - The --nsclean option is not working properly
The --nsclean option is not working properly
Status: RESOLVED NOTABUG
Product: libxml2
Classification: Platform
Component: general
2.6.x
Other All
: Normal minor
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2006-01-29 01:00 UTC by Andreas Pakulat
Modified: 2006-01-29 20:58 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12



Description Andreas Pakulat 2006-01-29 01:00:11 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:
Comment 1 Daniel Veillard 2006-01-29 09:05:10 UTC
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
Comment 2 Andreas Pakulat 2006-01-29 18:03:26 UTC
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
Comment 3 Daniel Veillard 2006-01-29 20:58:01 UTC
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