tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shem...@locus.apache.org
Subject cvs commit: jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler JspUtil.java XmlOutputter.java
Date Fri, 29 Sep 2000 06:06:39 GMT
shemnon     00/09/28 23:06:38

  Modified:    jasper/src/share/org/apache/jasper/compiler JspUtil.java
                        XmlOutputter.java
  Log:
  Add conversions for JSP to XJSP run-time attributes to the XMLOutputter.
  
  Revision  Changes    Path
  1.3       +20 -3     jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspUtil.java
  
  Index: JspUtil.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspUtil.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JspUtil.java	2000/09/27 17:14:19	1.2
  +++ JspUtil.java	2000/09/29 06:06:38	1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspUtil.java,v
1.2 2000/09/27 17:14:19 pierred Exp $
  - * $Revision: 1.2 $
  - * $Date: 2000/09/27 17:14:19 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/JspUtil.java,v
1.3 2000/09/29 06:06:38 shemnon Exp $
  + * $Revision: 1.3 $
  + * $Date: 2000/09/29 06:06:38 $
    *
    * ====================================================================
    * 
  @@ -129,6 +129,23 @@
   	}
   
   	return returnString;
  +    }
  +
  +    /**
  +     * Takes a potential expression and converts it into XML form
  +     */
  +    public static String getExprInXml(String expression) {
  +        String returnString;
  +        int length = expression.length();
  +
  +        if (expression.startsWith(OPEN_EXPR) 
  +         && expression.endsWith(CLOSE_EXPR)) {
  +            returnString = expression.substring (1, length - 1);
  +        } else {
  +            returnString = expression;
  +        }
  +
  +        return returnString;
       }
   
       // Parses the XML document contained in the InputStream.
  
  
  
  1.2       +3 -3      jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/XmlOutputter.java
  
  Index: XmlOutputter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/XmlOutputter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XmlOutputter.java	2000/09/19 19:19:21	1.1
  +++ XmlOutputter.java	2000/09/29 06:06:38	1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/XmlOutputter.java,v
1.1 2000/09/19 19:19:21 pierred Exp $
  - * $Revision: 1.1 $
  - * $Date: 2000/09/19 19:19:21 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/compiler/XmlOutputter.java,v
1.2 2000/09/29 06:06:38 shemnon Exp $
  + * $Revision: 1.2 $
  + * $Date: 2000/09/29 06:06:38 $
    *
    * ====================================================================
    *
  @@ -150,7 +150,7 @@
                   String name = (String)enum.nextElement();
                   String value = (String)attrs.get(name);
                   buff.append("  ").append(name).append("=\"");
  -		buff.append(value).append("\"\n");
  +		buff.append(JspUtil.getExprInXml(value)).append("\"\n");
               }
               buff.append(">\n");
           }
  
  
  

Mime
View raw message