You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Victor M. Moreno" <vm...@germinus.com> on 2001/10/02 16:30:36 UTC
xmlns:xml attribute
Hello,
I have developed a xsl extension that returns a NodeSet.
This NodeSet is: <img src="whatever" />
I am building this NodeSet with the following source code.
The problem is that I am getting the following:
<img xmlns:xml="http://www.w3.org/XML/1998/namespace"
src="http://appserver3:8004/Empresa01/20000007"/>
I do not know with the attribute "xmlns:xml" appears;
I have tried with: elemento.removeAttribute("xmlns:xml") without success.
Anyone know how I can get rid of this attribute?
Thanks
Victor
NodeSet inter= new NodeSet();
Node res = null;
Element elemento;
DocumentBuilderFactory docBF = DocumentBuilderFactory.newInstance();
DocumentBuilder docB = docBF.newDocumentBuilder();
Document document = docB.newDocument();
elemento = document.createElement("img");
elemento.setAttribute("src",enlace);
//elemento.removeAttribute("xmlns");
res = elemento;
inter.addNode(res);