jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sh...@apache.org
Subject cvs commit: jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/rt/xml ExprTag.java
Date Thu, 07 Mar 2002 00:41:57 GMT
shawn       02/03/06 16:41:57

  Modified:    standard/conf c.tld x-rt.tld x.tld
               standard/examples/web/conditionals Choose.jsp
                        CustomLogicTag.jsp FailureLocal.jsp If.jsp
               standard/examples/web/elsupport Expr.jsp Set.jsp Set2.jsp
               standard/examples/web/import ContextRelative.jsp
                        ExposeString.jsp ExposeStringRelative.jsp
                        LocalQueryString.jsp
               standard/examples/web/iterators Collaboration.jsp
                        DataTypes.jsp ForTokens.jsp Simple.jsp
                        SimpleRange.jsp Status.jsp
               standard/examples/web/misc IteratorTest.jsp
               standard/examples/web/sql QueryDirect.jsp QueryIterate.jsp
                        QueryParam.jsp Update.jsp
               standard/examples/web/xml Expr.jsp Filter.jsp ForEach.jsp
                        Parse.jsp Set.jsp Transform.jsp
               standard/src/org/apache/taglibs/standard/lang/jstl
                        ELParser.jj EnumeratedMap.java ImplicitObjects.java
               standard/src/org/apache/taglibs/standard/tag/el/core
                        ExprTag.java
  Added:       standard/src/org/apache/taglibs/standard/tag/common/xml
                        ExprSupport.java
               standard/src/org/apache/taglibs/standard/tag/el/xml
                        ExprTag.java
               standard/src/org/apache/taglibs/standard/tag/rt/xml
                        ExprTag.java
  Removed:     standard/src/org/apache/taglibs/standard/tag/common/xml
                        ExprTag.java
  Log:
  EXPR -> OUT
  
  Revision  Changes    Path
  1.8       +8 -3      jakarta-taglibs/standard/conf/c.tld
  
  Index: c.tld
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/conf/c.tld,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- c.tld	5 Mar 2002 20:58:36 -0000	1.7
  +++ c.tld	7 Mar 2002 00:41:55 -0000	1.8
  @@ -17,8 +17,8 @@
       <init-param>
   	<param-name>expressionAttributes</param-name>
   	<param-value>
  -	    expr:value
  -	    expr:default
  +	    out:value
  +	    out:default
   	    if:test
   	    import:url
   	    import:context
  @@ -62,7 +62,7 @@
     </tag>
   
     <tag>
  -    <name>expr</name>
  +    <name>out</name>
       <tag-class>org.apache.taglibs.standard.tag.el.core.ExprTag</tag-class>
       <body-content>JSP</body-content>
       <description>
  @@ -75,6 +75,11 @@
       </attribute>
       <attribute>
           <name>default</name>
  +        <required>false</required>
  +        <rtexprvalue>false</rtexprvalue>
  +    </attribute>
  +    <attribute>
  +        <name>escapeXml</name>
           <required>false</required>
           <rtexprvalue>false</rtexprvalue>
       </attribute>
  
  
  
  1.4       +7 -2      jakarta-taglibs/standard/conf/x-rt.tld
  
  Index: x-rt.tld
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/conf/x-rt.tld,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- x-rt.tld	4 Feb 2002 02:39:49 -0000	1.3
  +++ x-rt.tld	7 Mar 2002 00:41:55 -0000	1.4
  @@ -31,8 +31,8 @@
     </tag>
   
     <tag>
  -    <name>expr</name>
  -    <tag-class>org.apache.taglibs.standard.tag.common.xml.ExprTag</tag-class>
  +    <name>out</name>
  +    <tag-class>org.apache.taglibs.standard.tag.rt.xml.ExprTag</tag-class>
       <body-content>empty</body-content>
       <description>
   	Like &lt;%= ... &gt;, but for XPath expressions.
  @@ -41,6 +41,11 @@
           <name>select</name>
           <required>true</required>
           <rtexprvalue>false</rtexprvalue>
  +    </attribute>
  +    <attribute>
  +        <name>escapeXml</name>
  +        <required>false</required>
  +        <rtexprvalue>true</rtexprvalue>
       </attribute>
     </tag>
   
  
  
  
  1.5       +8 -2      jakarta-taglibs/standard/conf/x.tld
  
  Index: x.tld
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/conf/x.tld,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- x.tld	5 Mar 2002 20:58:36 -0000	1.4
  +++ x.tld	7 Mar 2002 00:41:55 -0000	1.5
  @@ -17,6 +17,7 @@
       <init-param>
   	<param-name>expressionAttributes</param-name>
   	<param-value>
  +	    out:escapeXml
   	    parse:xmlText
   	    parse:xmlUrl
   	    parse:filter
  @@ -50,8 +51,8 @@
     </tag>
   
     <tag>
  -    <name>expr</name>
  -    <tag-class>org.apache.taglibs.standard.tag.common.xml.ExprTag</tag-class>
  +    <name>out</name>
  +    <tag-class>org.apache.taglibs.standard.tag.el.xml.ExprTag</tag-class>
       <body-content>empty</body-content>
       <description>
   	Like &lt;%= ... &gt;, but for XPath expressions.
  @@ -59,6 +60,11 @@
       <attribute>
           <name>select</name>
           <required>true</required>
  +        <rtexprvalue>false</rtexprvalue>
  +    </attribute>
  +    <attribute>
  +        <name>escapeXml</name>
  +        <required>false</required>
           <rtexprvalue>false</rtexprvalue>
       </attribute>
     </tag>
  
  
  
  1.4       +1 -1      jakarta-taglibs/standard/examples/web/conditionals/Choose.jsp
  
  Index: Choose.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/web/conditionals/Choose.jsp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Choose.jsp	5 Mar 2002 21:17:43 -0000	1.3
  +++ Choose.jsp	7 Mar 2002 00:41:56 -0000	1.4
  @@ -21,7 +21,7 @@
         <font color="green">	
       </c:otherwise>	
     </c:choose>
  -  <c:expr value="${customer}"/></font><br>
  +  <c:out value="${customer}"/></font><br>
   </c:forEach>
   </body>
   </html>
  
  
  
  1.4       +2 -2      jakarta-taglibs/standard/examples/web/conditionals/CustomLogicTag.jsp
  
  Index: CustomLogicTag.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/web/conditionals/CustomLogicTag.jsp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CustomLogicTag.jsp	5 Mar 2002 21:17:43 -0000	1.3
  +++ CustomLogicTag.jsp	7 Mar 2002 00:41:56 -0000	1.4
  @@ -14,7 +14,7 @@
   <h4>Simple Conditional Execution</h4>
   <c:forEach var="customer" items="${customers}">
     <ex:usCustomer customer="${customer}">
  -    <c:expr value="${customer}"/><br>
  +    <c:out value="${customer}"/><br>
     </ex:usCustomer>
   </c:forEach>
   
  @@ -30,7 +30,7 @@
         <font color="green">	
       </c:otherwise>	
     </c:choose>
  -  <c:expr value="${customer}"/></font><br>
  +  <c:out value="${customer}"/></font><br>
   </c:forEach>
   </body>
   </html>
  
  
  
  1.3       +1 -1      jakarta-taglibs/standard/examples/web/conditionals/FailureLocal.jsp
  
  Index: FailureLocal.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/web/conditionals/FailureLocal.jsp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- FailureLocal.jsp	5 Mar 2002 21:17:43 -0000	1.2
  +++ FailureLocal.jsp	7 Mar 2002 00:41:56 -0000	1.3
  @@ -21,7 +21,7 @@
         <font color="red">
       </c:when>
     </c:choose>
  -  <c:expr value="${customer}"/></font><br>
  +  <c:out value="${customer}"/></font><br>
   </c:forEach>
   </body>
   </html>
  
  
  
  1.4       +1 -1      jakarta-taglibs/standard/examples/web/conditionals/If.jsp
  
  Index: If.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/web/conditionals/If.jsp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- If.jsp	5 Mar 2002 21:17:43 -0000	1.3
  +++ If.jsp	7 Mar 2002 00:41:56 -0000	1.4
  @@ -12,7 +12,7 @@
   
   <c:forEach var="customer" items="${customers}">
     <c:if test="${customer.address.country == 'USA'}">
  -    <c:expr value="${customer}"/><br>
  +    <c:out value="${customer}"/><br>
     </c:if>
   </c:forEach>
   </body>
  
  
  
  1.4       +4 -4      jakarta-taglibs/standard/examples/web/elsupport/Expr.jsp
  
  Index: Expr.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/web/elsupport/Expr.jsp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Expr.jsp	5 Mar 2002 21:17:43 -0000	1.3
  +++ Expr.jsp	7 Mar 2002 00:41:56 -0000	1.4
  @@ -10,12 +10,12 @@
   <table border="1">
     <c:forEach var="customer" items="${customers}">
       <tr>
  -	  <td><c:expr value="${customer.lastName}"/></td>
  -	  <td><c:expr value="${customer.phoneHome}" default="no home phone specified"/></td>
  +	  <td><c:out value="${customer.lastName}"/></td>
  +	  <td><c:out value="${customer.phoneHome}" default="no home phone specified"/></td>
   	  <td>
  -	    <c:expr value="${customer.phoneCell}">
  +	    <c:out value="${customer.phoneCell}">
   		  <font color="red">no cell phone specified</font>
  -		</c:expr>
  +		</c:out>
         </td>
   	</tr>
     </c:forEach>
  
  
  
  1.4       +4 -4      jakarta-taglibs/standard/examples/web/elsupport/Set.jsp
  
  Index: Set.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/web/elsupport/Set.jsp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Set.jsp	5 Mar 2002 21:17:43 -0000	1.3
  +++ Set.jsp	7 Mar 2002 00:41:56 -0000	1.4
  @@ -13,12 +13,12 @@
   <table border="1">
       <c:forEach var="customer" items="${customers}">
       <tr>
  -	  <td><c:expr value="${customer.lastName}"/></td>
  -	  <td><c:expr value="${customer.address}" default="no address specified"/></td>
  +	  <td><c:out value="${customer.lastName}"/></td>
  +	  <td><c:out value="${customer.address}" default="no address specified"/></td>
   	  <td>
  -	    <c:expr value="${customer.address}">
  +	    <c:out value="${customer.address}">
   		  <font color="red">no address specified</font>
  -		</c:expr>
  +		</c:out>
         </td>
   	</tr>
     </c:forEach>
  
  
  
  1.4       +2 -2      jakarta-taglibs/standard/examples/web/elsupport/Set2.jsp
  
  Index: Set2.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/web/elsupport/Set2.jsp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Set2.jsp	5 Mar 2002 21:17:43 -0000	1.3
  +++ Set2.jsp	7 Mar 2002 00:41:56 -0000	1.4
  @@ -8,9 +8,9 @@
   <h3>&lt;set&gt;</h3>
   
   <h4>Using "customerTable" application scope attribute defined in Set.jsp a first time</h4>
  -<c:expr value="${customerTable}"/>
  +<c:out value="${customerTable}"/>
   
   <h4>Using "customerTable" application scope attribute defined in Set.jsp a second time</h4>
  -<c:expr value="${customerTable}"/>
  +<c:out value="${customerTable}"/>
   </body>
   </html>
  
  
  
  1.4       +2 -2      jakarta-taglibs/standard/examples/web/import/ContextRelative.jsp
  
  Index: ContextRelative.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/web/import/ContextRelative.jsp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ContextRelative.jsp	5 Mar 2002 21:17:44 -0000	1.3
  +++ ContextRelative.jsp	7 Mar 2002 00:41:56 -0000	1.4
  @@ -7,8 +7,8 @@
   <body bgcolor="#FFFFFF">
   Assuming you have the "examples" webapp installed, here's a file from it...
   
  -URL:<c:expr value="${_contextUrl}"/><br>
  -Name:<c:expr value="${_contextName}"/>
  +URL:<c:out value="${_contextUrl}"/><br>
  +Name:<c:out value="${_contextName}"/>
   
   <blockquote>
    <pre>
  
  
  
  1.3       +1 -1      jakarta-taglibs/standard/examples/web/import/ExposeString.jsp
  
  Index: ExposeString.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/web/import/ExposeString.jsp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ExposeString.jsp	5 Mar 2002 21:17:44 -0000	1.2
  +++ ExposeString.jsp	7 Mar 2002 00:41:56 -0000	1.3
  @@ -12,7 +12,7 @@
   <h4>CNN's RSS XML feed:</h4>
   <blockquote>
    <pre>
  -  <c:expr value="${cnn}"/>
  +  <c:out value="${cnn}"/>
    </pre>
   </blockquote>
   
  
  
  
  1.3       +1 -1      jakarta-taglibs/standard/examples/web/import/ExposeStringRelative.jsp
  
  Index: ExposeStringRelative.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/web/import/ExposeStringRelative.jsp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ExposeStringRelative.jsp	5 Mar 2002 21:17:44 -0000	1.2
  +++ ExposeStringRelative.jsp	7 Mar 2002 00:41:56 -0000	1.3
  @@ -9,7 +9,7 @@
   
   <c:import var="cnn" url="LocalSample.jsp"/>
   
  -<c:expr value="${cnn}"/>
  +<c:out value="${cnn}"/>
   
   </body>
   </html>
  
  
  
  1.3       +4 -4      jakarta-taglibs/standard/examples/web/import/LocalQueryString.jsp
  
  Index: LocalQueryString.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/web/import/LocalQueryString.jsp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LocalQueryString.jsp	5 Mar 2002 21:17:44 -0000	1.2
  +++ LocalQueryString.jsp	7 Mar 2002 00:41:56 -0000	1.3
  @@ -3,7 +3,7 @@
   <hr>
   <h3> This is the output of the imported file </h3>
   
  -<c:expressionLanguage 
  +<c:outessionLanguage 
     evaluator="org.apache.taglibs.standard.lang.spel.Evaluator"> 
   
   <table border="0">
  @@ -11,7 +11,7 @@
       <td>Getting "name" query parameter:</td>
       <td>
         <div style="color: red">
  -        <c:expr value="${param:name}"/><br>
  +        <c:out value="${param:name}"/><br>
         </div>
       </td>
     </tr>
  @@ -19,12 +19,12 @@
       <td>Getting "email" query parameter:</td>
       <td>
         <div style="color: red">
  -        <c:expr value="${param:email}"/>
  +        <c:out value="${param:email}"/>
         </div>
       </td>
     </tr>
   </table>
   
  -</c:expressionLanguage>
  +</c:outessionLanguage>
   
   <hr>
  
  
  
  1.5       +2 -2      jakarta-taglibs/standard/examples/web/iterators/Collaboration.jsp
  
  Index: Collaboration.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/web/iterators/Collaboration.jsp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Collaboration.jsp	5 Mar 2002 21:17:44 -0000	1.4
  +++ Collaboration.jsp	7 Mar 2002 00:41:56 -0000	1.5
  @@ -23,7 +23,7 @@
   	    <td bgcolor="#99FFCC">
   	  </jr:otherwise>
       </jr:choose>
  -    <c:expr value="${customer}"/></td>
  +    <c:out value="${customer}"/></td>
     </tr>
   </c:forEach> 
   </table>
  @@ -35,7 +35,7 @@
     <tr>
       <ex:odd><td bgcolor="#FFFF66"></ex:odd>
       <ex:even><td bgcolor="#99FFCC"></ex:even>
  -    <c:expr value="${customer}"/></td>
  +    <c:out value="${customer}"/></td>
     </tr>
   </c:forEach> 
   </table>
  
  
  
  1.5       +5 -5      jakarta-taglibs/standard/examples/web/iterators/DataTypes.jsp
  
  Index: DataTypes.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/web/iterators/DataTypes.jsp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DataTypes.jsp	5 Mar 2002 21:17:44 -0000	1.4
  +++ DataTypes.jsp	7 Mar 2002 00:41:56 -0000	1.5
  @@ -10,31 +10,31 @@
   <h4>Array of primitives (int)</h4>
   
   <c:forEach var="i" items="${intArray}">
  -  <c:expr value="${i}"/> &#149;
  +  <c:out value="${i}"/> &#149;
   </c:forEach>
   
   <h4>Array of objects (String)</h4>
   
   <c:forEach var="string" items="${stringArray}">
  -  <c:expr value="${string}"/><br>
  +  <c:out value="${string}"/><br>
   </c:forEach>
   
   <h4>Enumeration (warning: this only works until enumeration is exhausted!)</h4>
   
   <c:forEach var="item" items="${enumeration}" begin="2" end="10" step="2">
  -  <c:expr value="${item}"/><br>
  +  <c:out value="${item}"/><br>
   </c:forEach>
   
   <h4>Properties (Map)</h4>
   
   <c:forEach var="prop" items="${numberMap}" begin="1" end="5">
  -  <c:expr value="${prop.key}"/> = <c:expr value="${prop.value}"/><br>
  +  <c:out value="${prop.key}"/> = <c:out value="${prop.value}"/><br>
   </c:forEach>
   
   <h4>String (Comma Separated Values)</h4>
   
   <c:forEach var="token" items="bleu,blanc,rouge">
  -  <c:expr value="${token}"/><br>
  +  <c:out value="${token}"/><br>
   </c:forEach>
   </body>
   </html>
  
  
  
  1.3       +2 -2      jakarta-taglibs/standard/examples/web/iterators/ForTokens.jsp
  
  Index: ForTokens.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/web/iterators/ForTokens.jsp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ForTokens.jsp	5 Mar 2002 21:17:44 -0000	1.2
  +++ ForTokens.jsp	7 Mar 2002 00:41:56 -0000	1.3
  @@ -12,14 +12,14 @@
   
   <c:forTokens var="token" items="bleu,blanc,rouge|vert,jaune|blanc,rouge"
                 delims="|">
  -  <c:expr value="${token}"/> &#149;
  +  <c:out value="${token}"/> &#149;
   </c:forTokens>
   
   <h4>String with '|' and ',' delimiters</h4>
   
   <c:forTokens var="token" items="bleu,blanc,rouge|vert,jaune|blanc,rouge"
                 delims="|,">
  -  <c:expr value="${token}"/> &#149;
  +  <c:out value="${token}"/> &#149;
   </c:forTokens>
   </body>
   </html>
  
  
  
  1.4       +1 -1      jakarta-taglibs/standard/examples/web/iterators/Simple.jsp
  
  Index: Simple.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/web/iterators/Simple.jsp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Simple.jsp	5 Mar 2002 21:17:44 -0000	1.3
  +++ Simple.jsp	7 Mar 2002 00:41:56 -0000	1.4
  @@ -10,7 +10,7 @@
   <h4>Customer list</h4>
   
   <c:forEach var="customer" items="${customers}">
  -  <c:expr value="${customer}"/><br>
  +  <c:out value="${customer}"/><br>
   </c:forEach>
   </body>
   </html>
  
  
  
  1.4       +1 -1      jakarta-taglibs/standard/examples/web/iterators/SimpleRange.jsp
  
  Index: SimpleRange.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/web/iterators/SimpleRange.jsp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SimpleRange.jsp	5 Mar 2002 21:17:44 -0000	1.3
  +++ SimpleRange.jsp	7 Mar 2002 00:41:56 -0000	1.4
  @@ -10,7 +10,7 @@
   <h4>1 to 10</h4>
   
   <c:forEach var="i" begin="1" end="10">
  -  <c:expr value="${i}"/> &#149;
  +  <c:out value="${i}"/> &#149;
   </c:forEach>
   </body>
   </html>
  
  
  
  1.6       +12 -12    jakarta-taglibs/standard/examples/web/iterators/Status.jsp
  
  Index: Status.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/web/iterators/Status.jsp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Status.jsp	5 Mar 2002 21:17:44 -0000	1.5
  +++ Status.jsp	7 Mar 2002 00:41:56 -0000	1.6
  @@ -19,33 +19,33 @@
     </tr>
     <c:forEach var="customer" items="${customers}" varStatus="status">
       <tr>
  -      <td><c:expr value="${status.index}"/></td>
  -      <td><c:expr value="${status.count}"/></td>
  -      <td><c:expr value="${status.current.lastName}"/></td>
  -      <td><c:expr value="${status.current.firstName}"/></td>
  -      <td><c:expr value="${status.first}"/></td>
  -      <td><c:expr value="${status.last}"/></td>
  +      <td><c:out value="${status.index}"/></td>
  +      <td><c:out value="${status.count}"/></td>
  +      <td><c:out value="${status.current.lastName}"/></td>
  +      <td><c:out value="${status.current.firstName}"/></td>
  +      <td><c:out value="${status.first}"/></td>
  +      <td><c:out value="${status.last}"/></td>
       </tr>
       <c:if test="${status.last}">
         <c:set var="count" value="${status.count}"/>
       </c:if>  
     </c:forEach>
   </table>
  -<p>There are <c:expr value="${count}"/> customers in the list.
  +<p>There are <c:out value="${count}"/> customers in the list.
   
   <p>
   
   <h4>Iteration using range attributes</h4>
   <c:forEach var="i" begin="100" end="200" step="5" varStatus="status">
     <c:if test="${status.first}">
  -    begin:<c:expr value="${status.begin}">begin</c:expr> &nbsp; &nbsp; 
  -      end:<c:expr value="${status.end}">end</c:expr> &nbsp; &nbsp; 
  -     step:<c:expr value="${status.step}">step</c:expr><br>
  +    begin:<c:out value="${status.begin}">begin</c:out> &nbsp; &nbsp; 
  +      end:<c:out value="${status.end}">end</c:out> &nbsp; &nbsp; 
  +     step:<c:out value="${status.step}">step</c:out><br>
       sequence: 
     </c:if>  
  -  <c:expr value="${i}"/> 
  +  <c:out value="${i}"/> 
     <c:if test="${status.last}">
  -    <br>There are <c:expr value="${status.count}"/> numbers in the list.
  +    <br>There are <c:out value="${status.count}"/> numbers in the list.
     </c:if>  
   </c:forEach>
   <p>
  
  
  
  1.4       +8 -8      jakarta-taglibs/standard/examples/web/misc/IteratorTest.jsp
  
  Index: IteratorTest.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/web/misc/IteratorTest.jsp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- IteratorTest.jsp	5 Mar 2002 21:17:44 -0000	1.3
  +++ IteratorTest.jsp	7 Mar 2002 00:41:56 -0000	1.4
  @@ -11,7 +11,7 @@
   (illegal)
   <%--
   <c:forEach var="i" end="10">
  -  <c:expr value="${i}"/> &#149; 
  +  <c:out value="${i}"/> &#149; 
   </c:forEach>
   --%>
   
  @@ -19,24 +19,24 @@
   (illegal)
   <%--
   <c:forEach var="i" begin="10">
  -  <c:expr value="${i}"/> &#149; 
  +  <c:out value="${i}"/> &#149; 
   </c:forEach>
   --%>
   
   <h4>Iteration with only begin specified (with items): begin="2"</h4>
   
   <c:forEach var="i" items="${customers}" begin="2" varStatus="status">
  -  index: <c:expr value="${status.index}"/> &#149; 
  -  count: <c:expr value="${status.count}"/> &#149; 
  -  item: <c:expr value="${i}"/><br>
  +  index: <c:out value="${status.index}"/> &#149; 
  +  count: <c:out value="${status.count}"/> &#149; 
  +  item: <c:out value="${i}"/><br>
   </c:forEach>
   
   <h4>Iteration with only end specified (with items): end="1"</h4>
   
   <c:forEach var="i" items="${customers}" end="1" varStatus="status">
  -  index: <c:expr value="${status.index}"/> &#149; 
  -  count: <c:expr value="${status.count}"/> &#149; 
  -  item: <c:expr value="${i}"/><br>
  +  index: <c:out value="${status.index}"/> &#149; 
  +  count: <c:out value="${status.count}"/> &#149; 
  +  item: <c:out value="${i}"/><br>
   </c:forEach>
   </body>
   </html>
  
  
  
  1.6       +20 -20    jakarta-taglibs/standard/examples/web/sql/QueryDirect.jsp
  
  Index: QueryDirect.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/web/sql/QueryDirect.jsp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- QueryDirect.jsp	31 Jan 2002 22:56:27 -0000	1.5
  +++ QueryDirect.jsp	7 Mar 2002 00:41:56 -0000	1.6
  @@ -47,57 +47,57 @@
   <hr>
   
   <h2>Using the Row index and Column name</h2>
  -Row[0].get('nameid'): <c:expr value="$deejays.rows[0].get('nameid')" />
  +Row[0].get('nameid'): <c:out value="$deejays.rows[0].get('nameid')" />
   <br>
  -Row[0].get('name'): <c:expr value="$deejays.rows[0].get('name')" />
  +Row[0].get('name'): <c:out value="$deejays.rows[0].get('name')" />
   <br>
  -Row[1].get('nameid'): <c:expr value="$deejays.rows[1].get('nameid')" />
  +Row[1].get('nameid'): <c:out value="$deejays.rows[1].get('nameid')" />
   <br>
  -Row[1].get('name'): <c:expr value="$deejays.rows[1].get('name')" />
  +Row[1].get('name'): <c:out value="$deejays.rows[1].get('name')" />
   <br>
  -Row[2].get('nameid'): <c:expr value="$deejays.rows[2].get('nameid')" />
  +Row[2].get('nameid'): <c:out value="$deejays.rows[2].get('nameid')" />
   <br>
  -Row[2].get('name'): <c:expr value="$deejays.rows[2].get('name')" />
  +Row[2].get('name'): <c:out value="$deejays.rows[2].get('name')" />
   <br>
   
   <hr>
   
   <h2>Using the Row index and Column object</h2>
  -Row[0]Cols[0]: <c:expr value="$deejays.rows[0].columns[0]" />
  +Row[0]Cols[0]: <c:out value="$deejays.rows[0].columns[0]" />
   <br>
  -Row[0]Cols[1]: <c:expr value="$deejays.rows[0].columns[1]" />
  +Row[0]Cols[1]: <c:out value="$deejays.rows[0].columns[1]" />
   <br>
  -Row[1]Cols[0]: <c:expr value="$deejays.rows[1].columns[0]" />
  +Row[1]Cols[0]: <c:out value="$deejays.rows[1].columns[0]" />
   <br>
  -Row[1]Cols[1]: <c:expr value="$deejays.rows[1].columns[1]" />
  +Row[1]Cols[1]: <c:out value="$deejays.rows[1].columns[1]" />
   <br>
  -Row[2]Cols[0]: <c:expr value="$deejays.rows[2].columns[0]" />
  +Row[2]Cols[0]: <c:out value="$deejays.rows[2].columns[0]" />
   <br>
  -Row[2]Cols[1]: <c:expr value="$deejays.rows[2].columns[1]" />
  +Row[2]Cols[1]: <c:out value="$deejays.rows[2].columns[1]" />
   <br>
   
   <hr>
   
   <h2>Using the Row and Column indexes</h2>
  -Row[0].get(0): <c:expr value="$deejays.rows[0].get(0)" />
  +Row[0].get(0): <c:out value="$deejays.rows[0].get(0)" />
   <br>
  -Row[0].get(1): <c:expr value="$deejays.rows[0].get(1)" />
  +Row[0].get(1): <c:out value="$deejays.rows[0].get(1)" />
   <br>
  -Row[1].get(0): <c:expr value="$deejays.rows[1].get(0)" />
  +Row[1].get(0): <c:out value="$deejays.rows[1].get(0)" />
   <br>
  -Row[1].get(1): <c:expr value="$deejays.rows[1].get(1)" />
  +Row[1].get(1): <c:out value="$deejays.rows[1].get(1)" />
   <br>
  -Row[2].get(0): <c:expr value="$deejays.rows[2].get(0)" />
  +Row[2].get(0): <c:out value="$deejays.rows[2].get(0)" />
   <br>
  -Row[2].get(1): <c:expr value="$deejays.rows[2].get(1)" />
  +Row[2].get(1): <c:out value="$deejays.rows[2].get(1)" />
   <br>
   
   <hr>
   
   <h2>Getting the MetaData from the Column Object</h2>
  -Col[0]MetaData: <c:expr value="$deejays.metaData.columns[0].name" />
  +Col[0]MetaData: <c:out value="$deejays.metaData.columns[0].name" />
   <br>
  -Col[1]MetaData: <c:expr value="$deejays.metaData.columns[1].name" />
  +Col[1]MetaData: <c:out value="$deejays.metaData.columns[1].name" />
   
   <sql:update var="newTable" dataSource="$example">
     drop table mytable
  
  
  
  1.6       +8 -8      jakarta-taglibs/standard/examples/web/sql/QueryIterate.jsp
  
  Index: QueryIterate.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/web/sql/QueryIterate.jsp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- QueryIterate.jsp	31 Jan 2002 22:56:27 -0000	1.5
  +++ QueryIterate.jsp	7 Mar 2002 00:41:56 -0000	1.6
  @@ -51,8 +51,8 @@
   <table border="1">
     <c:forEach var="rows" items="$deejays.rows">
       <tr>
  -      <td> id: <c:expr value="$rows.get('nameid')"/> </td>
  -      <td> name: <c:expr value="$rows.get('name')"/> </td>
  +      <td> id: <c:out value="$rows.get('nameid')"/> </td>
  +      <td> name: <c:out value="$rows.get('name')"/> </td>
       </tr>
     </c:forEach>
   </table>
  @@ -62,7 +62,7 @@
   <h2>Iterating on each Column getting the MetaData</h2>
   
   <c:forEach var="metaData" items="$deejays.metaData.columns">
  -  metaData: <c:expr value="$metaData.name"/> <br>
  +  metaData: <c:out value="$metaData.name"/> <br>
   </c:forEach>
   
   <hr>
  @@ -73,7 +73,7 @@
     <c:forEach var="rows" items="$deejays.rows">
       <tr>
         <c:forEach var="column" items="$rows.columns">
  -        <td><c:expr value="$column"/></td>
  +        <td><c:out value="$column"/></td>
         </c:forEach>
       </tr>
     </c:forEach>
  @@ -87,8 +87,8 @@
     <c:forEach var="rows" items="$deejays.rows">
         <c:forEach var="column" items="$rows.columns">
     <tr>
  -        <td>Name: <c:expr value="$column.name"/></td>
  -        <td>Value: <c:expr value="$column"/></td>
  +        <td>Name: <c:out value="$column.name"/></td>
  +        <td>Value: <c:out value="$column"/></td>
     </tr>
         </c:forEach>
     </c:forEach>
  @@ -101,13 +101,13 @@
   <table border="1">
     <tr>
       <c:forEach var="metaData" items="$deejays.metaData.columns">
  -      <th><c:expr value="$metaData.name"/> </th>
  +      <th><c:out value="$metaData.name"/> </th>
       </c:forEach>
     </tr>
     <c:forEach var="rows" items="$deejays.rows">
       <tr>
         <c:forEach var="column" items="$rows.columns">
  -        <td><c:expr value="$column"/></td>
  +        <td><c:out value="$column"/></td>
         </c:forEach>
       </tr>
     </c:forEach>
  
  
  
  1.6       +2 -2      jakarta-taglibs/standard/examples/web/sql/QueryParam.jsp
  
  Index: QueryParam.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/web/sql/QueryParam.jsp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- QueryParam.jsp	31 Jan 2002 22:56:27 -0000	1.5
  +++ QueryParam.jsp	7 Mar 2002 00:41:56 -0000	1.6
  @@ -55,8 +55,8 @@
   <table border="1">
     <c:forEach var="rows" items="$deejay.rows">
       <tr>
  -      <td><c:expr value="$rows.get('nameid')"/></td>
  -      <td><c:expr value="$rows.get('name')"/></td>
  +      <td><c:out value="$rows.get('nameid')"/></td>
  +      <td><c:out value="$rows.get('name')"/></td>
       </tr>
       </c:forEach>
   </table>
  
  
  
  1.6       +4 -4      jakarta-taglibs/standard/examples/web/sql/Update.jsp
  
  Index: Update.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/web/sql/Update.jsp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Update.jsp	31 Jan 2002 22:56:27 -0000	1.5
  +++ Update.jsp	7 Mar 2002 00:41:56 -0000	1.6
  @@ -53,13 +53,13 @@
   <table border="1">
     <tr>
       <c:forEach var="metaData" items="$deejays.metaData.columns">
  -      <th><c:expr value="$metaData.name"/> </th>
  +      <th><c:out value="$metaData.name"/> </th>
       </c:forEach>
     </tr>
     <c:forEach var="rows" items="$deejays.rows">
       <tr>
         <c:forEach var="column" items="$rows.columns">
  -        <td><c:expr value="$column"/></td>
  +        <td><c:out value="$column"/></td>
         </c:forEach>
       </tr>
     </c:forEach>
  @@ -82,13 +82,13 @@
   <table border="1">
     <tr>
       <c:forEach var="metaData" items="$deejays.metaData.columns">
  -      <th><c:expr value="$metaData.name"/> </th>
  +      <th><c:out value="$metaData.name"/> </th>
       </c:forEach>
     </tr>
     <c:forEach var="rows" items="$deejays.rows">
       <tr>
         <c:forEach var="column" items="$rows.columns">
  -        <td><c:expr value="$column"/></td>
  +        <td><c:out value="$column"/></td>
         </c:forEach>
       </tr>
     </c:forEach>
  
  
  
  1.2       +2 -2      jakarta-taglibs/standard/examples/web/xml/Expr.jsp
  
  Index: Expr.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/web/xml/Expr.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Expr.jsp	21 Nov 2001 07:34:31 -0000	1.1
  +++ Expr.jsp	7 Mar 2002 00:41:56 -0000	1.2
  @@ -20,8 +20,8 @@
     </a>
   </x:parse>
   
  -<x:expr select="$a//c"/>
  -<x:expr select="$a/a/d"/>
  +<x:out select="$a//c"/>
  +<x:out select="$a/a/d"/>
   
   <hr />
   
  
  
  
  1.2       +2 -2      jakarta-taglibs/standard/examples/web/xml/Filter.jsp
  
  Index: Filter.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/web/xml/Filter.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Filter.jsp	21 Nov 2001 07:34:31 -0000	1.1
  +++ Filter.jsp	7 Mar 2002 00:41:56 -0000	1.2
  @@ -24,8 +24,8 @@
    </nope>
   </x:parse>
   
  -<x:expr select="$a//c"/>
  -<x:expr select="$a/a/d"/>
  +<x:out select="$a//c"/>
  +<x:out select="$a/a/d"/>
   
   <hr />
   
  
  
  
  1.2       +1 -1      jakarta-taglibs/standard/examples/web/xml/ForEach.jsp
  
  Index: ForEach.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/web/xml/ForEach.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ForEach.jsp	21 Nov 2001 07:34:31 -0000	1.1
  +++ ForEach.jsp	7 Mar 2002 00:41:56 -0000	1.2
  @@ -25,7 +25,7 @@
   </x:parse>
   
   <x:forEach select="$document//a">
  -  -> <x:expr select="."/>
  +  -> <x:out select="."/>
     <br />
   </x:forEach>
   
  
  
  
  1.2       +3 -3      jakarta-taglibs/standard/examples/web/xml/Parse.jsp
  
  Index: Parse.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/web/xml/Parse.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Parse.jsp	4 Feb 2002 02:39:50 -0000	1.1
  +++ Parse.jsp	7 Mar 2002 00:41:56 -0000	1.2
  @@ -23,14 +23,14 @@
   
   <x:parse var="a" xmlText="$xmlText" />
   
  -<x:expr select="$a//c"/>
  -<x:expr select="$a/a/d"/>
  +<x:out select="$a//c"/>
  +<x:out select="$a/a/d"/>
   
   <hr />
   
   <x:parse var="a" xmlUrl="http://www.cnn.com/cnn.rss" />
   
  -Title of news feed: "<x:expr select="$a//title"/>"
  +Title of news feed: "<x:out select="$a//title"/>"
   
   </body>
   </html>
  
  
  
  1.2       +1 -1      jakarta-taglibs/standard/examples/web/xml/Set.jsp
  
  Index: Set.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/web/xml/Set.jsp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Set.jsp	21 Nov 2001 07:34:31 -0000	1.1
  +++ Set.jsp	7 Mar 2002 00:41:56 -0000	1.2
  @@ -23,7 +23,7 @@
   </x:parse>
   
   <x:set var="d" select="$a//d"/>
  -<x:expr select="$d/e"/>
  +<x:out select="$d/e"/>
   
   <hr />
   
  
  
  
  1.3       +1 -1      jakarta-taglibs/standard/examples/web/xml/Transform.jsp
  
  Index: Transform.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/web/xml/Transform.jsp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Transform.jsp	4 Feb 2002 02:39:50 -0000	1.2
  +++ Transform.jsp	7 Mar 2002 00:41:56 -0000	1.3
  @@ -31,7 +31,7 @@
   
   Prints "header" in normal size:<br />
   <x:transform xmlText="$xml" xsltText="$xsl" var="doc"/>
  -<x:expr select="$doc//h1"/>
  +<x:out select="$doc//h1"/>
   
   <%--
   <hr />
  
  
  
  1.4       +0 -2      jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/ELParser.jj
  
  Index: ELParser.jj
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/ELParser.jj,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ELParser.jj	6 Mar 2002 07:46:48 -0000	1.3
  +++ ELParser.jj	7 Mar 2002 00:41:57 -0000	1.4
  @@ -105,7 +105,6 @@
   | < MULTIPLY: "*" >
   | < DIVIDE: "/" | "div" >
   | < MODULUS: "%" | "mod" >
  -/* | < INTEGER_DIVIDE: "idiv" > */
   | < NOT: "not" >
   | < AND: "and" >
   | < OR: "or" >
  @@ -456,7 +455,6 @@
         <MULTIPLY> { operator = MultiplyOperator.SINGLETON; }
         | <DIVIDE> { operator = DivideOperator.SINGLETON; }
         | <MODULUS> { operator = ModulusOperator.SINGLETON; }
  -      /* | <INTEGER_DIVIDE> { operator = IntegerDivideOperator.SINGLETON; }*/
         )
        expression = UnaryExpression ()
   
  
  
  
  1.2       +0 -5      jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/EnumeratedMap.java
  
  Index: EnumeratedMap.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/EnumeratedMap.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EnumeratedMap.java	5 Mar 2002 14:10:43 -0000	1.1
  +++ EnumeratedMap.java	7 Mar 2002 00:41:57 -0000	1.2
  @@ -100,14 +100,12 @@
     //-------------------------------------
     public boolean containsValue (Object pValue)
     {
  -    // FIXME - implement this more efficiently
       return getAsMap ().containsValue (pValue);
     }
   
     //-------------------------------------
     public Set entrySet ()
     {
  -    // FIXME - implement this more efficiently
       return getAsMap ().entrySet ();
     }
   
  @@ -126,7 +124,6 @@
     //-------------------------------------
     public Set keySet ()
     {
  -    // FIXME - implement this more efficiently
       return getAsMap ().keySet ();
     }
   
  @@ -151,14 +148,12 @@
     //-------------------------------------
     public int size ()
     {
  -    // FIXME - implement this more efficiently
       return getAsMap ().size ();
     }
   
     //-------------------------------------
     public Collection values ()
     {
  -    // FIXME - implement this more efficiently
       return getAsMap ().values ();
     }
   
  
  
  
  1.3       +1 -2      jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/ImplicitObjects.java
  
  Index: ImplicitObjects.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jstl/ImplicitObjects.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ImplicitObjects.java	6 Mar 2002 07:46:48 -0000	1.2
  +++ ImplicitObjects.java	7 Mar 2002 00:41:57 -0000	1.3
  @@ -83,9 +83,8 @@
     // Constants
     //-------------------------------------
   
  -  // FIXME - better attribute name
     static final String sAttributeName = 
  -    "javax.servlet.http.jsp.jstl.ImplicitObjects";
  +    "org.apache.taglibs.standard.ImplicitObjects";
   
     //-------------------------------------
     // Member variables
  
  
  
  1.1                  jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/xml/ExprSupport.java
  
  Index: ExprSupport.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, 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 acknowlegement:  
   *       "This product includes software developed by the 
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Tomcat", 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 names without prior written
   *    permission of the Apache Group.
   *
   * 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 APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON 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.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */ 
  
  package org.apache.taglibs.standard.tag.common.xml;
  
  import javax.servlet.jsp.*;
  import javax.servlet.jsp.tagext.*;
  
  /**
   * <p>Tag handler for &lt;expr&gt; in JSTL's XML library.</p>
   *
   * @author Shawn Bayern
   */
  
  public abstract class ExprSupport extends TagSupport {
  
      //*********************************************************************
      // Internal state
  
      private String select;                       // tag attribute
      protected boolean escapeXml;		 // tag attribute
  
      //*********************************************************************
      // Construction and initialization
  
      /**
       * Constructs a new handler.  As with TagSupport, subclasses should
       * not provide other constructors and are expected to call the
       * superclass constructor.
       */
      public ExprSupport() {
          super();
          init();
      }
  
      // resets local state
      private void init() {
  	select = null;
          escapeXml = true;
      }
  
  
      //*********************************************************************
      // Tag logic
  
      // applies XPath expression from 'select' and prints the result
      public int doStartTag() throws JspException {
          try {
  	    XPathUtil xu = new XPathUtil(pageContext);
  	    String result = xu.valueOf(XPathUtil.getContext(this), select);
  	    org.apache.taglibs.standard.tag.el.core.ExprTag.out(
                pageContext, escapeXml, result);
  	    return SKIP_BODY;
          } catch (java.io.IOException ex) {
  	    throw new JspTagException(ex.toString());
          } catch (org.saxpath.SAXPathException ex) {
  	    throw new JspTagException(ex.toString());
          }
      }
  
      // Releases any resources we may have (or inherit)
      public void release() {
          super.release();
          init();
      }
  
  
      //*********************************************************************
      // Attribute accessors
  
      public void setSelect(String select) {
  	this.select = select;
      }
  }
  
  
  
  1.4       +63 -7     jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/el/core/ExprTag.java
  
  Index: ExprTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/el/core/ExprTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ExprTag.java	4 Feb 2002 02:39:51 -0000	1.3
  +++ ExprTag.java	7 Mar 2002 00:41:57 -0000	1.4
  @@ -64,7 +64,7 @@
   import org.apache.taglibs.standard.resources.Resources;
   
   /**
  - * <p>A handler for the &lt;expr&gt; tag, which simply evalutes and
  + * <p>A handler for the &lt;our&gt; tag, which simply evalutes and
    * prints the result of the expression it's passed.  If the expression
    * fails to complete evaluation successfully because of a
    * javax.servlet.jsp.jstl.core.ExpressionException, or if the result is
  @@ -86,7 +86,9 @@
   
       private String value;                       // tag attribute
       private String def;				// tag attribute
  +    private String escapeXml;			// tag attribute
       private boolean needBody;			// non-space body needed?
  +    private boolean _escapeXml;                 // processed attribute
   
       //*********************************************************************
       // Construction and initialization
  @@ -103,8 +105,9 @@
   
       // resets local state
       private void init() {
  -        value = def = null;
  -	needBody = false;
  +        value = def = escapeXml = null;
  +        needBody = false;
  +        _escapeXml = true;
       }
   
       // Releases any resources we may have (or inherit)
  @@ -122,6 +125,13 @@
         try {
   	Object result;
   
  +        // process the 'escapeXml' attribute if it's been specified
  +        if (escapeXml != null) {
  +            _escapeXml = ((Boolean) ExpressionEvaluatorManager.evaluate(
  +                "escapeXml", escapeXml, Boolean.class, this, pageContext))
  +                .booleanValue();
  +        }
  +
   	// try to evaluate 'value'
   	try {
               result = ExpressionEvaluatorManager.evaluate(
  @@ -132,7 +142,7 @@
   
   	// print value if available; otherwise, try 'default'
   	if (result != null) {
  -	    pageContext.getOut().print(result);
  +            out(pageContext, _escapeXml, result.toString());
   	    return SKIP_BODY;
   	} else {
   	    // if we don't have a 'default' attribute, just go to the body
  @@ -146,11 +156,11 @@
   		"default", def, Object.class, this, pageContext);
   	    if (result != null) {
   		// good 'default'
  -		pageContext.getOut().print(result);
  +                out(pageContext, _escapeXml, result.toString());
   		return SKIP_BODY;
   	    } else {
   		// bad 'default'
  -		throw new NullAttributeException("expr", "default");
  +		throw new NullAttributeException("out", "default");
   	    }
   	}
         } catch (IOException ex) {
  @@ -166,7 +176,7 @@
   
   	// trim and print out the body
   	if (bodyContent != null && bodyContent.getString() != null)
  -	    pageContext.getOut().print(bodyContent.getString().trim());
  +            out(pageContext, _escapeXml, bodyContent.getString().trim());
   	return EVAL_PAGE;
         } catch (IOException ex) {
   	throw new JspException(ex.getMessage(), ex);
  @@ -185,5 +195,51 @@
       // for tag attribute
       public void setDefault(String def) {
           this.def = def;
  +    }
  +
  +    // for tag attribute
  +    public void setEscapeXml(String escapeXml) {
  +        this.escapeXml = escapeXml;
  +    }
  +
  +
  +    //*********************************************************************
  +    // Public utility methods
  +
  +    /**
  +     * Outputs <tt>text</tt> to <tt>pageContext</tt>'s current JspWriter.
  +     * If <tt>escapeXml</tt> is true, performs the following substring
  +     * replacements (to facilitate output to XML/HTML pages):
  +     *
  +     *    & -> &amp;
  +     *    < -> &lt;
  +     *    > -> &gt;
  +     *    " -> &#034;
  +     *    ' -> &#039;
  +     */
  +    public static void out(PageContext pageContext,
  +                           boolean escapeXml,
  +                           String text) throws IOException {
  +        JspWriter w = pageContext.getOut();
  +	if (!escapeXml)
  +            w.print(text);
  +        else {
  +            // avoid needless double-buffering (is this really more efficient?)
  +            for (int i = 0; i < text.length(); i++) {
  +                char c = text.charAt(i);
  +                if (c == '&')
  +                    w.print("&amp;");
  +                else if (c == '<')
  +                    w.print("&lt;");
  +                else if (c == '>')
  +                    w.print("&gt;");
  +                else if (c == '"')
  +                    w.print("&#034;");
  +                else if (c == '\'')
  +                    w.print("&#039;");
  +                else
  +                    w.print(c);
  +            }
  +        }
       }
   }
  
  
  
  1.1                  jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/el/xml/ExprTag.java
  
  Index: ExprTag.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, 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 acknowlegement:  
   *       "This product includes software developed by the 
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Tomcat", 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 names without prior written
   *    permission of the Apache Group.
   *
   * 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 APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON 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.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */ 
  
  package org.apache.taglibs.standard.tag.el.xml;
  
  import javax.servlet.jsp.*;
  import javax.servlet.jsp.tagext.*;
  import org.xml.sax.XMLFilter;
  import org.apache.taglibs.standard.tag.el.core.ExpressionUtil;
  import org.apache.taglibs.standard.tag.common.xml.*;
  import org.apache.taglibs.standard.resources.Resources;
  
  /**
   * <p>A handler for &lt;out&gt; that accepts attributes as Strings
   * and evaluates them as expressions at runtime.</p>
   *
   * @author Shawn Bayern
   */
  public class ExprTag extends ExprTagSupport {
  
      //*********************************************************************
      // 'Private' state (implementation details)
  
      private String escapeXml_;                  // stores EL-based property
  
  
      //*********************************************************************
      // Constructor
  
      /**
       * Constructs a new handler.  As with TagSupport, subclasses
       * should not provide other constructors and are expected to call
       * the superclass constructor
       */
      public ExprTag() {
          super();
          init();
      }
  
  
      //*********************************************************************
      // Tag logic
  
      // evaluates expression and chains to parent
      public int doStartTag() throws JspException {
  
          // evaluate any expressions we were passed, once per invocation
          evaluateExpressions();
  
  	// chain to the parent implementation
  	return super.doStartTag();
      }
  
  
      // Releases any resources we may have (or inherit)
      public void release() {
          super.release();
          init();
      }
  
  
      //*********************************************************************
      // Accessor methods
  
      // for EL-based attribute
      public void setEscapeXml(String escapeXml_) {
          this.escapeXml_ = escapeXml_;
      }
  
  
      //*********************************************************************
      // Private (utility) methods
  
      // (re)initializes state (during release() or construction)
      private void init() {
          // null implies "no expression"
  	escapeXml_ = null;
      }
  
      /* Evaluates expressions as necessary */
      private void evaluateExpressions() throws JspException {
          /* 
           * Note: we don't check for type mismatches here; we assume
           * the expression evaluator will return the expected type
           * (by virtue of knowledge we give it about what that type is).
           * A ClassCastException here is truly unexpected, so we let it
           * propagate up.
           */
  
          if (escapeXml_ != null) {
              Boolean b = (Boolean) ExpressionUtil.evalNotNull(
                  "out",
                  "escapeXml",
                  escapeXml_,
                  Boolean.class,
                  this,
                  pageContext);
              if (b == null)
                  escapeXml = false;
              else
                  escapeXml = b.booleanValue();
          }
      }
  }
  
  
  
  1.1                  jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/rt/xml/ExprTag.java
  
  Index: ExprTag.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, 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 acknowlegement:  
   *       "This product includes software developed by the 
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Tomcat", 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 names without prior written
   *    permission of the Apache Group.
   *
   * 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 APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON 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.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */ 
  
  package org.apache.taglibs.standard.tag.rt.xml;
  
  import javax.servlet.jsp.*;
  import javax.servlet.jsp.tagext.*;
  import org.xml.sax.XMLFilter;
  import org.apache.taglibs.standard.tag.common.xml.*;
  
  /**
   * <p>A handler for &lt;out&gt; that supports rtexprvalue-based
   * attributes.</p>
   *
   * @author Shawn Bayern
   */
  
  public class ExprTag extends ExprSupport {
  
      //*********************************************************************
      // Accessor methods
  
      // for tag attribute
      public void setEscapeXml(boolean escapeXml) {
        this.escapeXml = escapeXml;
      }
  
  }
  
  
  

--
To unsubscribe, e-mail:   <mailto:taglibs-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-dev-help@jakarta.apache.org>


Mime
View raw message