You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by sa...@apache.org on 2004/03/24 00:04:42 UTC
cvs commit: xml-xalan/java/src/org/apache/xml/utils DOMBuilder.java
santiagopg 2004/03/23 15:04:41
Modified: java/src/org/apache/xml/utils DOMBuilder.java
Log:
The xmlns URI should also be used to add NS decls as attributes to a DOM. However, this was only done for attributes that started with 'xmlns:' and not for 'xmlns' (i.e. not for decls of the default NS).
Revision Changes Path
1.20 +5 -3 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.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- DOMBuilder.java 25 Feb 2004 13:07:51 -0000 1.19
+++ DOMBuilder.java 23 Mar 2004 23:04:41 -0000 1.20
@@ -299,9 +299,11 @@
// 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:"))
+ // In SAX, xmlns[:] attributes have an empty namespace, while in DOM they
+ // should have the xmlns namespace
+ if (attrQName.startsWith("xmlns:") || attrQName.equals("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