cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rica...@locus.apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon/processor/xsp XSPUtil.java
Date Wed, 12 Jan 2000 19:24:30 GMT
ricardo     00/01/12 11:24:30

  Modified:    src/org/apache/cocoon/processor/xsp XSPUtil.java
  Log:
  Supressed indentation in toMarkup()
  
  Revision  Changes    Path
  1.8       +6 -16     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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- XSPUtil.java	2000/01/09 02:47:24	1.7
  +++ XSPUtil.java	2000/01/12 19:24:30	1.8
  @@ -1,4 +1,4 @@
  -/*-- $Id: XSPUtil.java,v 1.7 2000/01/09 02:47:24 ricardo Exp $ -- 
  +/*-- $Id: XSPUtil.java,v 1.8 2000/01/12 19:24:30 ricardo Exp $ -- 
   
    ============================================================================
                      The Apache Software License, Version 1.1
  @@ -61,7 +61,7 @@
   
   /**
    * @author <a href="mailto:ricardo@apache.org">Ricardo Rocha</a>
  - * @version $Revision: 1.7 $ $Date: 2000/01/09 02:47:24 $
  + * @version $Revision: 1.8 $ $Date: 2000/01/12 19:24:30 $
    */
   public class XSPUtil {
     public static String pathComponent(String filename) {
  @@ -233,17 +233,11 @@
   
     public static String toMarkup(Node node) {
       StringBuffer buffer = new StringBuffer();
  -
  -    doMarkup(node, buffer, 0);
  -
  +    doMarkup(node, buffer);
       return buffer.toString();
     }
   
  -  protected static void doMarkup(Node node, StringBuffer buffer, int level) {
  -    for (int i = 0; i < level; i++) {
  -      buffer.append(' ');
  -    }
  -
  +  protected static void doMarkup(Node node, StringBuffer buffer) {
       switch (node.getNodeType()) {
         case Node.CDATA_SECTION_NODE:
           buffer.append("<![CDATA[\n");
  @@ -256,7 +250,7 @@
           int childCount = nodeList.getLength();
   
           for (int i = 0; i < childCount; i++) {
  -          doMarkup(nodeList.item(i), buffer, level + 1);
  +          doMarkup(nodeList.item(i), buffer);
           }
   
           break;
  @@ -287,11 +281,7 @@
           } else {
             buffer.append(">");
             for (int i = 0; i < childCount; i++) {
  -            doMarkup(nodeList.item(i), buffer, level + 1);
  -          }
  -
  -          for (int i = 0; i < level; i++) {
  -            buffer.append(' ');
  +            doMarkup(nodeList.item(i), buffer);
             }
   
             buffer.append("</");
  
  
  

Mime
View raw message