cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r425475 - /cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/java/org/apache/cocoon/maven/deployer/utils/XMLUtils.java
Date Tue, 25 Jul 2006 18:19:59 GMT
Author: cziegeler
Date: Tue Jul 25 11:19:59 2006
New Revision: 425475

URL: http://svn.apache.org/viewvc?rev=425475&view=rev
Log:
Keep doctype

Modified:
    cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/java/org/apache/cocoon/maven/deployer/utils/XMLUtils.java

Modified: cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/java/org/apache/cocoon/maven/deployer/utils/XMLUtils.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/java/org/apache/cocoon/maven/deployer/utils/XMLUtils.java?rev=425475&r1=425474&r2=425475&view=diff
==============================================================================
--- cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/java/org/apache/cocoon/maven/deployer/utils/XMLUtils.java
(original)
+++ cocoon/trunk/tools/cocoon-block-deployer/cocoon-deployer-plugin/src/main/java/org/apache/cocoon/maven/deployer/utils/XMLUtils.java
Tue Jul 25 11:19:59 2006
@@ -68,13 +68,21 @@
         }
     }
 
-    public static void write(Document node, OutputStream out)
+    public static void write(Document     node,
+                             OutputStream out)
     throws Exception {
         final Properties format = new Properties();
         format.put(OutputKeys.METHOD, "xml");
         format.put(OutputKeys.OMIT_XML_DECLARATION, "no");
         format.put(OutputKeys.INDENT, "yes");
-
+        if ( node.getDoctype() != null ) {
+            if ( node.getDoctype().getPublicId() != null ) {
+                format.put(OutputKeys.DOCTYPE_PUBLIC, node.getDoctype().getPublicId());
+            }
+            if ( node.getDoctype().getSystemId() != null ) {
+                format.put(OutputKeys.DOCTYPE_SYSTEM, node.getDoctype().getSystemId());
+            }
+        }
         Transformer transformer;
         transformer = TransformerFactory.newInstance().newTransformer();
         transformer.setOutputProperties(format);



Mime
View raw message