jycli 2004/02/20 13:00:20
Modified: java/src/org/apache/xalan/xsltc/runtime Tag: xslt20-compiled
BasisLibrary.java
Log:
Fix for bugzilla bug report 26697
XSLTC supports convert a NodeList to an internal DOM iterator.
Use setAttributeNS method to copy attribute node when an attribute
has a prefix, which maps to a namespace URI
Reviewed by Morris Kwan ([EMAIL PROTECTED])
Revision Changes Path
No revision
No revision
1.61.4.5 +7 -3
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.61.4.4
retrieving revision 1.61.4.5
diff -u -r1.61.4.4 -r1.61.4.5
--- BasisLibrary.java 10 Feb 2004 22:40:34 -0000 1.61.4.4
+++ BasisLibrary.java 20 Feb 2004 21:00:20 -0000 1.61.4.5
@@ -1133,8 +1133,12 @@
org.w3c.dom.NamedNodeMap attributes =
curr.getAttributes();
for (int k = 0; k < attributes.getLength(); k++) {
org.w3c.dom.Node attr = attributes.item(k);
- element.setAttribute(attr.getNodeName(),
- attr.getNodeValue());
+ 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());
}
}
copyNodes(curr.getChildNodes(), doc, element);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]