You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by mi...@apache.org on 2004/02/18 01:04:32 UTC
cvs commit: xml-xalan/java/src/org/apache/xml/utils DOMBuilder.java
minchau 2004/02/17 16:04:32
Modified: java/src/org/apache/xml/utils DOMBuilder.java
Log:
PR: bugzilla 15140
Submitted by: patch submitted by Bruno Dumon (bruno@outerthought.org)
Reviewed by: Brian Minchau (minchau@ca.ibm.com)
Revision Changes Path
1.17 +6 -1 xml-xalan/java/src/org/apache/xml/utils/DOMBuilder.java
Index: DOMBuilder.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xml/utils/DOMBuilder.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- DOMBuilder.java 17 Feb 2004 04:21:14 -0000 1.16
+++ DOMBuilder.java 18 Feb 2004 00:04:32 -0000 1.17
@@ -297,6 +297,11 @@
// +", qname: "+atts.getQName(i)+", value: "+atts.getValue(i));
// Crimson won't let us set an xmlns: attribute on the DOM.
String attrQName = atts.getQName(i);
+
+ // In SAX, xmlns: attributes have an empty namespace, while in DOM they should have the xmlns namespace
+ if (attrQName.startsWith("xmlns:"))
+ attrNS = "http://www.w3.org/2000/xmlns/";
+
// ALWAYS use the DOM Level 2 call!
elem.setAttributeNS(attrNS,attrQName, atts.getValue(i));
}
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org