stefano 00/03/17 08:47:24
Modified: src/org/apache/cocoon/processor/xsp XSPUtil.java
Log:
fixed bug 45
Revision Changes Path
1.13 +17 -15 xml-cocoon/src/org/apache/cocoon/processor/xsp/XSPUtil.java
Index: XSPUtil.java
===================================================================
RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/processor/xsp/XSPUtil.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- XSPUtil.java 2000/03/13 21:26:45 1.12
+++ XSPUtil.java 2000/03/17 16:47:24 1.13
@@ -1,36 +1,36 @@
-/*-- $Id: XSPUtil.java,v 1.12 2000/03/13 21:26:45 ricardo Exp $ --
+/*-- $Id: XSPUtil.java,v 1.13 2000/03/17 16:47:24 stefano Exp $ --
============================================================================
The Apache Software License, Version 1.1
============================================================================
-
+
Copyright (C) @year@ The Apache Software Foundation. All rights reserved.
-
+
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
-
+
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
-
+
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
-
+
3. The end-user documentation included with the redistribution, if any, must
include the following acknowledgment: "This product includes software
developed by the Apache Software Foundation (http://www.apache.org/)."
Alternately, this acknowledgment may appear in the software itself, if
and wherever such third-party acknowledgments normally appear.
-
+
4. The names "Cocoon" and "Apache Software Foundation" must not be used to
endorse or promote products derived from this software without prior
written permission. For written permission, please contact
apache@apache.org.
-
+
5. Products derived from this software may not be called "Apache", nor may
"Apache" appear in their name, without prior written permission of the
Apache Software Foundation.
-
+
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
@@ -41,14 +41,14 @@
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
+
This software consists of voluntary contributions made by many individuals
on behalf of the Apache Software Foundation and was originally created by
- Stefano Mazzocchi <stefano@apache.org>. For more information on the Apache
+ Stefano Mazzocchi <stefano@apache.org>. For more information on the Apache
Software Foundation, please see <http://www.apache.org/>.
-
+
*/
-
+
package org.apache.cocoon.processor.xsp;
import java.io.*;
@@ -63,7 +63,7 @@
/**
* @author <a href="mailto:ricardo@apache.org">Ricardo Rocha</a>
- * @version $Revision: 1.12 $ $Date: 2000/03/13 21:26:45 $
+ * @version $Revision: 1.13 $ $Date: 2000/03/17 16:47:24 $
*/
public class XSPUtil {
public static String pathComponent(String filename) {
@@ -177,6 +177,7 @@
return factory.createCDATASection(node.getNodeValue());
}
case Node.COMMENT_NODE: {
+ return factory.createComment(node.getNodeValue());
}
case Node.ENTITY_REFERENCE_NODE: {
return factory.createEntityReference(node.getNodeValue());
@@ -195,7 +196,8 @@
NodeList nodeList = input.getChildNodes();
int childCount = nodeList.getLength();
for (int i = 0; i < childCount; i++) {
- output.appendChild(cloneNode(nodeList.item(i), factory));
+ Node child = cloneNode(nodeList.item(i), factory);
+ if (child != null) output.appendChild(child);
}
return output;
|