jycli 2004/02/23 07:57:27
Modified: java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
Log:
always use setAttributeNS() method and pass null as
its namespace for non-namespaced nodes
Thanks Joe Kesselman for pointing it out
Revision Changes Path
1.74 +3 -7
xml-xalan/java/src/org/apache/xalan/xsltc/runtime/BasisLibrary.java
Index: BasisLibrary.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/runtime/BasisLibrary.java,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -r1.73 -r1.74
--- BasisLibrary.java 20 Feb 2004 20:56:43 -0000 1.73
+++ BasisLibrary.java 23 Feb 2004 15:57:27 -0000 1.74
@@ -1125,12 +1125,8 @@
org.w3c.dom.NamedNodeMap attributes =
curr.getAttributes();
for (int k = 0; k < attributes.getLength(); k++) {
org.w3c.dom.Node attr = attributes.item(k);
- String attrURI = attr.getNamespaceURI();
- if (null != attr && attrURI != Constants.XMLNS_URI)
- element.setAttributeNS(attrURI,
- attr.getNodeName(),
attr.getNodeValue());
- else element.setAttribute(attr.getNodeName(),
- attr.getNodeValue());
+ element.setAttributeNS(attr.getNamespaceURI(),
+ attr.getNodeName(), attr.getNodeValue());
}
}
copyNodes(curr.getChildNodes(), doc, element);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]