DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15983>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15983

Union of Namespaces not working correctly

[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From [EMAIL PROTECTED]  2003-01-14 01:19 -------
Yup, you're right -- there are some bugs here.  Interestingly, it looks like 
some other work I did exposed this problem, since we've always collected 
the "namespace" nodes that way.

This really exposes one of the dirty little secret about using the DOM data 
model instead of the XPath one.  With your patch, we still have the problem of 
weeding out namespace nodes that have been redeclared.  I say we just do a 
serial search of the list and take the performance hit.  I don't think the 
namespace axis is that heavily used.  If it becomes a problem, we can figure 
out some way to put them in a lookup table.  We already do something like this 
in XSLTEngineImpl::copyNamespaceAttributes().

At any rate, I committed a slightly modified version of your patch.  Please let 
me know if it looks OK to you.  If so, why don't you open a new bug for the 
problem with redeclared namespace nodes, and I'll do a quick patch for that 
(unless you want to do it.)

Another bug I discovered is that we don't build the tree with namespace nodes 
ordered before attributes nodes.  I think we can fix this by going through the 
attribute list twice.  On the first pass, we'll create the attributes that are 
the namespace declarations, and on the second pass, we'll create the other 
attributes.  What do you think?

Reply via email to