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/tlv JstlBaseTLV.java JstlCoreTLV.java JstlFmtTLV.java JstlXmlTLV.java ScriptFreeTLV.java
Date Mon, 04 Feb 2002 02:39:52 GMT
shawn       02/02/03 18:39:52

  Modified:    standard/conf c-rt.tld c.tld scriptfree.tld x-rt.tld x.tld
               standard/examples/conf web.xml
               standard/examples/src/org/apache/taglibs/jsptl/examples/taglib
                        EvenTag.java OddTag.java UsCustomerTag.java
               standard/examples/web/ecmascript ArrayAccess.jsp
                        StringOperators.jsp
               standard/examples/web/elsupport index.html
               standard/examples/web/iterators Collaboration.jsp
                        DataTypes.jsp Status.jsp
               standard/examples/web/misc IteratorTest.jsp
               standard/examples/web/xml Transform.jsp index.html
               standard/src/javax/servlet/jsp/jstl/core
                        ConditionalTagSupport.java LoopTagStatus.java
                        LoopTagSupport.java
               standard/src/org/apache/taglibs/standard/lang/jpath
                        JPathExpressionEvaluator.java
               standard/src/org/apache/taglibs/standard/lang/jpath/adapter
                        StatusIterationContext.java
               standard/src/org/apache/taglibs/standard/lang/jxpath
                        JXPathExpressionEvaluator.java
               standard/src/org/apache/taglibs/standard/resources
                        Resources.properties
               standard/src/org/apache/taglibs/standard/tag/common/core
                        ForEachSupport.java ForTokensSupport.java
                        ImportSupport.java ParamSupport.java
                        URLEncodeSupport.java
               standard/src/org/apache/taglibs/standard/tag/common/xml
                        ForEachTag.java IfTag.java ParamSupport.java
                        ParseSupport.java SetTag.java TransformSupport.java
               standard/src/org/apache/taglibs/standard/tag/el/core
                        ExprTag.java ForEachTag.java ForTokensTag.java
                        IfTag.java SetTag.java
               standard/src/org/apache/taglibs/standard/tag/el/xml
                        ParseTag.java TransformTag.java
               standard/src/org/apache/taglibs/standard/tag/rt/core
                        ForEachTag.java ForTokensTag.java
               standard/src/org/apache/taglibs/standard/tag/rt/xml
                        ParseTag.java TransformTag.java
               standard/src/org/apache/taglibs/standard/tei
                        XmlTransformTEI.java
               standard/src/org/apache/taglibs/standard/tlv
                        JstlBaseTLV.java JstlCoreTLV.java JstlFmtTLV.java
                        JstlXmlTLV.java
  Added:       standard/examples/web/xml Parse.jsp
               standard/lib LICENSE LICENSE-RHINO
               standard/src/javax/servlet/jsp/jstl/tlv ScriptFreeTLV.java
  Removed:     standard/examples/web/elsupport Declare.jsp
               standard/src/javax/servlet/jsp/jstl/core IteratorTag.java
                        IteratorTagStatus.java IteratorTagSupport.java
               standard/src/org/apache/taglibs/standard/tlv
                        ScriptFreeTLV.java
  Log:
  Very large number of relatively minor changes to bridge between EA3 and
  the Community Draft.  Here are som internal notes from which about 80% of
  these changes were drawn:
  
   * IteratorTag -> LoopTag
   * Make sure everything uses prepare()
   * ConditionalTagSupport has setScope() too
   * <x:if> takes 'var' and 'scope'
   * ConditionalTagSupport.condition() only throws JspTagException
   * Make ScriptFreeTLV (and Preferred?) standard
   * x:set must output Number, String, and Boolean when
     it would currently output an ArrayList with one element
     of any of those three types
   * support output of x:parse as 'source' input for x:transform
     (org.w3c.org.Document type)  -> really just "Node" in general
   * make sure TEI class name for <x:transform> is consistent with TLD
   * <c:param> takes body
   * <x:set> takes 'empty' body in TLD
   * <x:parse> should trim bodycontent
     * domVar -> varDom
     * scopeDom
     * 'var' isn't required; one of domVar or var must be specified
   * <x:transform>: 'xslt' optional
   * make sure <c:forEach> and other NESTED tags are nondestructive
     to their attributes
   * make sure 'var' and 'scope' names are all consistent with new conventions
   * validate: if 'scope' is specified, 'var' must too be specified
      use something like an AttrDependencies Map (actually, it's a one-
      off, so just code it inline in the TLV)
   * <c:urlEncode> supports <c:param>
   * make sure TLDs have correct lists of expression-accepting attributes
   * <x:parse>
      'source' attribute replaced by 'xmlText' and 'xmlUrl'
   * <x:transform>
      'source' attribute replaced by 'xmlText' and 'xmlUrl'
      'xslt'   attribute replaced by 'xsltText' and 'xsltUrl'
  
  Other changes just represent minor bug-fixes and should be unambiguous.
  
  Revision  Changes    Path
  1.3       +8 -40     jakarta-taglibs/standard/conf/c-rt.tld
  
  Index: c-rt.tld
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/conf/c-rt.tld,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- c-rt.tld	21 Nov 2001 16:17:04 -0000	1.2
  +++ c-rt.tld	4 Feb 2002 02:39:49 -0000	1.3
  @@ -31,29 +31,6 @@
     </tag>
   
     <tag>
  -    <name>declare</name>
  -    <tag-class>org.apache.taglibs.standard.tag.common.core.DeclareTag</tag-class>
  -    <tei-class>org.apache.taglibs.standard.tei.DeclareTEI</tei-class>
  -    <body-content>empty</body-content>
  -    <description>
  -        Declares an scripting variable, initially defined by an
  -        existing scoped attribute of the same name.  The type of the
  -        variable defaults to java.lang.Object but can be modified
  -        by using the 'type' attribute.
  -    </description>
  -    <attribute>
  -        <name>id</name>
  -        <required>true</required>
  -        <rtexprvalue>false</rtexprvalue>
  -    </attribute>
  -    <attribute>
  -        <name>type</name>
  -        <required>false</required>
  -        <rtexprvalue>false</rtexprvalue>
  -    </attribute>
  -  </tag>
  -
  -  <tag>
       <name>if</name>
       <tag-class>org.apache.taglibs.standard.tag.rt.core.IfTag</tag-class>
       <body-content>JSP</body-content>
  @@ -73,6 +50,11 @@
           <required>false</required>
           <rtexprvalue>false</rtexprvalue>
       </attribute>
  +    <attribute>
  +        <name>scope</name>
  +        <required>false</required>
  +        <rtexprvalue>false</rtexprvalue>
  +    </attribute>
     </tag>
   
     <tag>
  @@ -149,20 +131,13 @@
   	<rtexprvalue>true</rtexprvalue>
   	<type>int</type>
       </attribute>
  -    <!-- No label in EA2
  -    <attribute>
  -	<name>label</name>
  -	<required>false</required>
  -	<rtexprvalue>false</rtexprvalue>
  -    </attribute>
  -    -->
       <attribute>
   	<name>var</name>
   	<required>false</required>
   	<rtexprvalue>false</rtexprvalue>
       </attribute>
       <attribute>
  -	<name>status</name>
  +	<name>varStatus</name>
   	<required>false</required>
   	<rtexprvalue>false</rtexprvalue>
       </attribute>
  @@ -205,20 +180,13 @@
   	<rtexprvalue>true</rtexprvalue>
   	<type>int</type>
       </attribute>
  -    <!-- No label in EA2
  -    <attribute>
  -	<name>label</name>
  -	<required>false</required>
  -	<rtexprvalue>false</rtexprvalue>
  -    </attribute>
  -    -->
       <attribute>
   	<name>var</name>
   	<required>false</required>
   	<rtexprvalue>false</rtexprvalue>
       </attribute>
       <attribute>
  -	<name>status</name>
  +	<name>varStatus</name>
   	<required>false</required>
   	<rtexprvalue>false</rtexprvalue>
       </attribute>
  @@ -249,7 +217,7 @@
       </attribute>
       <attribute>
           <name>value</name>
  -        <required>true</required>
  +        <required>false</required>
           <rtexprvalue>true</rtexprvalue>
       </attribute>
       <attribute>
  
  
  
  1.3       +12 -40    jakarta-taglibs/standard/conf/c.tld
  
  Index: c.tld
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/conf/c.tld,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- c.tld	21 Nov 2001 16:17:04 -0000	1.2
  +++ c.tld	4 Feb 2002 02:39:49 -0000	1.3
  @@ -31,7 +31,11 @@
   	    forTokens:begin
   	    forTokens:end
   	    forTokens:step
  +	    param:encode
  +	    param:name
  +	    param:value
   	    set:value
  +	    urlEncode:value
   	    when:test
   	</param-value>
   	<description>
  @@ -65,29 +69,6 @@
     </tag>
   
     <tag>
  -    <name>declare</name>
  -    <tag-class>org.apache.taglibs.standard.tag.common.core.DeclareTag</tag-class>
  -    <tei-class>org.apache.taglibs.standard.tei.DeclareTEI</tei-class>
  -    <body-content>empty</body-content>
  -    <description>
  -	Declares an scripting variable, initially defined by an
  -	existing scoped attribute of the same name.  The type of the
  -	variable defaults to java.lang.Object but can be modified
  -	by using the 'type' attribute.
  -    </description>
  -    <attribute>
  -        <name>id</name>
  -        <required>true</required>
  -        <rtexprvalue>false</rtexprvalue>
  -    </attribute>
  -    <attribute>
  -        <name>type</name>
  -        <required>false</required>
  -        <rtexprvalue>false</rtexprvalue>
  -    </attribute>
  -  </tag>
  -
  -  <tag>
       <name>expr</name>
       <tag-class>org.apache.taglibs.standard.tag.el.core.ExprTag</tag-class>
       <body-content>JSP</body-content>
  @@ -144,6 +125,11 @@
           <required>false</required>
           <rtexprvalue>false</rtexprvalue>
       </attribute>
  +    <attribute>
  +        <name>scope</name>
  +        <required>false</required>
  +        <rtexprvalue>false</rtexprvalue>
  +    </attribute>
     </tag>
   
     <tag>
  @@ -216,20 +202,13 @@
   	<required>false</required>
   	<rtexprvalue>false</rtexprvalue>
       </attribute>
  -    <!-- No label in EA2
  -    <attribute>
  -	<name>label</name>
  -	<required>false</required>
  -	<rtexprvalue>false</rtexprvalue>
  -    </attribute>
  -    -->
       <attribute>
   	<name>var</name>
   	<required>false</required>
   	<rtexprvalue>false</rtexprvalue>
       </attribute>
       <attribute>
  -	<name>status</name>
  +	<name>varStatus</name>
   	<required>false</required>
   	<rtexprvalue>false</rtexprvalue>
       </attribute>
  @@ -267,20 +246,13 @@
   	<required>false</required>
   	<rtexprvalue>false</rtexprvalue>
       </attribute>
  -    <!-- No label in EA2
  -    <attribute>
  -	<name>label</name>
  -	<required>false</required>
  -	<rtexprvalue>false</rtexprvalue>
  -    </attribute>
  -    -->
       <attribute>
   	<name>var</name>
   	<required>false</required>
   	<rtexprvalue>false</rtexprvalue>
       </attribute>
       <attribute>
  -	<name>status</name>
  +	<name>varStatus</name>
   	<required>false</required>
   	<rtexprvalue>false</rtexprvalue>
       </attribute>
  @@ -311,7 +283,7 @@
       </attribute>
       <attribute>
           <name>value</name>
  -        <required>true</required>
  +        <required>false</required>
           <rtexprvalue>false</rtexprvalue>
       </attribute>
       <attribute>
  
  
  
  1.2       +2 -2      jakarta-taglibs/standard/conf/scriptfree.tld
  
  Index: scriptfree.tld
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/conf/scriptfree.tld,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- scriptfree.tld	21 Nov 2001 07:34:04 -0000	1.1
  +++ scriptfree.tld	4 Feb 2002 02:39:49 -0000	1.2
  @@ -6,14 +6,14 @@
     <tlib-version>1.0</tlib-version>
     <jsp-version>1.2</jsp-version>
     <short-name>scriptfree</short-name>
  -  <uri>http://jakarta.apache.org/taglibs/jsptl/scriptfree</uri>
  +  <uri>http://jakarta.apache.org/taglibs/standard/scriptfree</uri>
     <description>
       Validates JSP pages to prohibit use of scripting elements.
     </description>
   
     <validator>
       <validator-class>
  -	org.apache.taglibs.standard.tlv.ScriptFreeTLV
  +	javax.servlet.jsp.jstl.tlv.ScriptFreeTLV
       </validator-class>
       <init-param>
         <param-name>allowDeclarations</param-name>
  
  
  
  1.3       +32 -30    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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- x-rt.tld	21 Nov 2001 16:17:04 -0000	1.2
  +++ x-rt.tld	4 Feb 2002 02:39:49 -0000	1.3
  @@ -57,6 +57,16 @@
           <required>true</required>
           <rtexprvalue>false</rtexprvalue>
       </attribute>
  +    <attribute>
  +        <name>var</name>
  +        <required>false</required>
  +        <rtexprvalue>false</rtexprvalue>
  +    </attribute>
  +    <attribute>
  +        <name>scope</name>
  +        <required>false</required>
  +        <rtexprvalue>false</rtexprvalue>
  +    </attribute>
     </tag>
   
     <tag>
  @@ -111,17 +121,18 @@
     <tag>
       <name>parse</name>
       <tag-class>org.apache.taglibs.standard.tag.rt.xml.ParseTag</tag-class>
  +    <tei-class>org.apache.taglibs.standard.tei.XmlParseTEI</tei-class>
       <body-content>JSP</body-content>
       <description>
   	Parses XML content from 'source' attribute or 'body'
       </description>
       <attribute>
           <name>var</name>
  -        <required>true</required>
  +        <required>false</required>
           <rtexprvalue>false</rtexprvalue>
       </attribute>
       <attribute>
  -        <name>domVar</name>
  +        <name>varDom</name>
           <required>false</required>
           <rtexprvalue>false</rtexprvalue>
       </attribute>
  @@ -131,7 +142,17 @@
           <rtexprvalue>false</rtexprvalue>
       </attribute>
       <attribute>
  -        <name>source</name>
  +        <name>scopeDom</name>
  +        <required>false</required>
  +        <rtexprvalue>false</rtexprvalue>
  +    </attribute>
  +    <attribute>
  +        <name>xmlText</name>
  +        <required>false</required>
  +        <rtexprvalue>true</rtexprvalue>
  +    </attribute>
  +    <attribute>
  +        <name>xmlUrl</name>
           <required>false</required>
           <rtexprvalue>true</rtexprvalue>
       </attribute>
  @@ -145,7 +166,7 @@
     <tag>
       <name>set</name>
       <tag-class>org.apache.taglibs.standard.tag.common.xml.SetTag</tag-class>
  -    <body-content>JSP</body-content>
  +    <body-content>empty</body-content>
       <description>
   	Saves the result of an XPath expression evaluation in a 'scope'
       </description>
  @@ -169,11 +190,11 @@
     <tag>
       <name>transform</name>
       <tag-class>org.apache.taglibs.standard.tag.rt.xml.TransformTag</tag-class>
  -    <tei-class>org.apache.taglibs.standard.tei.TransformTEI</tei-class>
  +    <tei-class>org.apache.taglibs.standard.tei.XmlTransformTEI</tei-class>
       <body-content>JSP</body-content>
       <description>
   	Conducts a transformation given a source XML document
  -	and an XSLT stylesheet (or Transformer object)
  +	and an XSLT stylesheet
       </description>
       <attribute>
           <name>var</name>
  @@ -191,41 +212,22 @@
           <rtexprvalue>true</rtexprvalue>
       </attribute>
       <attribute>
  -        <name>source</name>
  +        <name>xmlText</name>
           <required>false</required>
           <rtexprvalue>true</rtexprvalue>
       </attribute>
       <attribute>
  -	<name>xslt</name>
  -        <required>true</required>
  -        <rtexprvalue>true</rtexprvalue>
  -    </attribute>
  -    <attribute>
  -        <name>transformer</name>
  +        <name>xmlUrl</name>
           <required>false</required>
           <rtexprvalue>true</rtexprvalue>
       </attribute>
  -  </tag>
  -
  -  <tag>
  -    <name>transformer</name>
  -    <tag-class>org.apache.taglibs.standard.tag.rt.xml.TransformerTag</tag-class>
  -    <body-content>JSP</body-content>
  -    <description>
  -	Exposes a Transformer object
  -    </description>
       <attribute>
  -        <name>var</name>
  -        <required>true</required>
  -        <rtexprvalue>false</rtexprvalue>
  -    </attribute>
  -    <attribute>
  -        <name>scope</name>
  +	<name>xsltText</name>
           <required>false</required>
  -        <rtexprvalue>false</rtexprvalue>
  +        <rtexprvalue>true</rtexprvalue>
       </attribute>
       <attribute>
  -	<name>xslt</name>
  +	<name>xsltUrl</name>
           <required>false</required>
           <rtexprvalue>true</rtexprvalue>
       </attribute>
  
  
  
  1.3       +37 -34    jakarta-taglibs/standard/conf/x.tld
  
  Index: x.tld
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/conf/x.tld,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- x.tld	21 Nov 2001 16:17:04 -0000	1.2
  +++ x.tld	4 Feb 2002 02:39:49 -0000	1.3
  @@ -17,13 +17,14 @@
       <init-param>
   	<param-name>expressionAttributes</param-name>
   	<param-value>
  -	    parse:source
  +	    parse:xmlText
  +	    parse:xmlUrl
   	    parse:filter
  -	    transform:source
  -	    transform:xslt
  -	    transform:transformer
  +	    transform:xmlText
  +	    transform:xmlUrl
  +	    transform:xsltText
  +	    transform:xsltUrl
   	    transform:result
  -	    transformer:xslt
   	</param-value>
   	<description>
   	    Whitespace-separated list of colon-separated token pairs
  @@ -82,6 +83,16 @@
           <required>true</required>
           <rtexprvalue>false</rtexprvalue>
       </attribute>
  +    <attribute>
  +        <name>var</name>
  +        <required>false</required>
  +        <rtexprvalue>false</rtexprvalue>
  +    </attribute>
  +    <attribute>
  +        <name>scope</name>
  +        <required>false</required>
  +        <rtexprvalue>false</rtexprvalue>
  +    </attribute>
     </tag>
   
     <tag>
  @@ -136,17 +147,18 @@
     <tag>
       <name>parse</name>
       <tag-class>org.apache.taglibs.standard.tag.el.xml.ParseTag</tag-class>
  +    <tei-class>org.apache.taglibs.standard.tei.XmlParseTEI</tei-class>
       <body-content>JSP</body-content>
       <description>
   	Parses XML content from 'source' attribute or 'body'
       </description>
       <attribute>
           <name>var</name>
  -        <required>true</required>
  +        <required>false</required>
           <rtexprvalue>false</rtexprvalue>
       </attribute>
       <attribute>
  -        <name>domVar</name>
  +        <name>varDom</name>
           <required>false</required>
           <rtexprvalue>false</rtexprvalue>
       </attribute>
  @@ -156,7 +168,17 @@
           <rtexprvalue>false</rtexprvalue>
       </attribute>
       <attribute>
  -        <name>source</name>
  +        <name>scopeDom</name>
  +        <required>false</required>
  +        <rtexprvalue>false</rtexprvalue>
  +    </attribute>
  +    <attribute>
  +        <name>xmlText</name>
  +        <required>false</required>
  +        <rtexprvalue>false</rtexprvalue>
  +    </attribute>
  +    <attribute>
  +        <name>xmlUrl</name>
           <required>false</required>
           <rtexprvalue>false</rtexprvalue>
       </attribute>
  @@ -170,7 +192,7 @@
     <tag>
       <name>set</name>
       <tag-class>org.apache.taglibs.standard.tag.common.xml.SetTag</tag-class>
  -    <body-content>JSP</body-content>
  +    <body-content>empty</body-content>
       <description>
   	Saves the result of an XPath expression evaluation in a 'scope'
       </description>
  @@ -194,11 +216,11 @@
     <tag>
       <name>transform</name>
       <tag-class>org.apache.taglibs.standard.tag.el.xml.TransformTag</tag-class>
  -    <tei-class>org.apache.taglibs.standard.tei.TransformTEI</tei-class>
  +    <tei-class>org.apache.taglibs.standard.tei.XmlTransformTEI</tei-class>
       <body-content>JSP</body-content>
       <description>
   	Conducts a transformation given a source XML document
  -	and an XSLT stylesheet (or Transformer object)
  +	and an XSLT stylesheet
       </description>
       <attribute>
           <name>var</name>
  @@ -216,41 +238,22 @@
           <rtexprvalue>false</rtexprvalue>
       </attribute>
       <attribute>
  -        <name>source</name>
  +        <name>xmlText</name>
           <required>false</required>
           <rtexprvalue>false</rtexprvalue>
       </attribute>
       <attribute>
  -	<name>xslt</name>
  +        <name>xmlUrl</name>
           <required>false</required>
           <rtexprvalue>false</rtexprvalue>
       </attribute>
       <attribute>
  -        <name>transformer</name>
  -        <required>false</required>
  -        <rtexprvalue>false</rtexprvalue>
  -    </attribute>
  -  </tag>
  -
  -  <tag>
  -    <name>transformer</name>
  -    <tag-class>org.apache.taglibs.standard.tag.el.xml.TransformerTag</tag-class>
  -    <body-content>JSP</body-content>
  -    <description>
  -	Exposes a Transformer object
  -    </description>
  -    <attribute>
  -        <name>var</name>
  -        <required>true</required>
  -        <rtexprvalue>false</rtexprvalue>
  -    </attribute>
  -    <attribute>
  -        <name>scope</name>
  +	<name>xsltText</name>
           <required>false</required>
           <rtexprvalue>false</rtexprvalue>
       </attribute>
       <attribute>
  -	<name>xslt</name>
  +	<name>xsltUrl</name>
           <required>false</required>
           <rtexprvalue>false</rtexprvalue>
       </attribute>
  
  
  
  1.5       +11 -0     jakarta-taglibs/standard/examples/conf/web.xml
  
  Index: web.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/conf/web.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- web.xml	26 Jan 2002 01:13:04 -0000	1.4
  +++ web.xml	4 Feb 2002 02:39:49 -0000	1.5
  @@ -67,4 +67,15 @@
           <taglib-uri>/jstl-examples-taglib</taglib-uri>
           <taglib-location>/WEB-INF/jstl-examples.tld</taglib-location>
       </taglib>
  +
  +    <taglib>
  +        <taglib-uri>http://jakarta.apache.org/taglibs/standard/scriptfree</taglib-uri>
  +        <taglib-location>/WEB-INF/scriptfree.tld</taglib-location>
  +    </taglib>
  +
  +    <taglib>
  +        <taglib-uri>http://jakarta.apache.org/taglibs/standard/permittedTaglibs</taglib-uri>
  +        <taglib-location>/WEB-INF/permittedTaglibs.tld</taglib-location>
  +    </taglib>
  +
   </web-app>
  
  
  
  1.2       +4 -4      jakarta-taglibs/standard/examples/src/org/apache/taglibs/jsptl/examples/taglib/EvenTag.java
  
  Index: EvenTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/src/org/apache/taglibs/jsptl/examples/taglib/EvenTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EvenTag.java	21 Nov 2001 07:34:24 -0000	1.1
  +++ EvenTag.java	4 Feb 2002 02:39:49 -0000	1.2
  @@ -63,7 +63,7 @@
    * <p>Tag handler for &lt;odd&gt;
    *
    * @author Pierre Delisle
  - * @version $Revision: 1.1 $ $Date: 2001/11/21 07:34:24 $
  + * @version $Revision: 1.2 $ $Date: 2002/02/04 02:39:49 $
    */
   public class EvenTag extends TagSupport {
       
  @@ -71,10 +71,10 @@
       // TagSupport methods
       
       public int doStartTag() throws JspException {
  -        IteratorTag iteratorTag = (IteratorTag)findAncestorWithClass(
  -        this, IteratorTag.class);
  +        LoopTag iteratorTag = (LoopTag)findAncestorWithClass(
  +        this, LoopTag.class);
           if (iteratorTag == null) {
  -            throw new JspTagException("<even> must be nested within an IteratorTag");
  +            throw new JspTagException("<even> must be nested within a LoopTag");
           }
           
           int count = iteratorTag.getIteratorStatus().getCount();
  
  
  
  1.2       +4 -4      jakarta-taglibs/standard/examples/src/org/apache/taglibs/jsptl/examples/taglib/OddTag.java
  
  Index: OddTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/src/org/apache/taglibs/jsptl/examples/taglib/OddTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- OddTag.java	21 Nov 2001 07:34:25 -0000	1.1
  +++ OddTag.java	4 Feb 2002 02:39:49 -0000	1.2
  @@ -63,7 +63,7 @@
    * <p>Tag handler for &lt;odd&gt;
    *
    * @author Pierre Delisle
  - * @version $Revision: 1.1 $ $Date: 2001/11/21 07:34:25 $
  + * @version $Revision: 1.2 $ $Date: 2002/02/04 02:39:49 $
    */
   public class OddTag extends TagSupport {
       
  @@ -71,10 +71,10 @@
       // TagSupport methods
       
       public int doStartTag() throws JspException {
  -        IteratorTag iteratorTag = (IteratorTag)findAncestorWithClass(
  -                this, IteratorTag.class);
  +        LoopTag iteratorTag = (LoopTag)findAncestorWithClass(
  +                this, LoopTag.class);
           if (iteratorTag == null) {
  -            throw new JspTagException("<odd> must be nested within an IteratorTag");
  +            throw new JspTagException("<odd> must be nested within a LoopTag");
           }
           
           int count = iteratorTag.getIteratorStatus().getCount();
  
  
  
  1.2       +13 -9     jakarta-taglibs/standard/examples/src/org/apache/taglibs/jsptl/examples/taglib/UsCustomerTag.java
  
  Index: UsCustomerTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/src/org/apache/taglibs/jsptl/examples/taglib/UsCustomerTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- UsCustomerTag.java	21 Nov 2001 07:34:26 -0000	1.1
  +++ UsCustomerTag.java	4 Feb 2002 02:39:49 -0000	1.2
  @@ -67,7 +67,7 @@
    * <p>Tag handler for &lt;usCustomer&gt;
    *
    * @author Pierre Delisle
  - * @version $Revision: 1.1 $ $Date: 2001/11/21 07:34:26 $
  + * @version $Revision: 1.2 $ $Date: 2002/02/04 02:39:49 $
    */
   public class UsCustomerTag extends ConditionalTagSupport {
       
  @@ -100,14 +100,18 @@
       //*********************************************************************
       // ConditionalTagSupport methods
       
  -    protected boolean condition() throws JspException {
  -        Customer customerObj = (Customer)eval("customer", customer, Customer.class);
  -        if (customerObj == null) {
  -            throw new NullAttributeException("usCustomer", "test");
  -        } else {
  -            System.out.println("country: " + customerObj.getAddress().getCountry());
  -            return (customerObj.getAddress().getCountry().equalsIgnoreCase("USA"));
  -        }
  +    protected boolean condition() throws JspTagException {
  +	try {
  +         Customer customerObj = (Customer)eval("customer", customer, Customer.class);
  +         if (customerObj == null) {
  +             throw new NullAttributeException("usCustomer", "test");
  +         } else {
  +             System.out.println("country: " + customerObj.getAddress().getCountry());
  +             return (customerObj.getAddress().getCountry().equalsIgnoreCase("USA"));
  +         }
  +        } catch (JspException ex) {
  +	 throw new JspTagException(ex.toString());
  +	}
       }
       
       //*********************************************************************
  
  
  
  1.3       +1 -1      jakarta-taglibs/standard/examples/web/ecmascript/ArrayAccess.jsp
  
  Index: ArrayAccess.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/web/ecmascript/ArrayAccess.jsp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ArrayAccess.jsp	24 Jan 2002 00:24:40 -0000	1.2
  +++ ArrayAccess.jsp	4 Feb 2002 02:39:49 -0000	1.3
  @@ -31,7 +31,7 @@
       <th>Array Value</th>
       <th>List Value</th>
     </tr>
  -  <c:forEach var="i" begin="0" end="3" status="status">
  +  <c:forEach var="i" begin="0" end="3" varStatus="status">
       <tr>
         <%-- demonstrating how to use expression to get index --%>
         <td><c:expr value="$i"/></td>
  
  
  
  1.3       +1 -1      jakarta-taglibs/standard/examples/web/ecmascript/StringOperators.jsp
  
  Index: StringOperators.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/web/ecmascript/StringOperators.jsp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- StringOperators.jsp	8 Jan 2002 00:08:22 -0000	1.2
  +++ StringOperators.jsp	4 Feb 2002 02:39:49 -0000	1.3
  @@ -20,7 +20,7 @@
       <th>Name</th>
       <th>Value</th>
     </tr>
  -  <c:forEach var="i" begin="0" end="5" status="status">
  +  <c:forEach var="i" begin="0" end="5" varStatus="status">
       <c:declare id="status" type="javax.servlet.jsp.jstl.core.IteratorTagStatus"/>
       <tr>
         <td>strArray[<c:expr value="$i"/>]</td>
  
  
  
  1.8       +2 -0      jakarta-taglibs/standard/examples/web/elsupport/index.html
  
  Index: index.html
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/web/elsupport/index.html,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- index.html	2 Jan 2002 18:49:29 -0000	1.7
  +++ index.html	4 Feb 2002 02:39:49 -0000	1.8
  @@ -37,6 +37,7 @@
     <a href="../elsupport/Set.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a></h3>
   <p>We set the value of an application scope attribute from the &lt;set&gt; tag 
     body content. This application scope variable is then used in a second JSP page.</p>
  +<!--
   <h3>&lt;declare&gt;&nbsp;&nbsp;<a href="../ShowSource.jsp?filename=/elsupport/Declare.jsp"><img src="../images/code.gif" width="24" height="24" border="0"></a> 
     <a href="../elsupport/Declare.jsp"><img src="../images/execute.gif" width="24" height="24" border="0"></a></h3>
   <p>In order for JSTL tags to collaborate with custom tags that only accept rtexprvalues, 
  @@ -44,6 +45,7 @@
     example, the page attribute created by the &lt;forEach&gt; tag is used in the 
     &lt;declare&gt; tag to export a scripting variable that is then used in custom 
     tag &lt;customerFmt&gt;.</p>
  +-->
   <!-- #EndEditable -->
   <hr noshade color="#000099">
   <table width="100%" border="0" cellpadding="5">
  
  
  
  1.3       +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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Collaboration.jsp	21 Nov 2001 18:55:15 -0000	1.2
  +++ Collaboration.jsp	4 Feb 2002 02:39:49 -0000	1.3
  @@ -12,9 +12,9 @@
   <h4>Without custom tags</h4>
   
   <table>
  -<c:forEach var="customer" items="$customers" status="status">
  +<c:forEach var="customer" items="$customers" varStatus="status">
     <tr>
  -    <c:declare id="status" type="javax.servlet.jsp.jstl.core.IteratorTagStatus"/>
  +    <jsp:useBean type="javax.servlet.jsp.jstl.core.LoopTagStatus" id="status"/>
       <jr:choose>
         <jr:when test="<%= status.getCount() % 2 == 1 %>">
   	    <td bgcolor="#FFFF66">
  
  
  
  1.3       +1 -1      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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DataTypes.jsp	21 Nov 2001 20:55:22 -0000	1.2
  +++ DataTypes.jsp	4 Feb 2002 02:39:49 -0000	1.3
  @@ -28,7 +28,7 @@
   <h4>Properties (Map)</h4>
   
   <c:forEach var="prop" items="$numberMap" begin="1" end="5">
  -  <c:expr value="$prop.key"/> = <jx:expr value="$prop.value"/><br>
  +  <c:expr value="$prop.key"/> = <c:expr value="$prop.value"/><br>
   </c:forEach>
   
   <h4>String (Comma Separated Values)</h4>
  
  
  
  1.4       +2 -2      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.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Status.jsp	21 Nov 2001 20:47:19 -0000	1.3
  +++ Status.jsp	4 Feb 2002 02:39:49 -0000	1.4
  @@ -17,7 +17,7 @@
       <th>first?</th>
       <th>last?</th>
     </tr>
  -  <c:forEach var="customer" items="$customers" status="status">
  +  <c:forEach var="customer" items="$customers" varStatus="status">
       <tr>
         <td><c:expr value="$status.index"/></td>
         <td><c:expr value="$status.count"/></td>
  @@ -36,7 +36,7 @@
   <p>
   
   <h4>Iteration using range attributes</h4>
  -<c:forEach var="i" begin="100" end="200" step="5" status="status">
  +<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; 
  
  
  
  1.2       +2 -2      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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- IteratorTest.jsp	21 Nov 2001 07:34:30 -0000	1.1
  +++ IteratorTest.jsp	4 Feb 2002 02:39:49 -0000	1.2
  @@ -25,7 +25,7 @@
   
   <h4>Iteration with only begin specified (with items): begin="2"</h4>
   
  -<c:forEach var="i" items="$customers" begin="2" status="status">
  +<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>
  @@ -33,7 +33,7 @@
   
   <h4>Iteration with only end specified (with items): end="1"</h4>
   
  -<c:forEach var="i" items="$customers" end="1" status="status">
  +<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>
  
  
  
  1.2       +45 -7     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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Transform.jsp	21 Nov 2001 07:34:31 -0000	1.1
  +++ Transform.jsp	4 Feb 2002 02:39:50 -0000	1.2
  @@ -25,25 +25,63 @@
   </c:set>
   
   Prints "header" as a header:<br />
  -<x:transform source="$xml" xslt="$xsl"/>
  +<x:transform xmlText="$xml" xsltText="$xsl"/>
   
   <hr />
   
   Prints "header" in normal size:<br />
  -<x:transform source="$xml" xslt="$xsl" var="doc"/>
  +<x:transform xmlText="$xml" xsltText="$xsl" var="doc"/>
   <x:expr select="$doc//h1"/>
   
  +<%--
   <hr />
  -
  -Prints "header" as a header again:
  -<x:transformer xslt="$xsl" var="transformer"/>
  -<x:transform source="$xml" transformer="$transformer"/>
  -
  +  Prints "header" as a header again:
  +  <x:transformer xslt="$xsl" var="transformer"/>
  +  <x:transform xmlText="$xml" transformer="$transformer"/>
   <hr />
   
   Prints "Second header" as a header:
   <x:transform transformer="$transformer">
     <blah><blah><blah>Second header</blah></blah></blah>
  +</x:transform>
  +
  +--%>
  +
  +<hr size="5" />
  +
  +<h3>Transformations using URLs</h3>
  +
  +<c:set var="xslt">
  +  <?xml version="1.0"?>
  +  <xsl:stylesheet
  +    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  +
  +  <xsl:template match="text()">
  +    <p><xsl:value-of select="."/></p>
  +  </xsl:template>
  +
  +  </xsl:stylesheet>
  +</c:set>
  +
  +<x:transform xsltText="$xslt" xmlUrl="http://www.cnn.com/cnn.rss" />
  +
  +<hr />
  +<h3>Transformations using output from XPath expressions</h3>
  +
  +<x:parse var="xml" xmlText="$xml" />
  +<x:set var="miniDoc" select="$xml//b" />
  +<x:transform xsltText="$xslt" xmlText="$miniDoc" />
  +<hr />
  +
  +<h3>Inline transformations</h3>
  +
  +<x:transform xsltText="$xslt">
  +  <a>
  +   <b>
  +    <c>Paragraph one!</c>
  +    <c>Paragraph foo!</c>
  +   </b>
  +  </a>
   </x:transform>
   
   </body>
  
  
  
  1.8       +8 -0      jakarta-taglibs/standard/examples/web/xml/index.html
  
  Index: index.html
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/examples/web/xml/index.html,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- index.html	2 Jan 2002 18:49:30 -0000	1.7
  +++ index.html	4 Feb 2002 02:39:50 -0000	1.8
  @@ -43,6 +43,14 @@
   <h3>If &nbsp;&nbsp; <a href="../ShowSource.jsp?filename=/xml/If.jsp"> <img src="../images/code.gif" width="24" height="24" border="0"></a> 
   <a href="If.jsp"> <img src="../images/execute.gif" width="24" height="24" border="0"></a> </h3>
   Basing a decision on the status of an XML document <br />
  +
  +<h3>Parse &nbsp;&nbsp; <a href="../ShowSource.jsp?filename=/xml/Parse.jsp">
  + <img src="../images/code.gif" width="24" height="24" border="0"></a>
  + <a href="Parse.jsp"> <img src="../images/execute.gif" width="24" height="24"
  +    border="0"></a> </h3>
  +  Parsing XML documents directly from Objects and from URLs. <br />
  +
  +
   <h3>Set &nbsp;&nbsp; <a href="../ShowSource.jsp?filename=/xml/Set.jsp"> <img src="../images/code.gif" width="24" height="24" border="0"></a>
   <a href="Set.jsp"> <img src="../images/execute.gif" width="24" height="24" border="0"></a> </h3>
   Storing an object resulting from an XPath expression <br />
  
  
  
  1.1                  jakarta-taglibs/standard/examples/web/xml/Parse.jsp
  
  Index: Parse.jsp
  ===================================================================
  <%@ taglib prefix="c" uri="http://java.sun.com/jstl/ea/core" %>
  <%@ taglib prefix="x" uri="http://java.sun.com/jstl/ea/xml" %>
  
  <html>
  <head>
    <title>JSTL: XML Support -- Parse from Objects and URLs</title>
  </head>
  <body bgcolor="#FFFFFF">
  <h3>Parse from Objects and URLs</h3>
  
  <c:set var="xmlText">
    <a>
     <b>
      <c>
       foo
      </c>
     </b>
     <d>
       bar
     </d>
    </a>
  </c:set>    
  
  <x:parse var="a" xmlText="$xmlText" />
  
  <x:expr select="$a//c"/>
  <x:expr 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"/>"
  
  </body>
  </html>
  
  
  
  1.1                  jakarta-taglibs/standard/lib/LICENSE
  
  Index: LICENSE
  ===================================================================
  Some files in this directory are not the intellectual property of
  the Apache Software Foundation.  They are redistributed under the following
  licenses:
  
  JAR file    Filename containing license information
  ---------------------------------------------------
  jaxen.jar   LICENSE-JAXEN
  js.jar      LICENSE-RHINO
  
  
  
  1.1                  jakarta-taglibs/standard/lib/LICENSE-RHINO
  
  Index: LICENSE-RHINO
  ===================================================================
                            MOZILLA PUBLIC LICENSE
                                  Version 1.1
  
                                ---------------
  
  1. Definitions.
  
       1.0.1. "Commercial Use" means distribution or otherwise making the
       Covered Code available to a third party.
  
       1.1. "Contributor" means each entity that creates or contributes to
       the creation of Modifications.
  
       1.2. "Contributor Version" means the combination of the Original
       Code, prior Modifications used by a Contributor, and the Modifications
       made by that particular Contributor.
  
       1.3. "Covered Code" means the Original Code or Modifications or the
       combination of the Original Code and Modifications, in each case
       including portions thereof.
  
       1.4. "Electronic Distribution Mechanism" means a mechanism generally
       accepted in the software development community for the electronic
       transfer of data.
  
       1.5. "Executable" means Covered Code in any form other than Source
       Code.
  
       1.6. "Initial Developer" means the individual or entity identified
       as the Initial Developer in the Source Code notice required by Exhibit
       A.
  
       1.7. "Larger Work" means a work which combines Covered Code or
       portions thereof with code not governed by the terms of this License.
  
       1.8. "License" means this document.
  
       1.8.1. "Licensable" means having the right to grant, to the maximum
       extent possible, whether at the time of the initial grant or
       subsequently acquired, any and all of the rights conveyed herein.
  
       1.9. "Modifications" means any addition to or deletion from the
       substance or structure of either the Original Code or any previous
       Modifications. When Covered Code is released as a series of files, a
       Modification is:
            A. Any addition to or deletion from the contents of a file
            containing Original Code or previous Modifications.
  
            B. Any new file that contains any part of the Original Code or
            previous Modifications.
  
       1.10. "Original Code" means Source Code of computer software code
       which is described in the Source Code notice required by Exhibit A as
       Original Code, and which, at the time of its release under this
       License is not already Covered Code governed by this License.
  
       1.10.1. "Patent Claims" means any patent claim(s), now owned or
       hereafter acquired, including without limitation,  method, process,
       and apparatus claims, in any patent Licensable by grantor.
  
       1.11. "Source Code" means the preferred form of the Covered Code for
       making modifications to it, including all modules it contains, plus
       any associated interface definition files, scripts used to control
       compilation and installation of an Executable, or source code
       differential comparisons against either the Original Code or another
       well known, available Covered Code of the Contributor's choice. The
       Source Code can be in a compressed or archival form, provided the
       appropriate decompression or de-archiving software is widely available
       for no charge.
  
       1.12. "You" (or "Your")  means an individual or a legal entity
       exercising rights under, and complying with all of the terms of, this
       License or a future version of this License issued under Section 6.1.
       For legal entities, "You" includes any entity which controls, is
       controlled by, or is under common control with You. For purposes of
       this definition, "control" means (a) the power, direct or indirect,
       to cause the direction or management of such entity, whether by
       contract or otherwise, or (b) ownership of more than fifty percent
       (50%) of the outstanding shares or beneficial ownership of such
       entity.
  
  2. Source Code License.
  
       2.1. The Initial Developer Grant.
       The Initial Developer hereby grants You a world-wide, royalty-free,
       non-exclusive license, subject to third party intellectual property
       claims:
            (a)  under intellectual property rights (other than patent or
            trademark) Licensable by Initial Developer to use, reproduce,
            modify, display, perform, sublicense and distribute the Original
            Code (or portions thereof) with or without Modifications, and/or
            as part of a Larger Work; and
  
            (b) under Patents Claims infringed by the making, using or
            selling of Original Code, to make, have made, use, practice,
            sell, and offer for sale, and/or otherwise dispose of the
            Original Code (or portions thereof).
  
            (c) the licenses granted in this Section 2.1(a) and (b) are
            effective on the date Initial Developer first distributes
            Original Code under the terms of this License.
  
            (d) Notwithstanding Section 2.1(b) above, no patent license is
            granted: 1) for code that You delete from the Original Code; 2)
            separate from the Original Code;  or 3) for infringements caused
            by: i) the modification of the Original Code or ii) the
            combination of the Original Code with other software or devices.
  
       2.2. Contributor Grant.
       Subject to third party intellectual property claims, each Contributor
       hereby grants You a world-wide, royalty-free, non-exclusive license
  
            (a)  under intellectual property rights (other than patent or
            trademark) Licensable by Contributor, to use, reproduce, modify,
            display, perform, sublicense and distribute the Modifications
            created by such Contributor (or portions thereof) either on an
            unmodified basis, with other Modifications, as Covered Code
            and/or as part of a Larger Work; and
  
            (b) under Patent Claims infringed by the making, using, or
            selling of  Modifications made by that Contributor either alone
            and/or in combination with its Contributor Version (or portions
            of such combination), to make, use, sell, offer for sale, have
            made, and/or otherwise dispose of: 1) Modifications made by that
            Contributor (or portions thereof); and 2) the combination of
            Modifications made by that Contributor with its Contributor
            Version (or portions of such combination).
  
            (c) the licenses granted in Sections 2.2(a) and 2.2(b) are
            effective on the date Contributor first makes Commercial Use of
            the Covered Code.
  
            (d)    Notwithstanding Section 2.2(b) above, no patent license is
            granted: 1) for any code that Contributor has deleted from the
            Contributor Version; 2)  separate from the Contributor Version;
            3)  for infringements caused by: i) third party modifications of
            Contributor Version or ii)  the combination of Modifications made
            by that Contributor with other software  (except as part of the
            Contributor Version) or other devices; or 4) under Patent Claims
            infringed by Covered Code in the absence of Modifications made by
            that Contributor.
  
  3. Distribution Obligations.
  
       3.1. Application of License.
       The Modifications which You create or to which You contribute are
       governed by the terms of this License, including without limitation
       Section 2.2. The Source Code version of Covered Code may be
       distributed only under the terms of this License or a future version
       of this License released under Section 6.1, and You must include a
       copy of this License with every copy of the Source Code You
       distribute. You may not offer or impose any terms on any Source Code
       version that alters or restricts the applicable version of this
       License or the recipients' rights hereunder. However, You may include
       an additional document offering the additional rights described in
       Section 3.5.
  
       3.2. Availability of Source Code.
       Any Modification which You create or to which You contribute must be
       made available in Source Code form under the terms of this License
       either on the same media as an Executable version or via an accepted
       Electronic Distribution Mechanism to anyone to whom you made an
       Executable version available; and if made available via Electronic
       Distribution Mechanism, must remain available for at least twelve (12)
       months after the date it initially became available, or at least six
       (6) months after a subsequent version of that particular Modification
       has been made available to such recipients. You are responsible for
       ensuring that the Source Code version remains available even if the
       Electronic Distribution Mechanism is maintained by a third party.
  
       3.3. Description of Modifications.
       You must cause all Covered Code to which You contribute to contain a
       file documenting the changes You made to create that Covered Code and
       the date of any change. You must include a prominent statement that
       the Modification is derived, directly or indirectly, from Original
       Code provided by the Initial Developer and including the name of the
       Initial Developer in (a) the Source Code, and (b) in any notice in an
       Executable version or related documentation in which You describe the
       origin or ownership of the Covered Code.
  
       3.4. Intellectual Property Matters
            (a) Third Party Claims.
            If Contributor has knowledge that a license under a third party's
            intellectual property rights is required to exercise the rights
            granted by such Contributor under Sections 2.1 or 2.2,
            Contributor must include a text file with the Source Code
            distribution titled "LEGAL" which describes the claim and the
            party making the claim in sufficient detail that a recipient will
            know whom to contact. If Contributor obtains such knowledge after
            the Modification is made available as described in Section 3.2,
            Contributor shall promptly modify the LEGAL file in all copies
            Contributor makes available thereafter and shall take other steps
            (such as notifying appropriate mailing lists or newsgroups)
            reasonably calculated to inform those who received the Covered
            Code that new knowledge has been obtained.
  
            (b) Contributor APIs.
            If Contributor's Modifications include an application programming
            interface and Contributor has knowledge of patent licenses which
            are reasonably necessary to implement that API, Contributor must
            also include this information in the LEGAL file.
  
                 (c)    Representations.
            Contributor represents that, except as disclosed pursuant to
            Section 3.4(a) above, Contributor believes that Contributor's
            Modifications are Contributor's original creation(s) and/or
            Contributor has sufficient rights to grant the rights conveyed by
            this License.
  
       3.5. Required Notices.
       You must duplicate the notice in Exhibit A in each file of the Source
       Code.  If it is not possible to put such notice in a particular Source
       Code file due to its structure, then You must include such notice in a
       location (such as a relevant directory) where a user would be likely
       to look for such a notice.  If You created one or more Modification(s)
       You may add your name as a Contributor to the notice described in
       Exhibit A.  You must also duplicate this License in any documentation
       for the Source Code where You describe recipients' rights or ownership
       rights relating to Covered Code.  You may choose to offer, and to
       charge a fee for, warranty, support, indemnity or liability
       obligations to one or more recipients of Covered Code. However, You
       may do so only on Your own behalf, and not on behalf of the Initial
       Developer or any Contributor. You must make it absolutely clear than
       any such warranty, support, indemnity or liability obligation is
       offered by You alone, and You hereby agree to indemnify the Initial
       Developer and every Contributor for any liability incurred by the
       Initial Developer or such Contributor as a result of warranty,
       support, indemnity or liability terms You offer.
  
       3.6. Distribution of Executable Versions.
       You may distribute Covered Code in Executable form only if the
       requirements of Section 3.1-3.5 have been met for that Covered Code,
       and if You include a notice stating that the Source Code version of
       the Covered Code is available under the terms of this License,
       including a description of how and where You have fulfilled the
       obligations of Section 3.2. The notice must be conspicuously included
       in any notice in an Executable version, related documentation or
       collateral in which You describe recipients' rights relating to the
       Covered Code. You may distribute the Executable version of Covered
       Code or ownership rights under a license of Your choice, which may
       contain terms different from this License, provided that You are in
       compliance with the terms of this License and that the license for the
       Executable version does not attempt to limit or alter the recipient's
       rights in the Source Code version from the rights set forth in this
       License. If You distribute the Executable version under a different
       license You must make it absolutely clear that any terms which differ
       from this License are offered by You alone, not by the Initial
       Developer or any Contributor. You hereby agree to indemnify the
       Initial Developer and every Contributor for any liability incurred by
       the Initial Developer or such Contributor as a result of any such
       terms You offer.
  
       3.7. Larger Works.
       You may create a Larger Work by combining Covered Code with other code
       not governed by the terms of this License and distribute the Larger
       Work as a single product. In such a case, You must make sure the
       requirements of this License are fulfilled for the Covered Code.
  
  4. Inability to Comply Due to Statute or Regulation.
  
       If it is impossible for You to comply with any of the terms of this
       License with respect to some or all of the Covered Code due to
       statute, judicial order, or regulation then You must: (a) comply with
       the terms of this License to the maximum extent possible; and (b)
       describe the limitations and the code they affect. Such description
       must be included in the LEGAL file described in Section 3.4 and must
       be included with all distributions of the Source Code. Except to the
       extent prohibited by statute or regulation, such description must be
       sufficiently detailed for a recipient of ordinary skill to be able to
       understand it.
  
  5. Application of this License.
  
       This License applies to code to which the Initial Developer has
       attached the notice in Exhibit A and to related Covered Code.
  
  6. Versions of the License.
  
       6.1. New Versions.
       Netscape Communications Corporation ("Netscape") may publish revised
       and/or new versions of the License from time to time. Each version
       will be given a distinguishing version number.
  
       6.2. Effect of New Versions.
       Once Covered Code has been published under a particular version of the
       License, You may always continue to use it under the terms of that
       version. You may also choose to use such Covered Code under the terms
       of any subsequent version of the License published by Netscape. No one
       other than Netscape has the right to modify the terms applicable to
       Covered Code created under this License.
  
       6.3. Derivative Works.
       If You create or use a modified version of this License (which you may
       only do in order to apply it to code which is not already Covered Code
       governed by this License), You must (a) rename Your license so that
       the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
       "MPL", "NPL" or any confusingly similar phrase do not appear in your
       license (except to note that your license differs from this License)
       and (b) otherwise make it clear that Your version of the license
       contains terms which differ from the Mozilla Public License and
       Netscape Public License. (Filling in the name of the Initial
       Developer, Original Code or Contributor in the notice described in
       Exhibit A shall not of themselves be deemed to be modifications of
       this License.)
  
  7. DISCLAIMER OF WARRANTY.
  
       COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
       WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
       WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
       DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
       THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
       IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
       YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
       COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
       OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
       ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
  
  8. TERMINATION.
  
       8.1.  This License and the rights granted hereunder will terminate
       automatically if You fail to comply with terms herein and fail to cure
       such breach within 30 days of becoming aware of the breach. All
       sublicenses to the Covered Code which are properly granted shall
       survive any termination of this License. Provisions which, by their
       nature, must remain in effect beyond the termination of this License
       shall survive.
  
       8.2.  If You initiate litigation by asserting a patent infringement
       claim (excluding declatory judgment actions) against Initial Developer
       or a Contributor (the Initial Developer or Contributor against whom
       You file such action is referred to as "Participant")  alleging that:
  
       (a)  such Participant's Contributor Version directly or indirectly
       infringes any patent, then any and all rights granted by such
       Participant to You under Sections 2.1 and/or 2.2 of this License
       shall, upon 60 days notice from Participant terminate prospectively,
       unless if within 60 days after receipt of notice You either: (i)
       agree in writing to pay Participant a mutually agreeable reasonable
       royalty for Your past and future use of Modifications made by such
       Participant, or (ii) withdraw Your litigation claim with respect to
       the Contributor Version against such Participant.  If within 60 days
       of notice, a reasonable royalty and payment arrangement are not
       mutually agreed upon in writing by the parties or the litigation claim
       is not withdrawn, the rights granted by Participant to You under
       Sections 2.1 and/or 2.2 automatically terminate at the expiration of
       the 60 day notice period specified above.
  
       (b)  any software, hardware, or device, other than such Participant's
       Contributor Version, directly or indirectly infringes any patent, then
       any rights granted to You by such Participant under Sections 2.1(b)
       and 2.2(b) are revoked effective as of the date You first made, used,
       sold, distributed, or had made, Modifications made by that
       Participant.
  
       8.3.  If You assert a patent infringement claim against Participant
       alleging that such Participant's Contributor Version directly or
       indirectly infringes any patent where such claim is resolved (such as
       by license or settlement) prior to the initiation of patent
       infringement litigation, then the reasonable value of the licenses
       granted by such Participant under Sections 2.1 or 2.2 shall be taken
       into account in determining the amount or value of any payment or
       license.
  
       8.4.  In the event of termination under Sections 8.1 or 8.2 above,
       all end user license agreements (excluding distributors and resellers)
       which have been validly granted by You or any distributor hereunder
       prior to termination shall survive termination.
  
  9. LIMITATION OF LIABILITY.
  
       UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
       (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
       DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
       OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
       ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
       CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
       WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
       COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
       INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
       LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
       RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
       PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
       EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
       THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
  
  10. U.S. GOVERNMENT END USERS.
  
       The Covered Code is a "commercial item," as that term is defined in
       48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
       software" and "commercial computer software documentation," as such
       terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
       C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
       all U.S. Government End Users acquire Covered Code with only those
       rights set forth herein.
  
  11. MISCELLANEOUS.
  
       This License represents the complete agreement concerning subject
       matter hereof. If any provision of this License is held to be
       unenforceable, such provision shall be reformed only to the extent
       necessary to make it enforceable. This License shall be governed by
       California law provisions (except to the extent applicable law, if
       any, provides otherwise), excluding its conflict-of-law provisions.
       With respect to disputes in which at least one party is a citizen of,
       or an entity chartered or registered to do business in the United
       States of America, any litigation relating to this License shall be
       subject to the jurisdiction of the Federal Courts of the Northern
       District of California, with venue lying in Santa Clara County,
       California, with the losing party responsible for costs, including
       without limitation, court costs and reasonable attorneys' fees and
       expenses. The application of the United Nations Convention on
       Contracts for the International Sale of Goods is expressly excluded.
       Any law or regulation which provides that the language of a contract
       shall be construed against the drafter shall not apply to this
       License.
  
  12. RESPONSIBILITY FOR CLAIMS.
  
       As between Initial Developer and the Contributors, each party is
       responsible for claims and damages arising, directly or indirectly,
       out of its utilization of rights under this License and You agree to
       work with Initial Developer and Contributors to distribute such
       responsibility on an equitable basis. Nothing herein is intended or
       shall be deemed to constitute any admission of liability.
  
  13. MULTIPLE-LICENSED CODE.
  
       Initial Developer may designate portions of the Covered Code as
       "Multiple-Licensed".  "Multiple-Licensed" means that the Initial
       Developer permits you to utilize portions of the Covered Code under
       Your choice of the NPL or the alternative licenses, if any, specified
       by the Initial Developer in the file described in Exhibit A.
  
  EXHIBIT A -Mozilla Public License.
  
       ``The contents of this file are subject to the Mozilla Public License
       Version 1.1 (the "License"); you may not use this file except in
       compliance with the License. You may obtain a copy of the License at
       http://www.mozilla.org/MPL/
  
       Software distributed under the License is distributed on an "AS IS"
       basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
       License for the specific language governing rights and limitations
       under the License.
  
       The Original Code is ______________________________________.
  
       The Initial Developer of the Original Code is ________________________.
       Portions created by ______________________ are Copyright (C) ______
       _______________________. All Rights Reserved.
  
       Contributor(s): ______________________________________.
  
       Alternatively, the contents of this file may be used under the terms
       of the _____ license (the  "[___] License"), in which case the
       provisions of [______] License are applicable instead of those
       above.  If you wish to allow use of your version of this file only
       under the terms of the [____] License and not to allow others to use
       your version of this file under the MPL, indicate your decision by
       deleting  the provisions above and replace  them with the notice and
       other provisions required by the [___] License.  If you do not delete
       the provisions above, a recipient may use your version of this file
       under either the MPL or the [___] License."
  
       [NOTE: The text of this Exhibit A may differ slightly from the text of
       the notices in the Source Code files of the Original Code. You should
       use the text of this Exhibit A rather than the text found in the
       Original Code Source Code for Your Modifications.]
  
  
  
  
  
  
  1.2       +15 -2     jakarta-taglibs/standard/src/javax/servlet/jsp/jstl/core/ConditionalTagSupport.java
  
  Index: ConditionalTagSupport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/javax/servlet/jsp/jstl/core/ConditionalTagSupport.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ConditionalTagSupport.java	21 Nov 2001 14:25:25 -0000	1.1
  +++ ConditionalTagSupport.java	4 Feb 2002 02:39:50 -0000	1.2
  @@ -93,7 +93,7 @@
        * @return a boolean representing the result of arbitrary logic
        *         that will be used to drive a tag's behavior
        */
  -    protected abstract boolean condition() throws JspException;
  +    protected abstract boolean condition() throws JspTagException;
   
   
       //*********************************************************************
  @@ -140,6 +140,7 @@
   
       private boolean result;             // the saved result of condition()
       private String var;			// scoped attribute name
  +    private int scope;			// scoped attribute scope
   
   
       //*********************************************************************
  @@ -150,6 +151,17 @@
   	this.var = var;
       }
   
  +    // for tag attribute
  +    public void setScope(String scope) {
  +	if (scope.equalsIgnoreCase("request"))
  +	    this.scope = PageContext.REQUEST_SCOPE;
  +	else if (scope.equalsIgnoreCase("session"))
  +	    this.scope = PageContext.SESSION_SCOPE;
  +	else if (scope.equalsIgnoreCase("application"))
  +	    this.scope = PageContext.APPLICATION_SCOPE;
  +	// TODO: Add error handling?  Needs direction from spec.
  +    }
  +
   
       //*********************************************************************
       // Utility methods
  @@ -157,12 +169,13 @@
       // expose attributes if we have a non-null 'var'
       private void exposeVariables() {
           if (var != null)
  -            pageContext.setAttribute(var, new Boolean(result));
  +            pageContext.setAttribute(var, new Boolean(result), scope);
       }
   
       // initializes internal state
       private void init() {
           result = false;                 // not really necessary
   	var = null;
  +	scope = PageContext.PAGE_SCOPE;
       }
   }
  
  
  
  1.2       +0 -10     jakarta-taglibs/standard/src/javax/servlet/jsp/jstl/core/LoopTagStatus.java
  
  Index: LoopTagStatus.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/javax/servlet/jsp/jstl/core/LoopTagStatus.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LoopTagStatus.java	31 Jan 2002 17:37:40 -0000	1.1
  +++ LoopTagStatus.java	4 Feb 2002 02:39:50 -0000	1.2
  @@ -191,14 +191,4 @@
        */
       public int getStep();
   
  -/*-- No labels in EA2
  -    **
  -     * Returns the label of the associated tag.  This label identifies
  -     * this tag (against other LoopTags in a nested chain) primarily
  -     * for the benefit of subtags.
  -     *
  -     * @return the label of the associated tag
  -     *
  -    public String getLabel();
  -*/
   }
  
  
  
  1.2       +70 -88    jakarta-taglibs/standard/src/javax/servlet/jsp/jstl/core/LoopTagSupport.java
  
  Index: LoopTagSupport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/javax/servlet/jsp/jstl/core/LoopTagSupport.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LoopTagSupport.java	31 Jan 2002 17:37:40 -0000	1.1
  +++ LoopTagSupport.java	4 Feb 2002 02:39:50 -0000	1.2
  @@ -80,7 +80,7 @@
    *       of subset parameters for sensibility)
    *  <li> item retrieval (getCurrent())
    *  <li> status retrieval (LoopTagStatus)
  - *  <li> exposing attributes (set by 'var' and 'status' attributes)
  + *  <li> exposing attributes (set by 'var' and 'varStatus' attributes)
    * </ul>
    *
    * <p>In providing support for these tasks, LoopTagSupport contains
  @@ -114,11 +114,6 @@
        * is in the doStartTag() method of an EL-aware subclass.)
        */
   
  -    /*-- No labels in EA2
  -    ** 'label' attribute *
  -    protected String label;
  -    --*/
  -
       /** Starting index ('begin' attribute) */
       protected int begin;
   
  @@ -142,7 +137,7 @@
       protected boolean stepSpecified;
   
       /** Attribute-exposing control */
  -    protected String itemId, statusId /*, itemType */;
  +    protected String itemId, statusId;
   
   
       //*********************************************************************
  @@ -166,12 +161,13 @@
        * a separate 'count' and increment it by 1 each round (as a minor
        * performance improvement).
        */
  -    private LoopTagStatus status;           // our LoopTagStatus
  +    private LoopTagStatus status;               // our LoopTagStatus
       private Object item;                        // the current item
       private int index;                          // the current internal index
       private int count;                          // the iteration count
       private boolean last;                       // current round == last one?
  -
  +    private Object oldItem, oldStatus;		// variables we overwrite
  +    private int oldItemScope, oldStatusScope;	// scopes of these variables
   
       //*********************************************************************
       // Constructor
  @@ -222,7 +218,7 @@
        *
        * @return <tt>true</tt> if there is at least one more item to iterate
        *         over, <tt>false</tt> otherwise
  -     * @exception javax.servlet.jspTagException
  +     * @exception javax.servlet.JspTagException
        * @see #next
        */
       protected abstract boolean hasNext() throws JspTagException;
  @@ -233,7 +229,7 @@
        * Subclasses can assume that prepare() will be called once for
        * each invocation of doStartTag() in the superclass.</p>
        *
  -     * @exception javax.servlet.jspTagException
  +     * @exception javax.servlet.JspTagException
        */
       protected abstract void prepare() throws JspTagException;
   
  @@ -247,7 +243,7 @@
           init();
       }
   
  -    /* Begins iterating by processing the first item. */
  +    // Begins iterating by processing the first item.
       public int doStartTag() throws JspException {
   
           // make sure 'begin' isn't greater than 'end'
  @@ -259,6 +255,35 @@
           count = 1;
           last = false;
   
  +	// save old 'items' and 'status' if applicable
  +	/* (Note that we are somewhat anal-retentive and record the
  +         * scope of the variable we overwrite.  If the container attribute
  +         * truly implements scoped attributes as a single namespace,
  +	 * this may become important.  Ultimately, either findAttribute()
  +	 * will stop at 'page' and this won't make a different, or it
  +	 * will stop at something OTHER than 'page'.  If we find a variable
  +         * outside page scope, we know that there was no variable of the
  +         * same name WITHIN page scope, because of findAttribute()'s
  +         * semantics.  Therefore, if we save this attribute, we know we're
  +         * not missing anything in 'page'.  Thus, we are prepared for a
  +         * container that overwrites a 'session'-scoped attribute on a
  +         * call to setAttribute() to establish a 'page'-scoped attribute -- 
  +         * which I believe is a legal implementation of setAttribute().
  +         * If a user sets a session-scoped variable of the same name as
  +         * itemId or statusId within her <c:forEach> loop, however, this
  +         * could lead to some pretty unusual behavior.  I have opted to
  +         * stick with section JSP2.8.2 of the JSP spec instead of to
  +         * assume a page author will ignore this section.)
  +         */
  +	if (itemId != null) {
  +	    oldItem = pageContext.findAttribute(itemId);
  +	    oldItemScope = pageContext.getAttributesScope(itemId);
  +	}
  +	if (statusId != null) {
  +	    oldStatus = pageContext.findAttribute(statusId);
  +	    oldStatusScope = pageContext.getAttributesScope(statusId);
  +	}
  +
           // let the subclass conduct any necessary preparation
           prepare();
   
  @@ -322,12 +347,8 @@
        */
       public void doFinally() {
   	/*
  -	 * This always gets called, which introduces a minor danger:
  -	 * we might destroy attributes we *didn't* set if an exception
  -	 * stops us before we set those attributes.  However, since our
  -	 * setting of those attributes is destructive anyway (with respect
  -	 * to attributes previously stored under the names we're directed
  -	 * to use), this doesn't seem like a problem.
  +	 * Make sure to un-expose variables, restoring them to their
  +	 * prior values, if applicable.
            */
   	unExposeVariables();
       }
  @@ -416,11 +437,6 @@
               public int getStep() {
                   return (step);
               }
  -	    /*-- No labels in EA2
  -            public String getLabel() {
  -                return (label);
  -            }
  -	    --*/
           }
   
           /*
  @@ -445,64 +461,16 @@
        * two incompatible setters, which is illegal for a JavaBean.
        */
   
  -    /*-- No labels in EA2
  -    // for tag attribute
  -    public void setLabel(String label) {
  -        this.label = label;
  -    }
  -    --*/
  - 
       // for tag attribute
       public void setVar(String id) {
           this.itemId = id;
       }
   
  -    /* NO LONGER NEEDED
  -    // for tag attribute
  -    public void setItemType(String itemType) {
  -        this.itemType = itemType;
  -    }
  -    */
  -
       // for tag attribute
  -    public void setStatus(String statusId) {
  +    public void setVarStatus(String statusId) {
           this.statusId = statusId;
       }
   
  -    //*********************************************************************
  -    // Public static (utility) methods
  -
  -    /*-- No labels in EA2
  -    **
  -     * Locates the nearest ancestor LoopTag with the given label,
  -     * starting at the Tag given as the 'base'.  If label is null, simply
  -     * locates the nearest LoopTag ancestor to 'base'.
  -     *
  -     * @param  base   the Tag at which to start the search (that is, the
  -     *                Tag whose ancestors to search)
  -     * @param  label  the label to search for, or 'null' if any LoopTag
  -     *                is suitable
  -     *
  -     * @return the LoopTag found, or 'null' if no matching LoopTag
  -     * was found
  -     *
  -    public static LoopTag findIteratorAncestorWithLabel(
  -            Tag base, String label) {
  -
  -        // find the first LoopTag ancestor
  -        LoopTag it =
  -            (LoopTag) findAncestorWithClass(base, LoopTag.class);
  -
  -        // if we want a specific label, search for it up the tree
  -        while (it != null && label != null
  -                && !label.equals(it.getIteratorStatus().getLabel())) {
  -            it = (LoopTag) findAncestorWithClass(it, LoopTag.class);
  -        }
  -
  -        // return what we've got (which might be null)
  -        return it;
  -    }
  -    --*/
   
       //*********************************************************************
       // Protected utility methods
  @@ -513,7 +481,7 @@
        * -- e.g., if you set them through an expression language.
        */
   
  -    /*
  +    /**
        * Ensures the "begin" property is sensible, throwing an exception
        * expected to propagate up if it isn't
        */
  @@ -522,7 +490,7 @@
               throw new JspTagException("'begin' < 0");
       }
   
  -    /*
  +    /**
        * Ensures the "end" property is sensible, throwing an exception
        * expected to propagate up if it isn't
        */
  @@ -531,7 +499,7 @@
               throw new JspTagException("'end' < 0");
       }
   
  -    /*
  +    /**
        * Ensures the "step" property is sensible, throwing an exception
        * expected to propagate up if it isn't
        */
  @@ -544,7 +512,7 @@
       //*********************************************************************
       // Private utility methods
   
  -    // (re)initializes state (during release() or construction)
  +    /** (Re)initializes state (during release() or construction) */
       private void init() {
           // defaults for internal bookkeeping
           index = 0;              // internal index always starts at 0
  @@ -555,17 +523,20 @@
           beginSpecified = false; // not specified until it's specified :-)
           endSpecified = false;   // (as above)
           stepSpecified = false;  // (as above)
  +	oldItem = null;		// no page-variable saved
  +	oldStatus = null;	// no page-variable saved
  +	oldItemScope = 0;	// no page-variable saved
  +	oldStatusScope = 0;	// no page-variable saved
   
           // defaults for interface with page author
           begin = 0;              // when not specified, 'begin' is 0 by spec.
           end = -1;               // when not specified, 'end' is not used
           step = 1;               // when not specified, 'step' is 1
           itemId = null;          // when not specified, no variable exported
  -        // itemType = null;        // when not specified, no variable exported
           statusId = null;        // when not specified, no variable exported
       }
   
  -    // sets 'last' appropriately
  +    /** Sets 'last' appropriately. */
       private void calibrateLast() throws JspTagException {
           /*
            * the current round is the last one if (a) there are no remaining
  @@ -575,7 +546,7 @@
               (end != -1 && (begin + index + step > end));
       }
   
  -    /*
  +    /**
        * Exposes attributes (formerly scripting variables, but no longer!)
        * if appropriate.  Note that we don't really care, here, whether they're
        * scripting variables or not.
  @@ -585,7 +556,7 @@
           /*
            * We need to support null items returned from next(); we
            * do this simply by passing such non-items through to the
  -         * scripting variable as 'null' (which we ensure by calling
  +         * scoped variable as effectively 'null' (that is, by calling
            * removeAttribute()).
            *
            * Also, just to be defensive, we handle the case of a null
  @@ -614,15 +585,26 @@
   
       }
   
  -    // removes page attributes if appropriate
  +    /**
  +     * Removes page attributes that we have exposed and, if applicable,
  +     * restores them to their prior values (and scopes).
  +     */
       private void unExposeVariables() {
  -	if (itemId != null)
  -	    pageContext.removeAttribute(itemId, PageContext.PAGE_SCOPE);
  -	if (statusId != null)
  -	    pageContext.removeAttribute(statusId, PageContext.PAGE_SCOPE);
  +	if (itemId != null) {
  +	    if (oldItem == null)
  +	        pageContext.removeAttribute(itemId, PageContext.PAGE_SCOPE);
  +	    else
  +		pageContext.setAttribute(itemId, oldItem, oldItemScope);
  +	}
  +	if (statusId != null) {
  +	    if (oldStatus == null)
  +		pageContext.removeAttribute(statusId, PageContext.PAGE_SCOPE);
  +	    else
  +		pageContext.setAttribute(statusId, oldStatus, oldStatusScope);
  +	}
       }
   
  -    /*
  +    /**
        * Cycles through and discards up to 'n' items from the iteration.
        * We only know "up to 'n'", not "exactly n," since we stop cycling
        * if hasNext() returns false or if we hit the 'end' of the iteration.
  @@ -648,7 +630,7 @@
           index = oldIndex;
       }
   
  -    /*
  +    /**
        * Discards items ignoring subsetting rules.  Useful for discarding
        * items from the beginning (i.e., to implement 'begin') where we
        * don't want factor in the 'begin' value already.
  @@ -658,7 +640,7 @@
   	    next();
       }
   
  -    /*
  +    /**
        * Returns true if the iteration has past the 'end' index (with
        * respect to subsetting), false otherwise.  ('end' must be set
        * for atEnd() to return true; if 'end' is not set, atEnd()
  
  
  
  1.1                  jakarta-taglibs/standard/src/javax/servlet/jsp/jstl/tlv/ScriptFreeTLV.java
  
  Index: ScriptFreeTLV.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 javax.servlet.jsp.jstl.tlv;
  
  import javax.servlet.jsp.tagext.TagLibraryValidator;
  import javax.servlet.jsp.tagext.PageData;
  import javax.servlet.jsp.tagext.ValidationMessage;
  import javax.xml.parsers.SAXParserFactory;
  import javax.xml.parsers.SAXParser;
  import org.xml.sax.Attributes;
  import org.xml.sax.helpers.DefaultHandler;
  import java.io.InputStream;
  import java.util.Map;
  
  import java.io.IOException;
  import org.xml.sax.SAXException;
  import javax.xml.parsers.ParserConfigurationException;
  
  /**
   * <p>A SAX-based TagLibraryValidator for enforcing restrictions against
   * the use of JSP scripting elements.</p>
   * <p>This TLV supports four initialization parameters, for controlling
   * which of the four types of scripting elements are allowed or prohibited:</p>
   * <ul>
   * <li><b>allowDeclarations</b>: if true, indicates that declaration elements
   * are not prohibited.
   * <li><b>allowScriptlets</b>: if true, indicates that scriptlets are not
   * prohibited
   * <li><b>allowExpressions</b>: if true, indicates that top-level expression
   * elements (i.e., expressions not associated with request-time attribute
   * values) are not prohibited.
   * <li><b>allowRTExpressions</b>: if true, indicates that expression elements
   * associated with request-time attribute values are not prohibited.
   * </ul>
   * <p>The default value for all for initialization parameters is false,
   * indicating all forms of scripting elements are to be prohibited.</p>
   * 
   * @author <a href="mailto:mak@taglib.com">Mark A. Kolb</a>
   * @author Shawn Bayern (minor changes)
   */
  public class ScriptFreeTLV extends TagLibraryValidator {
    private boolean allowDeclarations = false;
    private boolean allowScriptlets = false;
    private boolean allowExpressions = false;
    private boolean allowRTExpressions = false;
    private SAXParserFactory factory;
  
    /**
     * Constructs a new validator instance.
     * Initializes the parser factory to create non-validating, namespace-aware
     * SAX parsers.
     */
    public ScriptFreeTLV () {
      factory = SAXParserFactory.newInstance();
      factory.setValidating(false);
      factory.setNamespaceAware(true);
    }
  
    /**
     * Sets the values of the initialization parameters, as supplied in the TLD.
     * @param initParms a mapping from the names of the initialization parameters
     * to their values, as specified in the TLD.
     */
    public void setInitParameters (Map initParms) {
      super.setInitParameters(initParms);
      String declarationsParm = (String) initParms.get("allowDeclarations");
      String scriptletsParm = (String) initParms.get("allowScriptlets");
      String expressionsParm = (String) initParms.get("allowExpressions");
      String rtExpressionsParm = (String) initParms.get("allowRTExpressions");
  
      allowDeclarations = "true".equalsIgnoreCase(declarationsParm);
      allowScriptlets = "true".equalsIgnoreCase(scriptletsParm);
      allowExpressions = "true".equalsIgnoreCase(expressionsParm);
      allowRTExpressions = "true".equalsIgnoreCase(rtExpressionsParm);
    }
  
    /**
     * Validates a single JSP page.
     * @param prefix the namespace prefix specified by the page for the
     * custom tag library being validated.
     * @param uri the URI specified by the page for the TLD of the
     * custom tag library being validated.
     * @param page a wrapper around the XML representation of the page
     * being validated.
     * @returns null, if the page is valid; otherwise, a ValidationMessage[]
     * containing one or more messages indicating why the page is not valid.
     */
    public ValidationMessage[] validate
        (String prefix, String uri, PageData page) {
      InputStream in = null;
      SAXParser parser;
      MyContentHandler handler = new MyContentHandler();
      try {
        synchronized (factory) {
  	parser = factory.newSAXParser();
        }
        in = page.getInputStream();
        parser.parse(in, handler);
      }
      catch (ParserConfigurationException e) {
        return vmFromString(e.getMessage());
      }
      catch (SAXException e) {
        return vmFromString(e.getMessage());
      }
      catch (IOException e) {
        return vmFromString(e.getMessage());
      }
      finally {
        if (in != null) try { in.close(); } catch (IOException e) {}
      }
      return handler.reportResults();
    }
  
    /** 
     * Handler for SAX events. 
     * Four counters are provided as instance variables,
     * for counting occurrences of prohibited scripting elements.
     */
    private class MyContentHandler extends DefaultHandler {
      private int declarationCount = 0;
      private int scriptletCount = 0;
      private int expressionCount = 0;
      private int rtExpressionCount = 0;
  
      /** 
       * This event is received whenever a new element is encountered.
       * The qualified name of each such element is compared against
       * the names of any prohibited scripting elements. When found, the
       * corresponding counter is incremented.
       * If expressions representing request-time attribute values are
       * prohibited, it is also necessary to check the values of all
       * attributes specified by the element. (Trying to figure out
       * which attributes actually support request-time attribute values
       * and checking only those is far more trouble than it's worth.)
       */
      public void startElement (String namespaceUri, 
  			      String localName, String qualifiedName,
  			      Attributes atts) {
        if ((! allowDeclarations)
  	  && qualifiedName.equals("jsp:declaration"))
  	++declarationCount;
        else if ((! allowScriptlets)
  	       && qualifiedName.equals("jsp:scriptlet"))
  	++scriptletCount;
        else if ((! allowExpressions)
  	       && qualifiedName.equals("jsp:expression"))
  	++expressionCount;
        if (! allowRTExpressions) countRTExpressions(atts);
      }
  
      /**
       * Auxiliary method for checking attribute values to see if
       * are specified via request-time attribute values.
       * Expressions representing request-time attribute values are
       * recognized by their "%=" and "%" delimiters. When found, the
       * corresponding counter is incremented.
       */
      private void countRTExpressions (Attributes atts) {
        int stop = atts.getLength();
        for (int i = 0; i < stop; ++i) {
  	String attval = atts.getValue(i);
  	if (attval.startsWith("%=") && attval.endsWith("%"))
  	  ++rtExpressionCount;
        }
      }
  
      /**
       * Constructs a String reporting the number(s) of prohibited
       * scripting elements that were detected, if any.
       * Returns null if no violations were found, making the result
       * of this method suitable for the return value of the
       * TagLibraryValidator.validate() method.
       * 
       * TODO:  The update from 7/13/2001 merely makes this validator
       * compliant with the new TLV API, but does not fully take advantage
       * of this API.  In the future, we should do so... but because
       * of the possibility that anti-script checking will be incorporated
       * into the base TLV, I've held off for now and just changed this
       * class to use the new API.  -- SB.
       */
      public ValidationMessage[] reportResults () {
        if (declarationCount + scriptletCount + expressionCount > 0) {
  	StringBuffer results = new StringBuffer("JSP page contains ");
  	boolean first = true;
  	if (declarationCount > 0) {
  	  results.append(Integer.toString(declarationCount));
  	  results.append(" declaration");
  	  if (declarationCount > 1) results.append('s');
  	  first = false;
  	}
  	if (scriptletCount > 0) {
  	  if (! first) results.append(", ");
  	  results.append(Integer.toString(scriptletCount));
  	  results.append(" scriptlet");
  	  if (scriptletCount > 1) results.append('s');
  	  first = false;
  	}
  	if (expressionCount > 0) {
  	  if (! first) results.append(", ");
  	  results.append(Integer.toString(expressionCount));
  	  results.append(" expression");
  	  if (expressionCount > 1) results.append('s');
  	}
  	if (rtExpressionCount > 0) {
  	  if (! first) results.append(", ");
  	  results.append(Integer.toString(rtExpressionCount));
  	  results.append(" request-time attribute value");
  	  if (rtExpressionCount > 1) results.append('s');
  	}
  	results.append(".");
  	return vmFromString(results.toString());
        } else {
  	return null;
        }
      }
    }
  
  
    // constructs a ValidationMessage[] from a single String and no ID
    private static ValidationMessage[] vmFromString(String message) {
      return new ValidationMessage[] {
        new ValidationMessage(null, message)
      };
    }
  
  }
  
  
  
  1.3       +2 -2      jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jpath/JPathExpressionEvaluator.java
  
  Index: JPathExpressionEvaluator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jpath/JPathExpressionEvaluator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JPathExpressionEvaluator.java	3 Dec 2001 22:57:07 -0000	1.2
  +++ JPathExpressionEvaluator.java	4 Feb 2002 02:39:50 -0000	1.3
  @@ -60,7 +60,7 @@
   import javax.servlet.jsp.*;
   import javax.servlet.jsp.tagext.*; 
   import org.apache.taglibs.standard.lang.support.*;
  -import javax.servlet.jsp.jstl.core.IteratorTag;
  +import javax.servlet.jsp.jstl.core.LoopTag;
   
   
   public class JPathExpressionEvaluator implements ExpressionEvaluator {
  @@ -101,7 +101,7 @@
           Object result = null;
           IterationContext icontext = null;
   
  -        IteratorTag parent = (IteratorTag) TagSupport.findAncestorWithClass(tag, IteratorTag.class);
  +        LoopTag parent = (LoopTag) TagSupport.findAncestorWithClass(tag, LoopTag.class);
           if (parent == null) {
               icontext = null;
           } else {
  
  
  
  1.2       +3 -3      jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jpath/adapter/StatusIterationContext.java
  
  Index: StatusIterationContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jpath/adapter/StatusIterationContext.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StatusIterationContext.java	21 Nov 2001 07:37:15 -0000	1.1
  +++ StatusIterationContext.java	4 Feb 2002 02:39:50 -0000	1.2
  @@ -56,13 +56,13 @@
   package org.apache.taglibs.standard.lang.jpath.adapter;
   
   import org.apache.taglibs.standard.lang.jpath.expression.*;
  -import javax.servlet.jsp.jstl.core.IteratorTagStatus;
  +import javax.servlet.jsp.jstl.core.LoopTagStatus;
   import javax.servlet.jsp.*;
   import java.util.*;
   
   public class StatusIterationContext implements IterationContext {
  -    private IteratorTagStatus status;
  -    public StatusIterationContext(IteratorTagStatus status) {
  +    private LoopTagStatus status;
  +    public StatusIterationContext(LoopTagStatus status) {
           this.status = status;
       }
       public Object getCurrent() {
  
  
  
  1.3       +2 -2      jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jxpath/JXPathExpressionEvaluator.java
  
  Index: JXPathExpressionEvaluator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/lang/jxpath/JXPathExpressionEvaluator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JXPathExpressionEvaluator.java	3 Dec 2001 22:57:07 -0000	1.2
  +++ JXPathExpressionEvaluator.java	4 Feb 2002 02:39:50 -0000	1.3
  @@ -60,7 +60,7 @@
   import javax.servlet.jsp.*;
   import javax.servlet.jsp.tagext.*;
   import org.apache.taglibs.standard.lang.support.*;
  -import javax.servlet.jsp.jstl.core.IteratorTag;
  +import javax.servlet.jsp.jstl.core.LoopTag;
   import java.util.*;
   
   /**
  @@ -102,7 +102,7 @@
               JXPathContext context =
   		JXPathServletContexts.getPageContext(pageContext);
               Object result = null;
  -            if ((tag instanceof IteratorTag) && attributeName.equals("items")) {
  +            if ((tag instanceof LoopTag) && attributeName.equals("items")) {
                   List list = context.eval(expression);
                   if (list.size() == 1)
                       if (list.get(0) instanceof Map)
  
  
  
  1.10      +18 -7     jakarta-taglibs/standard/src/org/apache/taglibs/standard/resources/Resources.properties
  
  Index: Resources.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/resources/Resources.properties,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Resources.properties	31 Jan 2002 22:56:27 -0000	1.9
  +++ Resources.properties	4 Feb 2002 02:39:50 -0000	1.10
  @@ -58,12 +58,12 @@
       Unexpected internal error during &lt;import&gt: \
       Target servlet called getOutputStream(), then getWriter()
   
  -IMPORT_ILLEGAL_GETSTRING=\
  -    Unexpected internal error during &lt;import&gt: \
  -    Target servlet called neither getOutputStream() nor getWriter()
  +#IMPORT_ILLEGAL_GETSTRING=\
  +#    Unexpected internal error during &lt;import&gt: \
  +#    Target servlet called neither getOutputStream() nor getWriter()
   
  -PARAM_OUTSIDE_IMPORT=\
  -    &lt;param&gt; outside &lt;import&gt;
  +PARAM_OUTSIDE_PARENT=\
  +    &lt;param&gt; outside &lt;import&gt; or &lt;urlEncode&gt;
   
   PARAM_ENCODE_BOOLEAN=\
       In &lt;param&gt;, "encode" must be "true" or "false".  Got "{0}" instead.
  @@ -168,6 +168,9 @@
   
   # XML
   
  +FOREACH_NOT_NODESET=\
  +    &lt;forEach&gt; can't iterate over XPath expressions that don't return a node-set
  +
   PARAM_NO_VALUE=\
       &lt;param&gt; needs 'value' attribute or non-whitespace body
   
  @@ -175,7 +178,7 @@
       &lt;param&gt; outside &lt;transform&gt;
   
   PARSE_INVALID_SOURCE=\
  -    Unrecognized object supplied as 'source' attribute to &lt;parse&gt;
  +    Unrecognized object supplied as 'xmlText' attribute to &lt;parse&gt;
   
   PARSE_NO_SAXTRANSFORMER=\
       Filter supplied to &lt;parse&gt;, but default TransformerFactory \
  @@ -185,6 +188,12 @@
       &lt;transform&gt; needs either an 'xslt' attribute or a \
       'transformer' attribute
   
  +TRANSFORM_SOURCE_INVALID_LIST=\
  +    &lt;transform&gt; encountered an invalid java.util.List while processing 'xmlText' attribute.  This error is typically caused if you pass a node-set with more than one node to &lt;transform&gt;'s 'xmlText' attribute.
  +
  +TRANSFORM_SOURCE_UNRECOGNIZED=\
  +    &lt;transform&gt; encountered an unknown type while processing 'xmlText' attribute
  +
   
   #########################################################################
   # JSTL core TLV messages
  @@ -195,7 +204,6 @@
   TLV_PARAMETER_ERROR=\
       Invalid value for {0} validator parameter in TLD
   
  -
   # Generic errors
   
   TLV_ILLEGAL_BODY=\
  @@ -220,3 +228,6 @@
   
   TLV_ILLEGAL_PARAM=\
       Illegal &lt;{0}:{1}&gt; tag within &lt;{0}:{2} {3}="..."&gt;.
  +
  +TLV_DANGLING_SCOPE=\
  +    Illegal 'scope' attribute without 'var' in &lt;{0}&gt;.
  
  
  
  1.2       +20 -26    jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/core/ForEachSupport.java
  
  Index: ForEachSupport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/core/ForEachSupport.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ForEachSupport.java	21 Nov 2001 14:25:25 -0000	1.1
  +++ ForEachSupport.java	4 Feb 2002 02:39:51 -0000	1.2
  @@ -60,12 +60,12 @@
   import javax.servlet.jsp.*;
   import javax.servlet.jsp.tagext.*;
   import java.sql.ResultSet;
  -import javax.servlet.jsp.jstl.core.IteratorTagSupport;
  +import javax.servlet.jsp.jstl.core.LoopTagSupport;
   import org.apache.taglibs.standard.resources.Resources;
   
   /**
    * <p>Support for tag handlers for &lt;forEach&gt;, the core iteration
  - * tag in JSTL 1.0.  This class extends IteratorTagSupport and provides
  + * tag in JSTL 1.0.  This class extends LoopTagSupport and provides
    * ForEach-specific functionality.  The rtexprvalue library and the
    * expression-evaluating library each have handlers that extend this
    * class.</p>
  @@ -73,14 +73,14 @@
    * <p>Localized here is the logic for handling the veritable smorgasbord
    * of types supported by &lt;forEach&gt;, including arrays,
    * Collections, and others.  To see how the actual iteration is controlled,
  - * review the javax.servlet.jsp.jstl.core.IteratorTagSupport class instead.
  + * review the javax.servlet.jsp.jstl.core.LoopTagSupport class instead.
    * </p>
    *
  - * @see javax.servlet.jsp.jstl.core.IteratorTagSupport
  + * @see javax.servlet.jsp.jstl.core.LoopTagSupport
    * @author Shawn Bayern
    */
   
  -public abstract class ForEachSupport extends IteratorTagSupport {
  +public abstract class ForEachSupport extends LoopTagSupport {
   
       //*********************************************************************
       // Implementation overview
  @@ -90,7 +90,7 @@
        * to support the various types that the <forEach> tag handles.  The
        * class is organized around the private ForEachIterator interface,
        * which serves as the basis for relaying information to the iteration
  -     * implementation we inherit from IteratorTagSupport.
  +     * implementation we inherit from LoopTagSupport.
        *
        * We expect to receive our 'items' from one of our subclasses
        * (presumably from the rtexprvalue or expression-evaluating libraries).
  @@ -98,7 +98,7 @@
        * iteration indices, in line with the spec draft.  From doStartTag(),
        * we analyze and 'digest' the data we're passed.  Then, we simply
        * relay items as necessary to the iteration implementation that
  -     * we inherit from IteratorTagSupport.
  +     * we inherit from LoopTagSupport.
        */
   
   
  @@ -155,6 +155,8 @@
       //*********************************************************************
       // Iteration control methods (based on processed 'items' object)
   
  +    // (We inherit semantics and Javadoc from LoopTagSupport.)
  +
       protected boolean hasNext() throws JspTagException {
           return items.hasNext();
       }
  @@ -163,23 +165,7 @@
           return items.next();
       }
   
  -
  -    //*********************************************************************
  -    // Tag logic and lifecycle management
  -
  -    // Releases any resources we may have (or inherit)
  -    public void release() {
  -        super.release();
  -        items = null;
  -        rawItems = null;
  -    }
  -
  -    /*
  -     * Produces and stores an appropriate ForEachIterator and performs
  -     * some custom checks, then defers to the parent's implementation.
  -     */
  -    public int doStartTag() throws JspException {
  -
  +    protected void prepare() throws JspTagException {
           // produce the right sort of ForEachIterator
           if (rawItems != null) {
               // extract an iterator over the 'items' we've got
  @@ -193,9 +179,17 @@
           if (rawItems instanceof ResultSet && step != 1)
               throw new JspTagException(
   		Resources.getMessage("FOREACH_STEP_NO_RESULTSET"));
  +    }
  +
  +
  +    //*********************************************************************
  +    // Tag logic and lifecycle management
   
  -        // now we're ready...
  -        return super.doStartTag();
  +    // Releases any resources we may have (or inherit)
  +    public void release() {
  +        super.release();
  +        items = null;
  +        rawItems = null;
       }
   
   
  
  
  
  1.2       +13 -11    jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/core/ForTokensSupport.java
  
  Index: ForTokensSupport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/core/ForTokensSupport.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ForTokensSupport.java	21 Nov 2001 14:25:25 -0000	1.1
  +++ ForTokensSupport.java	4 Feb 2002 02:39:51 -0000	1.2
  @@ -59,20 +59,20 @@
   import javax.servlet.*;
   import javax.servlet.jsp.*;
   import javax.servlet.jsp.tagext.*;
  -import javax.servlet.jsp.jstl.core.IteratorTagSupport;
  +import javax.servlet.jsp.jstl.core.LoopTagSupport;
   
   /**
    * <p>Support for tag handlers for &lt;forTokens&gt;, the tokenizing
  - * iteration tag in JSTL 1.0.  This class extends IteratorTagSupport and
  + * iteration tag in JSTL 1.0.  This class extends LoopTagSupport and
    * provides ForTokens-specific functionality.  The rtexprvalue and
    * expression-evaluating libraries each have handlers that extend this
    * class.</p>
    *
  - * @see javax.servlet.jsp.jstl.core.IteratorTagSupport
  + * @see javax.servlet.jsp.jstl.core.LoopTagSupport
    * @author Shawn Bayern
    */
   
  -public abstract class ForTokensSupport extends IteratorTagSupport {
  +public abstract class ForTokensSupport extends LoopTagSupport {
   
       //*********************************************************************
       // Implementation overview
  @@ -97,7 +97,14 @@
       //*********************************************************************
       // Iteration control methods
   
  -    /* These just use the StringTokenizer we've created. */
  +    /*
  +     * These just create and use a StringTokenizer.
  +     * We inherit semantics and Javadoc from LoopTagSupport.
  +     */
  +
  +    protected void prepare() throws JspTagException {
  +      st = new StringTokenizer(items, delims);
  +    }
   
       protected boolean hasNext() throws JspTagException {
           return st.hasMoreElements();
  @@ -109,13 +116,8 @@
   
   
       //*********************************************************************
  -    // Tag logic
  +    // Tag logic and lifecycle management
   
  -    // constructs our StringTokenizer and then defers to parent
  -    public int doStartTag() throws JspException {
  -        st = new StringTokenizer(items, delims);
  -        return super.doStartTag();
  -    }
   
       // Releases any resources we may have (or inherit)
       public void release() {
  
  
  
  1.4       +2 -10     jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/core/ImportSupport.java
  
  Index: ImportSupport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/core/ImportSupport.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ImportSupport.java	4 Jan 2002 01:39:24 -0000	1.3
  +++ ImportSupport.java	4 Feb 2002 02:39:51 -0000	1.4
  @@ -73,7 +73,7 @@
    */
   
   public abstract class ImportSupport extends BodyTagSupport 
  -        implements TryCatchFinally {
  +        implements TryCatchFinally, ParamParent {
   
       //*********************************************************************
       // Public constants
  @@ -229,15 +229,7 @@
       //*********************************************************************
       // Collaboration with subtags
   
  -    /**
  -     * Adds a parameter to this tag's URL.  The intent is that the
  -     * &lt;param&gt; subtag will call this to register URL parameters.
  -     * Assumes that 'name' and 'value' are appropriately encoded and do
  -     * not contain any meaningful metacharacters; in order words, escaping
  -     * is the responsibility of the caller.
  -     *
  -     * @see ParamSupport
  -     */
  +    // inherit Javadoc
       public void addParameter(String name, String value) {
   	// copy base url since we don't want to modify it
   	// (it might be an attribute)
  
  
  
  1.2       +14 -7     jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/core/ParamSupport.java
  
  Index: ParamSupport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/core/ParamSupport.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ParamSupport.java	21 Nov 2001 14:25:25 -0000	1.1
  +++ ParamSupport.java	4 Feb 2002 02:39:51 -0000	1.2
  @@ -64,11 +64,11 @@
    * <p>Support for tag handlers for &lt;param&gt;, the URL parameter
    * subtag for &lt;import&gt; in JSTL 1.0.</p>
    *
  - * @see ImportSupport
  + * @see ParamParent, ImportSupport, URLEncodeSupport
    * @author Shawn Bayern
    */
   
  -public abstract class ParamSupport extends TagSupport {
  +public abstract class ParamSupport extends BodyTagSupport {
   
       //*********************************************************************
       // Protected state
  @@ -95,18 +95,25 @@
       // Tag logic
   
       // simply send our name and value to our parent <import> tag
  -    public int doStartTag() throws JspException {
  -	Tag t = findAncestorWithClass(this, ImportSupport.class);
  +    public int doEndTag() throws JspException {
  +	Tag t = findAncestorWithClass(this, ParamParent.class);
   	if (t == null)
   	    throw new JspTagException(
  -		Resources.getMessage("PARAM_OUTSIDE_IMPORT"));
  -	ImportSupport parent = (ImportSupport) t;
  +		Resources.getMessage("PARAM_OUTSIDE_PARENT"));
  +	ParamParent parent = (ImportSupport) t;
  +	String value = this.value;
  +	if (value == null) {
  +	    if (bodyContent == null || bodyContent.getString() == null)
  +		value = "";
  +	    else
  +		value = bodyContent.getString().trim();
  +	}
   	if (encode) {
   	    parent.addParameter(
   		URLEncoder.encode(name), URLEncoder.encode(value));
   	} else
   	    parent.addParameter(name, value);
  -	return SKIP_BODY;
  +	return EVAL_PAGE;
       }
   
       // Releases any resources we may have (or inherit)
  
  
  
  1.3       +45 -9     jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/core/URLEncodeSupport.java
  
  Index: URLEncodeSupport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/core/URLEncodeSupport.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- URLEncodeSupport.java	21 Nov 2001 16:17:04 -0000	1.2
  +++ URLEncodeSupport.java	4 Feb 2002 02:39:51 -0000	1.3
  @@ -55,6 +55,7 @@
   
   package org.apache.taglibs.standard.tag.common.core;
   
  +import java.util.*;
   import javax.servlet.jsp.*;
   import javax.servlet.jsp.tagext.*;
   import java.net.URLEncoder;
  @@ -67,7 +68,8 @@
    * @author Shawn Bayern
    */
   
  -public abstract class URLEncodeSupport extends BodyTagSupport {
  +public abstract class URLEncodeSupport extends BodyTagSupport
  +    implements ParamParent {
   
       //*********************************************************************
       // Protected state
  @@ -79,6 +81,7 @@
   
       private String var;                          // 'var' attribute
       private int scope;				 // processed 'scope' attr
  +    private Map params;				 // added parameters
   
       //*********************************************************************
       // Constructor and initialization
  @@ -90,6 +93,7 @@
   
       private void init() {
   	value = var = null;
  +	params = null;
   	scope = PageContext.PAGE_SCOPE;
       }
   
  @@ -106,19 +110,51 @@
       }
   
       //*********************************************************************
  +    // Collaboration with subtags
  +
  +    // inherit Javadoc
  +    public void addParameter(String name, String value) {
  +	params.put(name, value);
  +    }
  +
  +    //*********************************************************************
       // Tag logic
   
  +    // resets any parameters that might be sent
  +    public int doStartTag() throws JspException {
  +	params = new HashMap();
  +	return EVAL_BODY_BUFFERED;
  +    }
  +
       // gets the right value, encodes it, and prints or stores it
       public int doEndTag() throws JspException {
  -	String operand = null;
  +	String operand = value;
   	// get operand from 'value' attribute or our body, as appropriate
  -        if (value != null)
  -	    operand = value;
  -	else {
  -	    String bcs = getBodyContent().getString();
  -	    if (bcs == null || (operand = bcs.trim()).equals(""))
  -		throw new JspTagException(
  -		    Resources.getMessage("URLENCODE_NO_VALUE"));
  +        if (operand  == null) {
  +            if (bodyContent == null || bodyContent.getString() == null)
  +                operand = "";
  +            else
  +                operand = bodyContent.getString().trim();
  +        }
  +
  +	// add parameters
  +	if (params != null) {
  +	    // produce a StringBuffer containing all the parameters
  +	    StringBuffer paramString = new StringBuffer();
  +	    Iterator i = params.entrySet().iterator();
  +	    while (i.hasNext()) {
  +		Map.Entry e = (Map.Entry) i.next();
  +		paramString.append(e.getKey() + "=" + e.getValue());
  +		if (i.hasNext())
  +		    paramString.append("&");
  +	    }
  +
  +	    // append these parameters with a '?' or '&', as appropriate
  +            boolean firstParameter = operand.indexOf('?') == -1;
  +            if (firstParameter)
  +		operand += "?" + paramString;
  +            else
  +		operand += "&" + paramString;
   	}
   
   	// encode the input
  
  
  
  1.2       +27 -29    jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/xml/ForEachTag.java
  
  Index: ForEachTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/xml/ForEachTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ForEachTag.java	21 Nov 2001 07:38:53 -0000	1.1
  +++ ForEachTag.java	4 Feb 2002 02:39:51 -0000	1.2
  @@ -59,38 +59,56 @@
   import javax.servlet.*;
   import javax.servlet.jsp.*;
   import javax.servlet.jsp.tagext.*;
  -import javax.servlet.jsp.jstl.core.IteratorTagSupport;
  +import javax.servlet.jsp.jstl.core.LoopTagSupport;
   import org.apache.taglibs.standard.resources.Resources;
   
   /**
    * <p>Support for the XML library's &lt;forEach&gt; tag.</p>
    *
  - * @see javax.servlet.jsp.jstl.core.IteratorTagSupport
  + * @see javax.servlet.jsp.jstl.core.LoopTagSupport
    * @author Shawn Bayern
    */
  -public class ForEachTag extends IteratorTagSupport {
  +public class ForEachTag extends LoopTagSupport {
   
       //*********************************************************************
       // Private state
   
       private String select;				// tag attribute
       private List nodes;					// XPath result
  -    private int nodesIndex;
  +    private int nodesIndex;				// current index
  +    private org.w3c.dom.Node current;			// current node
   
       //*********************************************************************
       // Iteration control methods
   
  +    // (We inherit semantics and Javadoc from LoopTagSupport.) 
  +
  +    protected void prepare() throws JspTagException {
  +	nodesIndex = 0;
  +        try {
  +            XPathUtil xu = new XPathUtil(pageContext);
  +            nodes = xu.selectNodes(XPathUtil.getContext(this), select);
  +        } catch (org.saxpath.SAXPathException ex) {
  +            throw new JspTagException(ex.toString());
  +        }
  +    }
  +
       protected boolean hasNext() throws JspTagException {
           return (nodesIndex < nodes.size());
       }
   
       protected Object next() throws JspTagException {
  -        return (nodes.get(nodesIndex));
  +	Object o = nodes.get(nodesIndex++);
  +	if (!(o instanceof org.w3c.dom.Node))
  +	    throw new JspTagException(
  +		Resources.getMessage("FOREACH_NOT_NODESET"));
  +	current = (org.w3c.dom.Node) o;
  +        return current;
       }
   
   
       //*********************************************************************
  -    // Tag logic
  +    // Tag logic and lifecycle management
   
       // Releases any resources we may have (or inherit)
       public void release() {
  @@ -98,25 +116,6 @@
           super.release();
       }
   
  -    // Establishes list of context nodes over which to iterate
  -    public int doStartTag() throws JspException {
  -	nodesIndex = 0;
  -        try {
  -            XPathUtil xu = new XPathUtil(pageContext);
  -            nodes = xu.selectNodes(XPathUtil.getContext(this), select);
  -        } catch (org.saxpath.SAXPathException ex) {
  -            throw new JspTagException(ex.toString());
  -        }
  -
  -	// now we're ready
  -	return super.doStartTag();
  -    }
  -
  -    // Increments internal counter
  -    public int doAfterBody() throws JspException {
  -	nodesIndex++;			// insert ourselves & increment counter
  -	return super.doAfterBody();	// chain to parent
  -    }
   
       //*********************************************************************
       // Attribute accessors
  @@ -131,10 +130,8 @@
   
       /* Retrieves the current context. */
       public org.w3c.dom.Node getContext() throws JspTagException {
  -	// in this implementation, it's safe just to call next() to get
  -	// the current node.  This method's just here for abstraction
  -	// and casting.
  -	return ((org.w3c.dom.Node) next());
  +	// expose the current node as the context
  +        return current;
       }
   
   
  @@ -145,6 +142,7 @@
   	select = null;
   	nodes = null;
   	nodesIndex = 0;
  +	current = null;
       }	
   }
   
  
  
  
  1.2       +1 -1      jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/xml/IfTag.java
  
  Index: IfTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/xml/IfTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- IfTag.java	21 Nov 2001 07:38:53 -0000	1.1
  +++ IfTag.java	4 Feb 2002 02:39:51 -0000	1.2
  @@ -87,7 +87,7 @@
       //*********************************************************************
       // Supplied conditional logic
   
  -    protected boolean condition() throws JspException {
  +    protected boolean condition() throws JspTagException {
          try {
               XPathUtil xu = new XPathUtil(pageContext);
               return (xu.booleanValueOf(XPathUtil.getContext(this), select));
  
  
  
  1.3       +5 -5      jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/xml/ParamSupport.java
  
  Index: ParamSupport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/xml/ParamSupport.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ParamSupport.java	12 Dec 2001 02:28:04 -0000	1.2
  +++ ParamSupport.java	4 Feb 2002 02:39:51 -0000	1.3
  @@ -103,11 +103,11 @@
   
   	Object value = this.value;
   	if (value == null) {
  -            String bcs = getBodyContent().getString();
  -            if (bcs == null || (value = bcs.trim()).equals(""))
  -                throw new JspTagException(
  -                    Resources.getMessage("PARAM_NO_VALUE"));
  -	}
  +            if (bodyContent == null || bodyContent.getString() == null)
  +                value = "";
  +            else
  +                value = bodyContent.getString().trim();
  +        }
   	parent.addParameter(name, value);
   	return EVAL_PAGE;
       }
  
  
  
  1.3       +83 -49    jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/xml/ParseSupport.java
  
  Index: ParseSupport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/xml/ParseSupport.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ParseSupport.java	21 Nov 2001 16:17:04 -0000	1.2
  +++ ParseSupport.java	4 Feb 2002 02:39:51 -0000	1.3
  @@ -79,15 +79,17 @@
       //*********************************************************************
       // Protected state
   
  -    protected Object source;                       // 'source' attribute
  +    protected Object xmlText;                      // 'xmlText' attribute
  +    protected String xmlUrl;                       // 'xmlUrl' attribute
       protected XMLFilter filter;			   // 'filter' attribute
   
       //*********************************************************************
       // Private state
   
       private String var;                            // 'var' attribute
  -    private String domVar;			   // 'domVar' attribute
  +    private String varDom;			   // 'varDom' attribute
       private int scope;				   // processed 'scope' attr
  +    private int scopeDom;			   // processed 'scopeDom' attr
   
       // state in support of XML parsing...
       private DocumentBuilderFactory dbf;
  @@ -105,13 +107,16 @@
       }
   
       private void init() {
  -	source = var = null;
  +	var = varDom = null;
  +	xmlText = null;
  +	xmlUrl = null;
   	filter = null;
   	dbf = null;
   	db = null;
   	tf = null;
   	th = null;
   	scope = PageContext.PAGE_SCOPE;
  +	scopeDom = PageContext.PAGE_SCOPE;
       }
   
   
  @@ -140,35 +145,34 @@
               th = stf.newTransformerHandler();
   	}
   
  -	// if we haven't gotten a source, use the body (which may be empty)
  -	Object source = this.source;
  -	if (source == null)
  -	    source = bodyContent.getString();
  -
  -	// now, parse the document into 'd'
  +	// produce a Document by parsing whatever the attributes tell us to use
   	Document d;
  -	if (filter == null) {
  -	    if (source instanceof Reader)
  -	        d = parseReader((Reader)source);
  -	    else if (source instanceof String)
  -		d = parseString((String)source);
  +	Object xmlText = this.xmlText;
  +	if (xmlText == null && xmlUrl == null) {
  +	    // if neither attribute was specified, use the body as 'xmlText'
  +	    if (bodyContent != null && bodyContent.getString() != null)
  +		xmlText = bodyContent.getString().trim();
   	    else
  -		throw new JspTagException(
  -		    Resources.getMessage("PARSE_INVALID_SOURCE"));
  -	} else {
  -	    if (source instanceof Reader)
  -		d = parseReaderWithFilter((Reader)source, filter);
  -	    else if (source instanceof String)
  -		d = parseStringWithFilter((String)source, filter);
  +		xmlText = "";
  +	}
  +	if (xmlUrl != null)
  +	    d = parseURLWithFilter(xmlUrl, filter);
  +	else {
  +	    if (xmlText instanceof String)
  +		d = parseStringWithFilter((String) xmlText, filter);
  +	    else if (xmlText instanceof Reader)
  +		d = parseReaderWithFilter((Reader) xmlText, filter);
   	    else
   		throw new JspTagException(
   		    Resources.getMessage("PARSE_INVALID_SOURCE"));
   	}
   
   	// we've got a Document object; store it out as appropriate
  -	pageContext.setAttribute(var, d, scope);
  -	if (domVar != null)
  -	    pageContext.setAttribute(domVar, d, scope);
  +	// (let any exclusivity or other constraints be enforced by TEI/TLV)
  +	if (var != null)
  +	    pageContext.setAttribute(var, d, scope);
  +	if (varDom != null)
  +	    pageContext.setAttribute(varDom, d, scopeDom);
   
   	return EVAL_PAGE;
         } catch (SAXException ex) {
  @@ -191,34 +195,32 @@
       //*********************************************************************
       // Private utility methods
   
  -    /** Parses the given Reader into a Document. */
  -    private Document parseReader(Reader r) throws SAXException, IOException {
  -        return db.parse(new InputSource(r));
  -    }
  -
  -    /** Parses the given String into a Document. */
  -    private Document parseString(String s) throws SAXException, IOException {
  -        StringReader r = new StringReader(s);
  -        return parseReader(r);
  +    /** Parses the given InputSource after, applying the given XMLFilter. */
  +    private Document parseInputSourceWithFilter(InputSource s, XMLFilter f)
  +            throws SAXException, IOException {
  +	if (f != null) {
  +            // prepare an output Document
  +            Document o = db.newDocument();
  +
  +            // use TrAX to adapt SAX events to a Document object
  +            th.setResult(new DOMResult(o));
  +            XMLReader xr = XMLReaderFactory.createXMLReader();
  +            //   (note that we overwrite the filter's parent.  this seems
  +            //    to be expected usage.  we could cache and reset the old
  +            //    parent, but you can't setParent(null), so this wouldn't
  +            //    be perfect.)
  +            f.setParent(xr);
  +            f.setContentHandler(th);
  +            f.parse(s);
  +            return o;
  +	} else
  +	    return parseInputSource(s);	
       }
   
       /** Parses the given Reader after applying the given XMLFilter. */
       private Document parseReaderWithFilter(Reader r, XMLFilter f)
               throws SAXException, IOException {
  -        // prepare an output Document
  -        Document o = db.newDocument();
  -
  -        // use TrAX to adapt SAX events to a Document object
  -        th.setResult(new DOMResult(o));
  -        XMLReader xr = XMLReaderFactory.createXMLReader();
  -        //   (note that we overwrite the filter's parent.  this seems
  -        //    to be expected usage.  we could cache and reset the old
  -        //    parent, but you can't setParent(null), so this wouldn't
  -        //    be perfect.)
  -        f.setParent(xr);
  -        f.setContentHandler(th);
  -        f.parse(new InputSource(r));
  -        return o;
  +	return parseInputSourceWithFilter(new InputSource(r), f);
       }
   
       /** Parses the given String after applying the given XMLFilter. */
  @@ -228,6 +230,34 @@
           return parseReaderWithFilter(r, f);
       }
   
  +    /** Parses the given Reader after applying the given XMLFilter. */
  +    private Document parseURLWithFilter(String url, XMLFilter f)
  +            throws SAXException, IOException {
  +	return parseInputSourceWithFilter(new InputSource(url), f);
  +    }
  +
  +    /** Parses the given InputSource into a Document. */
  +    private Document parseInputSource(InputSource s)
  +	    throws SAXException, IOException {
  +	return db.parse(s);
  +    }
  +
  +    /** Parses the given Reader into a Document. */
  +    private Document parseReader(Reader r) throws SAXException, IOException {
  +        return parseInputSource(new InputSource(r));
  +    }
  +
  +    /** Parses the given String into a Document. */
  +    private Document parseString(String s) throws SAXException, IOException {
  +        StringReader r = new StringReader(s);
  +        return parseReader(r);
  +    }
  +
  +    /** Parses the URL (passed as a String) into a Document. */
  +    private Document parseURL(String url) throws SAXException, IOException {
  +	return parseInputSource(new InputSource(url));
  +    }
  +
   
       //*********************************************************************
       // Tag attributes
  @@ -236,11 +266,15 @@
   	this.var = var;
       }
   
  -    public void setDomVar(String domVar) {
  -	this.domVar = domVar;
  +    public void setVarDom(String varDom) {
  +	this.varDom = varDom;
       }
   
       public void setScope(String scope) {
   	this.scope = Util.getScope(scope);
  +    }
  +
  +    public void setScopeDom(String scopeDom) {
  +	this.scopeDom = Util.getScope(scopeDom);
       }
   }
  
  
  
  1.3       +15 -2     jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/xml/SetTag.java
  
  Index: SetTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/xml/SetTag.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SetTag.java	21 Nov 2001 16:17:04 -0000	1.2
  +++ SetTag.java	4 Feb 2002 02:39:51 -0000	1.3
  @@ -55,6 +55,7 @@
   
   package org.apache.taglibs.standard.tag.common.xml;
   
  +import java.util.List;
   import javax.servlet.jsp.*;
   import javax.servlet.jsp.tagext.*;
   import org.apache.taglibs.standard.tag.common.core.Util;
  @@ -100,10 +101,22 @@
       // applies XPath expression from 'select' and stores the result in 'var'
       public int doStartTag() throws JspException {
           try {
  +	    // process the query
   	    XPathUtil xu = new XPathUtil(pageContext);
  -	    Object result = 
  +	    List result = 
   		xu.selectNodes(XPathUtil.getContext(this), select);
  -	    pageContext.setAttribute(var, result);
  +	    Object ret = result;
  +
  +	    // unwrap primitive types if that's what we received
  +	    if (result.size() == 1) {
  +	        Object o = result.get(0);
  +	        if (o instanceof String || o instanceof Boolean
  +	                || o instanceof Number)
  +		    ret = o;
  +	    }
  +
  +	    // expose the final result
  +	    pageContext.setAttribute(var, ret, scope);
   	    return SKIP_BODY;
           } catch (org.saxpath.SAXPathException ex) {
   	    throw new JspTagException(ex.toString());
  
  
  
  1.6       +67 -34    jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/xml/TransformSupport.java
  
  Index: TransformSupport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/xml/TransformSupport.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TransformSupport.java	12 Dec 2001 03:14:26 -0000	1.5
  +++ TransformSupport.java	4 Feb 2002 02:39:51 -0000	1.6
  @@ -56,6 +56,7 @@
   package org.apache.taglibs.standard.tag.common.xml;
   
   import java.io.*;
  +import java.util.*;
   import javax.servlet.jsp.*;
   import javax.servlet.jsp.tagext.*;
   import javax.xml.parsers.*;
  @@ -77,9 +78,10 @@
       //*********************************************************************
       // Protected state
   
  -    protected Object source;                       // 'source' attribute
  -    protected Object xslt;			   // 'xslt attribute
  -    protected Transformer transformer;		   // 'transformer' attribute
  +    protected Object xmlText;                       // 'xmlText' attribute
  +    protected String xmlUrl;			    // 'xmlUrl' attribute
  +    protected Object xsltText;			    // 'xsltText' attribute
  +    protected String xsltUrl;			    // 'xsltUrl' attribute
       protected Result result;			   // 'result' attribute
   
       //*********************************************************************
  @@ -101,9 +103,8 @@
       }
   
       private void init() {
  -	source = null;
  -	xslt = null;
  -	transformer = null;
  +	xmlText = xsltText = null;
  +	xmlUrl = xsltUrl = null;
   	var = null;
   	result = null;
   	tf = null;
  @@ -130,18 +131,18 @@
               tf = TransformerFactory.newInstance();
   
   	//************************************
  -	// Determine transformer
  +	// Produce transformer
   
  -	// we can assume only one of 'xslt' or 'transformer' is specified
  -	if (transformer != null)
  -	    t = transformer;
  -	else {
  -	    // assume 'xslt'
  -	    if (xslt == null)
  -		throw new JspTagException(
  -		    Resources.getMessage("TRANSFORM_NO_TRANSFORMER"));
  -	    t = tf.newTransformer(getSource(xslt));
  -	}
  +	// we can assume exactly one of 'xsltText' or 'xsltUrl' is specified
  +	Source s;
  +	if (xsltUrl != null)
  +	    s = getSource(xsltUrl, true);
  +	else if (xsltText != null)
  +	    s = getSource(xsltText, false);
  +	else
  +	    throw new JspTagException(
  +	        Resources.getMessage("TRANSFORM_NO_TRANSFORMER"));
  +        t = tf.newTransformer(s);
   
   	return EVAL_BODY_BUFFERED;
   
  @@ -150,8 +151,8 @@
         }
       }
   
  -    // parse 'source' or body, transform via 'xslt' or 'transformer',
  -    // store as 'var' or 'result'
  +    // parse 'xmlText', 'xmlUrl', or body, transform via our Transformer,
  +    // and store as 'var' or 'result'
       public int doEndTag() throws JspException {
         try {
   
  @@ -166,12 +167,17 @@
   	// Determine source XML
   
   	// if we haven't gotten a source, use the body (which may be empty)
  -	Object source = this.source;
  -	if (source == null)
  -	    source = bodyContent.getString();
  +	Object xml = xmlUrl;
  +	if (xml == null)
  +	    xml = xmlText;
  +	if (xml == null)				// still equal
  +	    if (bodyContent != null && bodyContent.getString() != null)
  +	        xml = bodyContent.getString().trim();
  +	    else
  +		xml = "";
   
   	// let the Source be with you
  -	Source xml = getSource(source);
  +	Source source = getSource(xml, xmlUrl != null);
   
   	//************************************
   	// Conduct the transformation
  @@ -179,12 +185,12 @@
   	// we can assume at most one of 'var' or 'result' is specified
   	if (result != null)
   	    // we can write directly to the Result
  -	    t.transform(xml, result);
  +	    t.transform(source, result);
   	else if (var != null) {
   	    // we need a Document
   	    Document d = db.newDocument();
   	    Result doc = new DOMResult(d);
  -	    t.transform(xml, doc);
  +	    t.transform(source, doc);
   	    pageContext.setAttribute(var, d, scope);
   	} else {
   	 ////
  @@ -202,7 +208,7 @@
   
   	    Result page =
   		new StreamResult(new SafeWriter(pageContext.getOut()));
  -	    t.transform(xml, page);
  +	    t.transform(source, page);
   	}
   
   	return EVAL_PAGE;
  @@ -231,19 +237,46 @@
   
   
       //*********************************************************************
  -    // Public utility methods
  +    // Utility methods for package
   
       /**
        * Retrieves a Source from the given Object, whether it be a String,
  -     * Reader, or Source (the latter of which simply results in an identity).
  -     * A null input results in a null output.
  +     * Reader, Node, or other supported types (even a Source already).
  +     * If 'url' is true, then we must be passed a String and will interpret
  +     * it as a URL.  A null input always results in a null output.
        */
  -    public static Source getSource(Object o) {
  -	if (o == null || o instanceof Source)
  +    static Source getSource(Object o, boolean url) {
  +	if (o == null) {
   	    return null;
  -	if (o instanceof String)
  -	    o = new StringReader((String)o);
  -	return new StreamSource((Reader)o);
  +	}
  +
  +	if (url) {
  +	    return new StreamSource((String) o);
  +	} else {
  +          if (o instanceof Source) {
  +	      return (Source) o;
  +          } else if (o instanceof String) {
  +	      Reader s = new StringReader((String) o);
  +	      return new StreamSource(s);
  +          } else if (o instanceof Reader) {
  +	      return new StreamSource((Reader) o);
  +          } else if (o instanceof Node) {
  +	      return new DOMSource((Node) o);
  +          } else if (o instanceof List) {
  +	      // support 1-item List because our XPath processor outputs them	
  +	      List l = (List) o;
  +	      if (l.size() == 1) {
  +	          return getSource(l.get(0), false);		// unwrap List
  +	      } else {
  +	          throw new IllegalArgumentException(
  +                    Resources.getMessage("TRANSFORM_SOURCE_INVALID_LIST"));
  +	      }
  +          } else {
  +	      throw new IllegalArgumentException(
  +		  Resources.getMessage("TRANSFORM_SOURCE_UNRECOGNIZED")
  +		  + o.getClass());
  +	  }
  +	}
       }
   
   
  
  
  
  1.3       +3 -6      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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ExprTag.java	3 Dec 2001 22:57:07 -0000	1.2
  +++ ExprTag.java	4 Feb 2002 02:39:51 -0000	1.3
  @@ -164,12 +164,9 @@
   	if (!needBody)
   	    return EVAL_PAGE;		// nothing more to do
   
  -	// verify and print out the body
  -        String bcs = getBodyContent().getString();
  -        if (bcs == null || bcs.trim().equals(""))
  -            throw new JspTagException(
  -		Resources.getMessage("EXPR_BAD_VALUE", value));
  -	getBodyContent().writeOut(pageContext.getOut());
  +	// trim and print out the body
  +	if (bodyContent != null && bodyContent.getString() != null)
  +	    pageContext.getOut().print(bodyContent.getString().trim());
   	return EVAL_PAGE;
         } catch (IOException ex) {
   	throw new JspException(ex.getMessage(), ex);
  
  
  
  1.2       +2 -7      jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/el/core/ForEachTag.java
  
  Index: ForEachTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/el/core/ForEachTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ForEachTag.java	21 Nov 2001 14:25:26 -0000	1.1
  +++ ForEachTag.java	4 Feb 2002 02:39:51 -0000	1.2
  @@ -58,7 +58,7 @@
   import java.util.*;
   import javax.servlet.jsp.*;
   import javax.servlet.jsp.tagext.*;
  -import javax.servlet.jsp.jstl.core.IteratorTag;
  +import javax.servlet.jsp.jstl.core.LoopTag;
   import org.apache.taglibs.standard.tag.common.core.*;
   import org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager;
   
  @@ -71,7 +71,7 @@
   
   public class ForEachTag
       extends ForEachSupport
  -    implements IteratorTag, IterationTag
  +    implements LoopTag, IterationTag
   {
   
       //*********************************************************************
  @@ -86,11 +86,6 @@
       //*********************************************************************
       // Constructor
   
  -    /**
  -     * Constructs a new IteratorTagSupport.  As with TagSupport, subclasses
  -     * should not provide other constructors and are expected to call
  -     * the superclass constructor
  -     */
       public ForEachTag() {
           super();
           init();
  
  
  
  1.2       +2 -7      jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/el/core/ForTokensTag.java
  
  Index: ForTokensTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/el/core/ForTokensTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ForTokensTag.java	21 Nov 2001 14:25:26 -0000	1.1
  +++ ForTokensTag.java	4 Feb 2002 02:39:51 -0000	1.2
  @@ -58,7 +58,7 @@
   import java.util.*;
   import javax.servlet.jsp.*;
   import javax.servlet.jsp.tagext.*;
  -import javax.servlet.jsp.jstl.core.IteratorTag;
  +import javax.servlet.jsp.jstl.core.LoopTag;
   import org.apache.taglibs.standard.tag.common.core.*;
   import org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager;
   
  @@ -70,7 +70,7 @@
    */
   public class ForTokensTag
       extends ForTokensSupport
  -    implements IteratorTag, IterationTag
  +    implements LoopTag, IterationTag
   {
   
       //*********************************************************************
  @@ -86,11 +86,6 @@
       //*********************************************************************
       // Constructor
   
  -    /**
  -     * Constructs a new IteratorTagSupport.  As with TagSupport, subclasses
  -     * should not provide other constructors and are expected to call
  -     * the superclass constructor
  -     */
       public ForTokensTag() {
           super();
           init();
  
  
  
  1.2       +11 -7     jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/el/core/IfTag.java
  
  Index: IfTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/el/core/IfTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- IfTag.java	21 Nov 2001 14:25:26 -0000	1.1
  +++ IfTag.java	4 Feb 2002 02:39:51 -0000	1.2
  @@ -55,7 +55,7 @@
   
   package org.apache.taglibs.standard.tag.el.core;
   
  -import javax.servlet.jsp.JspException;
  +import javax.servlet.jsp.*;
   import javax.servlet.jsp.jstl.core.ConditionalTagSupport;
   import org.apache.taglibs.standard.tag.common.core.*;
   import org.apache.taglibs.standard.lang.support.ExpressionEvaluatorManager;
  @@ -90,13 +90,17 @@
       //*********************************************************************
       // Supplied conditional logic
   
  -    protected boolean condition() throws JspException {
  -        Object r = ExpressionEvaluatorManager.evaluate(
  +    protected boolean condition() throws JspTagException {
  +	try {
  +            Object r = ExpressionEvaluatorManager.evaluate(
                   "test", test, Boolean.class, this, pageContext);
  -       if (r == null)
  -            throw new NullAttributeException("if", "test");
  -	else
  -	    return (((Boolean) r).booleanValue());
  +            if (r == null)
  +                throw new NullAttributeException("if", "test");
  +	    else
  +	        return (((Boolean) r).booleanValue());
  +        } catch (JspException ex) {
  +	    throw new JspTagException(ex.toString());
  +	}
       }
   
   
  
  
  
  1.2       +4 -4      jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/el/core/SetTag.java
  
  Index: SetTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/el/core/SetTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SetTag.java	21 Nov 2001 14:25:26 -0000	1.1
  +++ SetTag.java	4 Feb 2002 02:39:51 -0000	1.2
  @@ -130,10 +130,10 @@
   		throw new NullAttributeException("set", "value");
   	} else {
   	    // ... retrieving and trimming our body
  -	    String bcs = getBodyContent().getString();
  -	    if (bcs == null || (result = bcs.trim()).equals(""))
  -		throw new JspTagException(
  -		    Resources.getMessage("SET_NO_VALUE"));
  +	    if (bodyContent == null || bodyContent.getString() == null)
  +		result = "";
  +	    else
  +		result = bodyContent.getString().trim();
   	}
   
   	/*
  
  
  
  1.2       +13 -6     jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/el/xml/ParseTag.java
  
  Index: ParseTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/el/xml/ParseTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ParseTag.java	21 Nov 2001 07:39:07 -0000	1.1
  +++ ParseTag.java	4 Feb 2002 02:39:51 -0000	1.2
  @@ -73,7 +73,8 @@
       //*********************************************************************
       // 'Private' state (implementation details)
   
  -    private String source_;                     // stores EL-based property
  +    private String xmlText_;                    // stores EL-based property
  +    private String xmlUrl_;                     // stores EL-based property
       private String filter_;			// stores EL-based property
   
   
  @@ -120,8 +121,12 @@
           this.filter_ = filter_;
       }
   
  -    public void setSource(String source_) {
  -        this.source_ = source_;
  +    public void setXmlText(String xmlText_) {
  +        this.xmlText_ = xmlText_;
  +    }
  +
  +    public void setXmlUrl(String xmlUrl_) {
  +        this.xmlUrl_ = xmlUrl_;
       }
   
   
  @@ -131,7 +136,7 @@
       // (re)initializes state (during release() or construction)
       private void init() {
           // null implies "no expression"
  -	source_ = filter_ = null;
  +	filter_ = xmlText_ = xmlUrl_ = null;
       }
   
       /* Evaluates expressions as necessary */
  @@ -144,8 +149,10 @@
            * propagate up.
            */
   
  -	source = ExpressionUtil.evalNotNull(
  -	    "parse", "source", source_, Object.class, this, pageContext);
  +	xmlText = ExpressionUtil.evalNotNull(
  +	    "parse", "xmlText", xmlText_, Object.class, this, pageContext);
  +	xmlUrl = (String) ExpressionUtil.evalNotNull(
  +	    "parse", "xmlUrl", xmlUrl_, String.class, this, pageContext);
   	filter = (XMLFilter) ExpressionUtil.evalNotNull(
   	    "parse", "filter", filter_, XMLFilter.class, this, pageContext);
       }
  
  
  
  1.2       +35 -17    jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/el/xml/TransformTag.java
  
  Index: TransformTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/el/xml/TransformTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TransformTag.java	21 Nov 2001 07:39:09 -0000	1.1
  +++ TransformTag.java	4 Feb 2002 02:39:51 -0000	1.2
  @@ -74,9 +74,10 @@
       //*********************************************************************
       // 'Private' state (implementation details)
   
  -    private String source_;                     // stores EL-based property
  -    private String xslt_;			// stores EL-based property
  -    private String transformer_;		// stores EL-based property
  +    private String xmlText_;                    // stores EL-based property
  +    private String xmlUrl_;                     // stores EL-based property
  +    private String xsltText_;			// stores EL-based property
  +    private String xsltUrl_;			// stores EL-based property
       private String result_;			// stores EL-based property
   
   
  @@ -114,21 +115,33 @@
       // Accessor methods
   
       // for EL-based attribute
  -    public void setSource(String source_) {
  -        this.source_ = source_;
  +    public void setXmlText(String xmlText_) {
  +        this.xmlText_ = xmlText_;
       }
   
       // for EL-based attribute
  -    public void setXslt(String xslt_) {
  -        this.xslt_ = xslt_;
  +    public void setXmlUrl(String xmlUrl_) {
  +        this.xmlUrl_ = xmlUrl_;
       }
   
       // for EL-based attribute
  -    public void setTransformer(String transformer_) {
  -        this.transformer_ = transformer_;
  +    public void setXsltText(String xsltText_) {
  +        this.xsltText_ = xsltText_;
       }
   
       // for EL-based attribute
  +    public void setXsltUrl(String xsltUrl_) {
  +        this.xsltUrl_ = xsltUrl_;
  +    }
  +
  +    /* Removed for RI 0.5 
  +     // for EL-based attribute
  +     public void setTransformer(String transformer_) {
  +         this.transformer_ = transformer_;
  +     }
  +    */
  +
  +    // for EL-based attribute
       public void setResult(String result_) {
           this.result_ = result_;
       }
  @@ -140,7 +153,7 @@
       // (re)initializes state (during release() or construction)
       private void init() {
           // null implies "no expression"
  -	source_ = xslt_ = transformer_ = result_ = null;
  +	xmlText_ = xmlUrl = xsltText_ = xsltUrl_ = result_ = null;
       }
   
       /* Evaluates expressions as necessary */
  @@ -153,13 +166,18 @@
            * propagate up.
            */
   
  -	source = ExpressionUtil.evalNotNull(
  -	    "transform", "source", source_, Object.class, this, pageContext);
  -	xslt = ExpressionUtil.evalNotNull(
  -	    "transform", "xslt", xslt_, Object.class, this, pageContext);
  -	transformer = (Transformer) ExpressionUtil.evalNotNull(
  -	    "transform", "transformer", transformer_, Transformer.class,
  -	     this, pageContext);
  +	xmlText = ExpressionUtil.evalNotNull(
  +	    "transform", "xmlText", xmlText_, Object.class, this, pageContext);
  +	xmlUrl = (String) ExpressionUtil.evalNotNull(
  +	    "transform", "xmlUrl", xmlUrl_, String.class, this, pageContext);
  +	xsltText= ExpressionUtil.evalNotNull(
  +	    "transform", "xsltText", xsltText_, Object.class, this,
  +	    pageContext);
  +	xsltUrl = (String) ExpressionUtil.evalNotNull(
  +	    "transform", "xsltUrl", xsltUrl_, String.class, this, pageContext);
  +//	transformer = (Transformer) ExpressionUtil.evalNotNull(
  +//	    "transform", "transformer", transformer_, Transformer.class,
  +//	     this, pageContext);
   	result = (Result) ExpressionUtil.evalNotNull(
   	    "transform", "result", result_, Result.class, this, pageContext);
       }
  
  
  
  1.2       +2 -2      jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/rt/core/ForEachTag.java
  
  Index: ForEachTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/rt/core/ForEachTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ForEachTag.java	21 Nov 2001 14:25:26 -0000	1.1
  +++ ForEachTag.java	4 Feb 2002 02:39:51 -0000	1.2
  @@ -58,7 +58,7 @@
   import java.util.*;
   import javax.servlet.jsp.*;
   import javax.servlet.jsp.tagext.*;
  -import javax.servlet.jsp.jstl.core.IteratorTag;
  +import javax.servlet.jsp.jstl.core.LoopTag;
   import org.apache.taglibs.standard.tag.common.core.*;
   
   /**
  @@ -70,7 +70,7 @@
   
   public class ForEachTag
       extends ForEachSupport
  -    implements IteratorTag, IterationTag
  +    implements LoopTag, IterationTag
   {
   
       //*********************************************************************
  
  
  
  1.2       +2 -2      jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/rt/core/ForTokensTag.java
  
  Index: ForTokensTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/rt/core/ForTokensTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ForTokensTag.java	21 Nov 2001 14:25:26 -0000	1.1
  +++ ForTokensTag.java	4 Feb 2002 02:39:51 -0000	1.2
  @@ -58,7 +58,7 @@
   import java.util.*;
   import javax.servlet.jsp.*;
   import javax.servlet.jsp.tagext.*;
  -import javax.servlet.jsp.jstl.core.IteratorTag;
  +import javax.servlet.jsp.jstl.core.LoopTag;
   import org.apache.taglibs.standard.tag.common.core.*;
   
   /**
  @@ -70,7 +70,7 @@
   
   public class ForTokensTag
       extends ForTokensSupport
  -    implements IteratorTag, IterationTag
  +    implements LoopTag, IterationTag
   {
   
       //*********************************************************************
  
  
  
  1.2       +6 -2      jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/rt/xml/ParseTag.java
  
  Index: ParseTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/rt/xml/ParseTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ParseTag.java	21 Nov 2001 07:38:51 -0000	1.1
  +++ ParseTag.java	4 Feb 2002 02:39:51 -0000	1.2
  @@ -73,8 +73,12 @@
       // Accessor methods
   
       // for tag attribute
  -    public void setSource(Object source) throws JspTagException {
  -        this.source = source;
  +    public void setXmlText(Object xml) throws JspTagException {
  +        this.xmlText = xml;
  +    }
  +
  +    public void setXmlUrl(String url) throws JspTagException {
  +	this.xmlUrl = url;
       }
   
       // for tag attribute
  
  
  
  1.2       +18 -6     jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/rt/xml/TransformTag.java
  
  Index: TransformTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/rt/xml/TransformTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TransformTag.java	21 Nov 2001 07:38:52 -0000	1.1
  +++ TransformTag.java	4 Feb 2002 02:39:51 -0000	1.2
  @@ -74,19 +74,31 @@
       // Accessor methods
   
       // for tag attribute
  -    public void setSource(Object source) throws JspTagException {
  -        this.source = source;
  +    public void setXmlText(Object xmlText) throws JspTagException {
  +        this.xmlText = xmlText;
       }
   
       // for tag attribute
  -    public void setXslt(Object xslt) throws JspTagException {
  -        this.xslt = xslt;
  +    public void setXmlUrl(String xmlUrl) throws JspTagException {
  +        this.xmlUrl = xmlUrl;
       }
   
       // for tag attribute
  -    public void setTransformer(Transformer transformer) throws JspTagException {
  -        this.transformer = transformer;
  +    public void setXsltText(Object xsltText) throws JspTagException {
  +        this.xsltText = xsltText;
       }
  +
  +    // for tag attribute
  +    public void setXsltUrl(String xsltUrl) throws JspTagException {
  +        this.xsltUrl = xsltUrl;
  +    }
  +
  +    /* Removed for RI 0.5
  +     // for tag attribute
  +     public void setTransformer(Transformer transformer) throws JspTagException {
  +         this.transformer = transformer;
  +     }
  +    */
   
       // for tag attribute
       public void setResult(Result result) throws JspTagException {
  
  
  
  1.2       +16 -10    jakarta-taglibs/standard/src/org/apache/taglibs/standard/tei/XmlTransformTEI.java
  
  Index: XmlTransformTEI.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tei/XmlTransformTEI.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XmlTransformTEI.java	21 Nov 2001 07:39:12 -0000	1.1
  +++ XmlTransformTEI.java	4 Feb 2002 02:39:51 -0000	1.2
  @@ -59,25 +59,31 @@
   
   /**
    * <p>An implementation of TagExtraInfo that implements validation for
  - * ForEachTag's attributes</p>
  + * &lt;x:transform&gt;'s attributes</p>
    *
    * @author Shawn Bayern
    */
   public class XmlTransformTEI extends TagExtraInfo {
   
  +    final private static String XML_TEXT = "xmlText";
  +    final private static String XML_URL = "xmlUrl";
  +    final private static String XSLT_TEXT = "xsltText";
  +    final private static String XSLT_URL = "xsltUrl";
       final private static String RESULT = "result";
  -    final private static String TRANSFORMER = "transformer";
       final private static String VAR = "var";
  -    final private static String XSLT = "xslt";
   
  -    /*
  -     * Currently implements the following rules:
  -     * 
  -     * - If 'items' is not specified, 'begin' and 'end' must be
  -     */
       public boolean isValid(TagData us) {
  -	// disallow both XSLT and TRANSFORMER
  -	if (Util.isSpecified(us, XSLT) && Util.isSpecified(us, TRANSFORMER))
  +	// disallow both XML_TEXT and XML_URL
  +	if (Util.isSpecified(us, XML_TEXT) && Util.isSpecified(us, XML_URL))
  +	    return false;
  +
  +	// disallow both XSLT_TEXT and XSLT_URL ...
  +	if (Util.isSpecified(us, XSLT_TEXT) && Util.isSpecified(us, XSLT_URL))
  +	    return false;
  +
  +	// ... but require at least one of XSLT_TEXT or XSLT_URL
  +	if (!(Util.isSpecified(us, XSLT_TEXT)
  +		|| Util.isSpecified(us, XSLT_URL)))
   	    return false;
   
   	// disallow both VAR and RESULT
  
  
  
  1.4       +6 -0      jakarta-taglibs/standard/src/org/apache/taglibs/standard/tlv/JstlBaseTLV.java
  
  Index: JstlBaseTLV.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tlv/JstlBaseTLV.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JstlBaseTLV.java	25 Nov 2001 17:09:40 -0000	1.3
  +++ JstlBaseTLV.java	4 Feb 2002 02:39:52 -0000	1.4
  @@ -92,6 +92,7 @@
       private final String EXP_ATT_PARAM = "expressionAttributes";
   
       // attributes
  +    protected static final String VAR = "var";
       protected static final String SCOPE = "scope";  
   
       //scopes
  @@ -238,6 +239,11 @@
   	    return false;
   
           return true;
  +    }
  +
  +    // returns true if the 'scope' attribute is present without 'var'
  +    protected boolean hasDanglingScope(Attributes a) {
  +	return (a.getValue(SCOPE) != null && a.getValue(VAR) == null);
       }
   
       // retrieves the local part of a QName
  
  
  
  1.8       +2 -0      jakarta-taglibs/standard/src/org/apache/taglibs/standard/tlv/JstlCoreTLV.java
  
  Index: JstlCoreTLV.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tlv/JstlCoreTLV.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- JstlCoreTLV.java	18 Dec 2001 01:53:15 -0000	1.7
  +++ JstlCoreTLV.java	4 Feb 2002 02:39:52 -0000	1.8
  @@ -205,6 +205,8 @@
               if (!hasNoInvalidScope(a))
                   fail(Resources.getMessage("TLV_INVALID_ATTRIBUTE",
                       SCOPE, qn, a.getValue(SCOPE))); 
  +	    if (hasDanglingScope(a))
  +		fail(Resources.getMessage("TLV_DANGLING_SCOPE", qn));
   
   	    // check invariants for <choose>
   	    if (chooseChild()) {
  
  
  
  1.3       +2 -0      jakarta-taglibs/standard/src/org/apache/taglibs/standard/tlv/JstlFmtTLV.java
  
  Index: JstlFmtTLV.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tlv/JstlFmtTLV.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- JstlFmtTLV.java	18 Dec 2001 04:05:54 -0000	1.2
  +++ JstlFmtTLV.java	4 Feb 2002 02:39:52 -0000	1.3
  @@ -208,6 +208,8 @@
               if (!hasNoInvalidScope(a))
                   fail(Resources.getMessage("TLV_INVALID_ATTRIBUTE",
                       SCOPE, qn, a.getValue(SCOPE)));
  +            if (hasDanglingScope(a))
  +                fail(Resources.getMessage("TLV_DANGLING_SCOPE", qn));
   
   	    // check invariants for <message> and <messageFormat>
   	    if (isTag(qn, MESSAGE_ARG) && messageChild()
  
  
  
  1.5       +2 -0      jakarta-taglibs/standard/src/org/apache/taglibs/standard/tlv/JstlXmlTLV.java
  
  Index: JstlXmlTLV.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tlv/JstlXmlTLV.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- JstlXmlTLV.java	8 Dec 2001 22:53:48 -0000	1.4
  +++ JstlXmlTLV.java	4 Feb 2002 02:39:52 -0000	1.5
  @@ -205,6 +205,8 @@
               if (!hasNoInvalidScope(a))
                   fail(Resources.getMessage("TLV_INVALID_ATTRIBUTE",
                       SCOPE, qn, a.getValue(SCOPE)));
  +            if (hasDanglingScope(a))
  +                fail(Resources.getMessage("TLV_DANGLING_SCOPE", qn));
   
   	    // check invariants for <choose>
   	    if (chooseChild()) {
  
  
  

--
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