Author: dkulp
Date: Tue Mar 30 20:59:14 2010
New Revision: 929280
URL: http://svn.apache.org/viewvc?rev=929280&view=rev
Log:
Merged revisions 929261 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r929261 | dkulp | 2010-03-30 16:35:34 -0400 (Tue, 30 Mar 2010) | 1 line
try to write a doctype in staxutils, may or may not work
........
Modified:
cxf/branches/2.2.x-fixes/ (props changed)
cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.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/staxutils/StaxUtils.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java?rev=929280&r1=929279&r2=929280&view=diff
==============================================================================
---
cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
(original)
+++
cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
Tue Mar 30 20:59:14 2010
@@ -59,6 +59,7 @@ import org.w3c.dom.CDATASection;
import org.w3c.dom.Comment;
import org.w3c.dom.Document;
import org.w3c.dom.DocumentFragment;
+import org.w3c.dom.DocumentType;
import org.w3c.dom.Element;
import org.w3c.dom.EntityReference;
import org.w3c.dom.NamedNodeMap;
@@ -745,6 +746,14 @@ public final class StaxUtils {
}
break;
}
+ case Node.DOCUMENT_TYPE_NODE:
+ try {
+ writer.writeDTD(((DocumentType)n).getTextContent());
+ } catch (UnsupportedOperationException ex) {
+ //can we ignore? DOM writers really don't allow this
+ //as there isn't a way to write a DTD in dom
+ }
+ break;
default:
throw new IllegalStateException("Found type: " +
n.getClass().getName());
}