Author: dkulp
Date: Tue Mar 2 14:48:46 2010
New Revision: 918059
URL: http://svn.apache.org/viewvc?rev=918059&view=rev
Log:
Merged revisions 918058 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r918058 | dkulp | 2010-03-02 09:45:14 -0500 (Tue, 02 Mar 2010) | 1 line
Always create the NS versions of elements and attributes
........
Modified:
cxf/branches/2.2.x-fixes/ (props changed)
cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/DOMUtils.java
cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamWriter.java
Propchange: cxf/branches/2.2.x-fixes/
('svn:mergeinfo' removed)
Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified:
cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/DOMUtils.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/DOMUtils.java?rev=918059&r1=918058&r2=918059&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/DOMUtils.java
(original)
+++
cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/DOMUtils.java
Tue Mar 2 14:48:46 2010
@@ -186,7 +186,7 @@
public static void setAttribute(Node node, String attName, String val) {
NamedNodeMap attributes = node.getAttributes();
- Node attNode = node.getOwnerDocument().createAttribute(attName);
+ Node attNode = node.getOwnerDocument().createAttributeNS(null,
attName);
attNode.setNodeValue(val);
attributes.setNamedItem(attNode);
}
Modified:
cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamWriter.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamWriter.java?rev=918059&r1=918058&r2=918059&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamWriter.java
(original)
+++
cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamWriter.java
Tue Mar 2 14:48:46 2010
@@ -97,7 +97,7 @@
}
public void writeStartElement(String local) throws XMLStreamException {
- newChild(document.createElement(local));
+ newChild(document.createElementNS(null, local));
}
protected void newChild(Element element) {
@@ -169,7 +169,12 @@
}
public void writeAttribute(String local, String value) throws
XMLStreamException {
- Attr a = document.createAttribute(local);
+ Attr a;
+ if (local.startsWith("xmlns:")) {
+ a = document.createAttributeNS(XML_NS, local);
+ } else {
+ a = document.createAttributeNS(null, local);
+ }
a.setValue(value);
((Element)currentNode).setAttributeNode(a);
}