You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-users@xml.apache.org by Barzilai Spinak <ba...@internet.com.uy> on 2003/06/10 11:44:28 UTC
Bug in removeAttributeNode(Attr) ??
I wrote a couple of functions to remove all the foreign attributes and
namespaces introduced when you do a xindice query.
(like xmlns:src="http://xml.apache.org/xindice/Query" and src:col and src:key)
Actually I wrote a very general function called:
removeAttributesUnderNS (Node n, String nsURI) that removes all attributes that
belong to a given namespace URI
and also adapted a function to remove unused namespaces:
(adapted from
http://wiki.cocoondev.org/attach?page=RemoveNamespaces/NamespaceStripperTransformer.java)
The problem I found was when using the Element.removeAttributeNode(Attr)
It did NOTHING so I had to use removeAttribute(anAttrib.getNodeName()) instead.
Doing it this way works perfectly.
I'm very new to XML processing with DOM but I found out that the Node's I'm
working with belong to org.apache.xindice.xml.dom which makes
sense since they were returned by a Xindice query so that's why I'm asking
in this list.
Then again, I may be doing something wrong but I don't think so.
The problem could be in NamedNodemapImpl...
I think the class was written by Vladimir (?)
BarZ
------------------------------------------------------
Internet en Uruguay es http://www.internet.com.uy