cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@locus.apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon/processor/xsp XSPUtil.java
Date Thu, 20 Jul 2000 00:17:03 GMT
stefano     00/07/19 17:17:03

  Modified:    src/org/apache/cocoon/processor/xsp XSPUtil.java
  Log:
  fixed problem with XSP including Document Fragments
  
  Revision  Changes    Path
  1.16      +15 -2     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.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- XSPUtil.java	2000/04/13 10:42:56	1.15
  +++ XSPUtil.java	2000/07/20 00:17:02	1.16
  @@ -1,4 +1,4 @@
  -/*-- $Id: XSPUtil.java,v 1.15 2000/04/13 10:42:56 stefano Exp $ --
  +/*-- $Id: XSPUtil.java,v 1.16 2000/07/20 00:17:02 stefano Exp $ --
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -62,7 +62,7 @@
   
   /**
    * @author <a href="mailto:ricardo@apache.org">Ricardo Rocha</a>
  - * @version $Revision: 1.15 $ $Date: 2000/04/13 10:42:56 $
  + * @version $Revision: 1.16 $ $Date: 2000/07/20 00:17:02 $
    */
   public class XSPUtil {
     public static String pathComponent(String filename) {
  @@ -211,6 +211,19 @@
         }
         case Node.TEXT_NODE: {
           return factory.createTextNode(node.getNodeValue());
  +      }
  +      case Node.DOCUMENT_FRAGMENT_NODE: {
  +        DocumentFragment input = (DocumentFragment) node;
  +        DocumentFragment output = factory.createDocumentFragment();
  +
  +        NodeList nodeList = input.getChildNodes();
  +        int childCount = nodeList.getLength();
  +        for (int i = 0; i < childCount; i++) {
  +          Node child = cloneNode(nodeList.item(i), factory);
  +          if (child != null) output.appendChild(child);
  +        }
  +
  +        return output;
         }
         default:
           return null;
  
  
  

Mime
View raw message