cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From un...@apache.org
Subject svn commit: rev 36616 - cocoon/branches/BRANCH_2_1_X/tools/src/anttasks
Date Thu, 19 Aug 2004 16:41:47 GMT
Author: unico
Date: Thu Aug 19 09:41:46 2004
New Revision: 36616

Modified:
   cocoon/branches/BRANCH_2_1_X/tools/src/anttasks/DocumentCache.java
Log:
fix bug where only one of either system or public doctype was specified 
(such as is the case with log4j.xconf)

Modified: cocoon/branches/BRANCH_2_1_X/tools/src/anttasks/DocumentCache.java
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/tools/src/anttasks/DocumentCache.java	(original)
+++ cocoon/branches/BRANCH_2_1_X/tools/src/anttasks/DocumentCache.java	Thu Aug 19 09:41:46
2004
@@ -123,9 +123,13 @@
         // if we have any DOCTYPE declaration in the input xml document
         final DocumentType doctype = document.getDoctype();
         Properties props = new Properties();
-        if (null != doctype && null != doctype.getPublicId()) {
-            props.put(OutputKeys.DOCTYPE_PUBLIC, doctype.getPublicId());
-            props.put(OutputKeys.DOCTYPE_SYSTEM, doctype.getSystemId());
+        if (null != doctype) {
+            if (null != doctype.getPublicId()) {
+                props.put(OutputKeys.DOCTYPE_PUBLIC, doctype.getPublicId());
+            }
+            if (null != doctype.getSystemId()) {
+                props.put(OutputKeys.DOCTYPE_SYSTEM, doctype.getSystemId());
+            }
         }
         transformer.setOutputProperties(props);
         

Mime
View raw message