jstrachan    01/05/07 04:38:28

  Modified:    xtags/conf xtags.tld
               xtags/doc/web xtags.html
               xtags/examples/web hello_rss.jsp much_ado.jsp
                        periodic_table2.jsp simple_rss.jsp xpath_wizard.jsp
               xtags/src/org/apache/taglibs/xtags/tags
                        AbstractXPathTag.java ForEachTag.java
                        ForEachTagExtraInfo.java ParseTag.java
                        ParseTagExtraInfo.java VariableTag.java
                        VariableTagExtraInfo.java
               xtags/xml xtags.xml
  Log:
  Used the 'id' attribute consistently throughout the tag library now to define 
scriptlet attributes. Was using 'name' attribute alot, particularly in the 
<xtags:variable> tag. Now being more JSP consistent
  
  Revision  Changes    Path
  1.3       +3 -3      jakarta-taglibs/xtags/conf/xtags.tld
  
  Index: xtags.tld
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/xtags/conf/xtags.tld,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- xtags.tld 2001/05/07 11:11:45     1.2
  +++ xtags.tld 2001/05/07 11:37:30     1.3
  @@ -14,7 +14,7 @@
   <teiclass>org.apache.taglibs.xtags.tags.ParseTagExtraInfo</teiclass>
   <bodycontent>JSP</bodycontent>
   <attribute>
  -<name>name</name>
  +<name>id</name>
   <required>false</required>
   <rtexprvalue>false</rtexprvalue>
   </attribute>
  @@ -70,7 +70,7 @@
   <rtexprvalue>true</rtexprvalue>
   </attribute>
   <attribute>
  -<name>name</name>
  +<name>id</name>
   <required>false</required>
   <rtexprvalue>false</rtexprvalue>
   </attribute>
  @@ -131,7 +131,7 @@
   <teiclass>org.apache.taglibs.xtags.tags.VariableTagExtraInfo</teiclass>
   <bodycontent>empty</bodycontent>
   <attribute>
  -<name>name</name>
  +<name>id</name>
   <required>true</required>
   <rtexprvalue>false</rtexprvalue>
   </attribute>
  
  
  
  1.3       +45 -21    jakarta-taglibs/xtags/doc/web/xtags.html
  
  Index: xtags.html
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/xtags/doc/web/xtags.html,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- xtags.html        2001/05/07 11:11:57     1.2
  +++ xtags.html        2001/05/07 11:37:37     1.3
  @@ -79,13 +79,22 @@
   <h3>Tag Summary</h3>
   <table summary="summary list of tags with short description of each.">
   <tr>
  -<td><a href="#parse">parse</a></td><td>Parsers some XML either from a given URL or 
from the body of this tag</td>
  +<td><a href="#parse">parse</a></td><td>
  +        Parsers some XML either from a given URI or from the body of this tag. 
  +        The URI can be either an explicit URL or a URI relative to the 
  +        current web application.
  +    </td>
   </tr>
   <tr>
   <td><a href="#valueOf">valueOf</a></td><td>Evaluates the given XPath expression on 
the current context node and outputs the result as text</td>
   </tr>
   <tr>
  -<td><a href="#forEach">forEach</a></td><td>Evaluates the given XPath expression and 
iterates over the result, setting the context node to each element in the 
iteration</td>
  +<td><a href="#forEach">forEach</a></td><td>
  +        Evaluates the given XPath expression and iterates over the result, 
  +        setting the context node to each element in the iteration.
  +        If the "id" attribute is specified then a scripting attribute will be
  +        defined with the current item of the iteration.
  +    </td>
   </tr>
   <tr>
   <td><a href="#choose">choose</a></td><td>Behaves like the corresponding XSLT tag. A 
choose tag contains zero or more when tags together with an optional otherwise 
tag.</td>
  @@ -103,10 +112,13 @@
   <td><a href="#if">if</a></td><td>Behaves like the corresponding XSLT tag, the body 
is evaluated if the XPath selection finds one or more nodes</td>
   </tr>
   <tr>
  -<td><a href="#variable">variable</a></td><td>Defines a variable to be the value of 
the given XPath expression and name. 
  -    Specifying a type of 'node' will convert the result to an 
org.apache.taglibs.xtags.Node
  -     or a type of 'string' will convert the result to a String otherwise 
  -     the result will be a list.
  +<td><a href="#variable">variable</a></td><td>
  +        Defines a scripting variable with the given id and the the value of the 
  +        given XPath expression. 
  +
  +        By default the type will be a String. If the "type" attribute specifies 
  +        a type of 'node' it convert the result to an org.dom4j.Node otherwise the
  +        result will be an Object or List.
       </td>
   </tr>
   <tr>
  @@ -153,7 +165,11 @@
   </td>
   </tr>
   <tr>
  -<td colspan="2">Parsers some XML either from a given URL or from the body of this 
tag</td>
  +<td colspan="2">
  +        Parsers some XML either from a given URI or from the body of this tag. 
  +        The URI can be either an explicit URL or a URI relative to the 
  +        current web application.
  +    </td>
   </tr>
   <tr>
   <td width="2%">&nbsp;</td><td width="98%">
  @@ -165,7 +181,7 @@
   <td width="20%"><span class="tbody">Tag Body</span></td><td width="80%">JSP</td>
   </tr>
   <tr>
  -<td width="20%"><span class="scriptvar">Script Variable</span></td><td 
width="80%">If the name attribute is set the variable with that name will be 
defined</td>
  +<td width="20%"><span class="scriptvar">Script Variable</span></td><td 
width="80%">If the id attribute is set the variable with that id will be defined</td>
   </tr>
   <tr>
   <td width="20%"><span class="restrictions">Restrictions</span></td><td 
width="80%"></td>
  @@ -180,7 +196,7 @@
   <td width="40%">Name</td><td width="20%">Required</td><td width="40%">Runtime 
Expression Evaluation</td>
   </tr>
   <tr bgcolor="#cccccc">
  -<td width="40%"><b>name</b></td><td width="20%">false</td><td 
width="40%">false</td>
  +<td width="40%"><b>id</b></td><td width="20%">false</td><td width="40%">false</td>
   </tr>
   <tr>
   <td colspan="3"></td>
  @@ -209,9 +225,9 @@
   <br>
   <p>
   <code>
  -&lt;xtags:parse name="doc1" url="foo/bar.xml"/&gt;
  +&lt;xtags:parse id="doc1" url="foo/bar.xml"/&gt;
   
  -&lt;xtags:parse name="doc2"&gt;
  +&lt;xtags:parse id="doc2"&gt;
     &lt;root&gt;
       &lt;author firstName="James" surname="Strachan"/&gt;
     &lt;/root&gt;
  @@ -309,7 +325,12 @@
   </td>
   </tr>
   <tr>
  -<td colspan="2">Evaluates the given XPath expression and iterates over the result, 
setting the context node to each element in the iteration</td>
  +<td colspan="2">
  +        Evaluates the given XPath expression and iterates over the result, 
  +        setting the context node to each element in the iteration.
  +        If the "id" attribute is specified then a scripting attribute will be
  +        defined with the current item of the iteration.
  +    </td>
   </tr>
   <tr>
   <td width="2%">&nbsp;</td><td width="98%">
  @@ -321,7 +342,7 @@
   <td width="20%"><span class="tbody">Tag Body</span></td><td width="80%">JSP</td>
   </tr>
   <tr>
  -<td width="20%"><span class="scriptvar">Script Variable</span></td><td 
width="80%">If the name attribute is set the variable with that name will be 
defined</td>
  +<td width="20%"><span class="scriptvar">Script Variable</span></td><td 
width="80%">If the id attribute is set the variable with that id will be defined</td>
   </tr>
   <tr>
   <td width="20%"><span class="restrictions">Restrictions</span></td><td 
width="80%"></td>
  @@ -360,7 +381,7 @@
   <td colspan="3"></td>
   </tr>
   <tr bgcolor="#cccccc">
  -<td width="40%"><b>name</b></td><td width="20%">false</td><td 
width="40%">false</td>
  +<td width="40%"><b>id</b></td><td width="20%">false</td><td width="40%">false</td>
   </tr>
   <tr>
   <td colspan="3"></td>
  @@ -710,10 +731,13 @@
   </td>
   </tr>
   <tr>
  -<td colspan="2">Defines a variable to be the value of the given XPath expression 
and name. 
  -    Specifying a type of 'node' will convert the result to an 
org.apache.taglibs.xtags.Node
  -     or a type of 'string' will convert the result to a String otherwise 
  -     the result will be a list.
  +<td colspan="2">
  +        Defines a scripting variable with the given id and the the value of the 
  +        given XPath expression. 
  +
  +        By default the type will be a String. If the "type" attribute specifies 
  +        a type of 'node' it convert the result to an org.dom4j.Node otherwise the
  +        result will be an Object or List.
       </td>
   </tr>
   <tr>
  @@ -726,7 +750,7 @@
   <td width="20%"><span class="tbody">Tag Body</span></td><td width="80%">empty</td>
   </tr>
   <tr>
  -<td width="20%"><span class="scriptvar">Script Variable</span></td><td 
width="80%">If the name attribute is set the variable with that name will be 
defined</td>
  +<td width="20%"><span class="scriptvar">Script Variable</span></td><td 
width="80%">If the id attribute is set the variable with that id will be defined</td>
   </tr>
   <tr>
   <td width="20%"><span class="restrictions">Restrictions</span></td><td 
width="80%"></td>
  @@ -741,7 +765,7 @@
   <td width="40%">Name</td><td width="20%">Required</td><td width="40%">Runtime 
Expression Evaluation</td>
   </tr>
   <tr bgcolor="#cccccc">
  -<td width="40%"><b>name</b></td><td width="20%">true</td><td width="40%">false</td>
  +<td width="40%"><b>id</b></td><td width="20%">true</td><td width="40%">false</td>
   </tr>
   <tr>
   <td colspan="3"></td>
  @@ -776,7 +800,7 @@
   <br>
   <p>
   <code>
  -      &lt;xtags:variable name="surname" select="@surname"/&gt; 
  +      &lt;xtags:variable id="surname" select="@surname"/&gt; 
         </code>
   </p>
   </li>
  
  
  
  1.3       +1 -1      jakarta-taglibs/xtags/examples/web/hello_rss.jsp
  
  Index: hello_rss.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/xtags/examples/web/hello_rss.jsp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- hello_rss.jsp     2001/05/07 11:12:14     1.2
  +++ hello_rss.jsp     2001/05/07 11:37:42     1.3
  @@ -13,7 +13,7 @@
   <ul>
   <xtags:parse uri="http://p.moreover.com/cgi-local/page?c=Java%20news&o=rss"/>
   <xtags:forEach select="//item">
  -  <xtags:variable name="url" type="string" select="link"/>
  +  <xtags:variable id="url" type="string" select="link"/>
     <li>
     <a href="<%= url %>">
       <xtags:valueOf select="title"/>
  
  
  
  1.3       +3 -3      jakarta-taglibs/xtags/examples/web/much_ado.jsp
  
  Index: much_ado.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/xtags/examples/web/much_ado.jsp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- much_ado.jsp      2001/05/07 11:12:16     1.2
  +++ much_ado.jsp      2001/05/07 11:37:44     1.3
  @@ -17,8 +17,8 @@
   
     <table cellspacing="0" cellpadding="2" bgcolor="#000000" border="1">
   
  -    <xtags:forEach select="SCENE" name="scene">
  -      <xtags:variable name="title" select="TITLE/text()"/>
  +    <xtags:forEach id="scene" select="SCENE">
  +      <xtags:variable id="title" select="TITLE/text()"/>
   
         <tr bgcolor="#dddddd">
           <td>Scene</td>
  @@ -28,7 +28,7 @@
           <td valign="top">Speakers</td>
           <td>
   
  -          <xtags:forEach select="SPEECH/SPEAKER" sort="." distinct="true" 
name="speaker">
  +          <xtags:forEach id="speaker" select="SPEECH/SPEAKER" sort="." 
distinct="true">
   
               <xtags:choose>
                 <xtags:when test=".='HERO'">
  
  
  
  1.3       +3 -3      jakarta-taglibs/xtags/examples/web/periodic_table2.jsp
  
  Index: periodic_table2.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/xtags/examples/web/periodic_table2.jsp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- periodic_table2.jsp       2001/05/07 11:12:22     1.2
  +++ periodic_table2.jsp       2001/05/07 11:37:45     1.3
  @@ -9,13 +9,13 @@
   
   <%-- This example demonstrates that the body can be parsed --%>
   <%-- if no URL is specified                                --%>
  -<xtags:parse name="doc">      
  +<xtags:parse id="doc">      
     <%@ include file="periodic_table.xml" %>
   </xtags:parse>
   
  -<xtags:variable select="count(//ATOM)" name="count" type="Number"/>
  +<xtags:variable id="count" select="count(//ATOM)" type="Number"/>
   
  -<xtags:forEach select="//ATOM" name="atom">
  +<xtags:forEach id="atom" select="//ATOM">
   
     <p>
       Atom 
  
  
  
  1.3       +1 -1      jakarta-taglibs/xtags/examples/web/simple_rss.jsp
  
  Index: simple_rss.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/xtags/examples/web/simple_rss.jsp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- simple_rss.jsp    2001/05/07 11:12:24     1.2
  +++ simple_rss.jsp    2001/05/07 11:37:47     1.3
  @@ -36,7 +36,7 @@
       <xtags:forEach select="item">
         <tr bgcolor="#eeeeee">
           <td>
  -          <xtags:variable name="url" type="string" select="link"/>
  +          <xtags:variable id="url" type="string" select="link"/>
             <a href="<%= url %>"><xtags:valueOf select="title"/></a>
           </td>
         </tr>
  
  
  
  1.3       +1 -1      jakarta-taglibs/xtags/examples/web/xpath_wizard.jsp
  
  Index: xpath_wizard.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/xtags/examples/web/xpath_wizard.jsp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- xpath_wizard.jsp  2001/05/07 11:12:30     1.2
  +++ xpath_wizard.jsp  2001/05/07 11:37:48     1.3
  @@ -148,7 +148,7 @@
   %>
         <xtags:parse uri="<%= uri %>"/>
   
  -      <xtags:forEach select="<%= path %>" sort="<%= ( sort ) ? sortPath : null %>" 
distinct="<%= distinct %>" name="result">
  +      <xtags:forEach id="result" select="<%= path %>" sort="<%= ( sort ) ? sortPath 
: null %>" distinct="<%= distinct %>">
   
   <%
             String text = "";
  
  
  
  1.2       +3 -3      
jakarta-taglibs/xtags/src/org/apache/taglibs/xtags/tags/AbstractXPathTag.java
  
  Index: AbstractXPathTag.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-taglibs/xtags/src/org/apache/taglibs/xtags/tags/AbstractXPathTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractXPathTag.java     2001/05/05 18:06:31     1.1
  +++ AbstractXPathTag.java     2001/05/07 11:38:00     1.2
  @@ -226,9 +226,9 @@
           return context;
       }
       
  -    public static void defineVariable(PageContext pageContext, String name, Object 
value ) {
  -        if ( name != null ) {
  -            pageContext.setAttribute( name, value);
  +    public static void defineVariable(PageContext pageContext, String id, Object 
value ) {
  +        if ( id != null ) {
  +            pageContext.setAttribute( id, value);
           }
           TagHelper.setInputNodes( pageContext, value );
       }
  
  
  
  1.2       +12 -13    
jakarta-taglibs/xtags/src/org/apache/taglibs/xtags/tags/ForEachTag.java
  
  Index: ForEachTag.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-taglibs/xtags/src/org/apache/taglibs/xtags/tags/ForEachTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ForEachTag.java   2001/05/05 18:06:31     1.1
  +++ ForEachTag.java   2001/05/07 11:38:03     1.2
  @@ -92,8 +92,8 @@
       /** Holds the XPath selection instance. */
       private XPath xpath;
       
  -    /** Holds value of property name. */
  -    private String name;
  +    /** Holds value of property id. */
  +    private String id;
       
       /** Holds value of property type. */
       private String type;    
  @@ -212,18 +212,18 @@
           this.distinct = distinct;
       }
       
  -    /** Getter for property name.
  -     * @return Value of property name.
  +    /** Getter for property id.
  +     * @return Value of property id.
        */
  -    public String getName() {
  -        return name;
  +    public String getId() {
  +        return id;
       }
       
  -    /** Setter for property name.
  -     * @param name New value of property name.
  +    /** Setter for property id.
  +     * @param id New value of property id.
        */
  -    public void setName(String name) {
  -        this.name = name;
  +    public void setId(String id) {
  +        this.id = id;
       }
       
       /** Getter for property type.
  @@ -242,8 +242,7 @@
       
       
       // Implementation methods
  -    //-------------------------------------------------------------------------     
           
  -    
  +    //-------------------------------------------------------------------------     
               
       protected List selectNodes() {
           if ( xpath != null ) {    
               Object input = getInputNodes();
  @@ -290,7 +289,7 @@
       protected boolean hasNext() {
           if ( iterator.hasNext() ) {
               contextNode = iterator.next();
  -            AbstractXPathTag.defineVariable( pageContext, getName(), contextNode );
  +            AbstractXPathTag.defineVariable( pageContext, getId(), contextNode );
               if ( contextNode != null ) {
                   return true;
               }
  
  
  
  1.2       +1 -1      
jakarta-taglibs/xtags/src/org/apache/taglibs/xtags/tags/ForEachTagExtraInfo.java
  
  Index: ForEachTagExtraInfo.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-taglibs/xtags/src/org/apache/taglibs/xtags/tags/ForEachTagExtraInfo.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ForEachTagExtraInfo.java  2001/05/05 18:06:31     1.1
  +++ ForEachTagExtraInfo.java  2001/05/07 11:38:04     1.2
  @@ -72,7 +72,7 @@
       }
       
       public VariableInfo[] getVariableInfo(TagData data) {
  -        String instanceName = data.getAttributeString( "name" );
  +        String instanceName = data.getAttributeString( "id" );
           if ( instanceName == null ) {
               return new VariableInfo[0]; 
           }
  
  
  
  1.3       +12 -12    
jakarta-taglibs/xtags/src/org/apache/taglibs/xtags/tags/ParseTag.java
  
  Index: ParseTag.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-taglibs/xtags/src/org/apache/taglibs/xtags/tags/ParseTag.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ParseTag.java     2001/05/07 11:13:20     1.2
  +++ ParseTag.java     2001/05/07 11:38:06     1.3
  @@ -89,8 +89,8 @@
       /** Logger */
       private static final Category log = LogHelper.get( ParseTag.class );
   
  -    /** Holds value of property name. */
  -    private String name;
  +    /** Holds value of property id. */
  +    private String id;
       
       /** The URL of the document to parse. */
       private URL url;
  @@ -135,7 +135,7 @@
   
       public void release() {
           super.release();
  -        name = null;
  +        id = null;
           url = null;
           reader = null;
       }
  @@ -143,18 +143,18 @@
       // Properties
       //-------------------------------------------------------------------------     
           
       
  -    /** Getter for property name.
  -     * @return Value of property name.
  +    /** Getter for property id.
  +     * @return Value of property id.
        */
  -    public String getName() {
  -        return name;
  +    public String getId() {
  +        return id;
       }
       
  -    /** Setter for property name.
  -     * @param name New value of property name.
  +    /** Setter for property id.
  +     * @param id New value of property id.
        */
  -    public void setName(String name) {
  -        this.name = name;
  +    public void setId(String id) {
  +        this.id = id;
       }
       
       public String getUri() {
  @@ -189,7 +189,7 @@
       }
       
       protected void defineVariable( Document document ) {
  -        AbstractXPathTag.defineVariable( pageContext, getName(), document );
  +        AbstractXPathTag.defineVariable( pageContext, getId(), document );
       }
   
       /** Handles non-JspExceptions thrown in this instance
  
  
  
  1.2       +1 -1      
jakarta-taglibs/xtags/src/org/apache/taglibs/xtags/tags/ParseTagExtraInfo.java
  
  Index: ParseTagExtraInfo.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-taglibs/xtags/src/org/apache/taglibs/xtags/tags/ParseTagExtraInfo.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ParseTagExtraInfo.java    2001/05/05 18:06:32     1.1
  +++ ParseTagExtraInfo.java    2001/05/07 11:38:07     1.2
  @@ -74,7 +74,7 @@
       }
       
       public VariableInfo[] getVariableInfo(TagData data) {
  -        String instanceName = data.getAttributeString( "name" );
  +        String instanceName = data.getAttributeString( "id" );
           if ( instanceName == null ) {
               return NO_VARIABLES;
           }
  
  
  
  1.2       +12 -12    
jakarta-taglibs/xtags/src/org/apache/taglibs/xtags/tags/VariableTag.java
  
  Index: VariableTag.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-taglibs/xtags/src/org/apache/taglibs/xtags/tags/VariableTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- VariableTag.java  2001/05/05 18:06:32     1.1
  +++ VariableTag.java  2001/05/07 11:38:09     1.2
  @@ -85,8 +85,8 @@
   
       /** Holds the XPath selection instance. */
       private XPath xpath;    
  -    /** Holds value of property name. */
  -    private String name;
  +    /** Holds value of property id. */
  +    private String id;
       /** Holds value of property type. */
       private String type;
       
  @@ -113,7 +113,7 @@
               else {
                   value = xpath.selectObject( getInputNodes() );
               }
  -            pageContext.setAttribute( getName(), value );
  +            pageContext.setAttribute( getId(), value );
           }
           return SKIP_BODY;
       }
  @@ -121,7 +121,7 @@
       public void release() {
           super.release();
           xpath = null;
  -        name = null;
  +        id = null;
           type = null;
       }
   
  @@ -140,18 +140,18 @@
           this.xpath = xpath;
       }
       
  -    /** Getter for property name.
  -     * @return Value of property name.
  +    /** Getter for property id.
  +     * @return Value of property id.
        */
  -    public String getName() {
  -        return name;
  +    public String getId() {
  +        return id;
       }
       
  -    /** Setter for property name.
  -     * @param name New value of property name.
  +    /** Setter for property id.
  +     * @param id New value of property id.
        */
  -    public void setName(String name) {
  -        this.name = name;
  +    public void setId(String id) {
  +        this.id = id;
       }
       /** Getter for property type.
        * @return Value of property type.
  
  
  
  1.2       +1 -1      
jakarta-taglibs/xtags/src/org/apache/taglibs/xtags/tags/VariableTagExtraInfo.java
  
  Index: VariableTagExtraInfo.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-taglibs/xtags/src/org/apache/taglibs/xtags/tags/VariableTagExtraInfo.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- VariableTagExtraInfo.java 2001/05/05 18:06:32     1.1
  +++ VariableTagExtraInfo.java 2001/05/07 11:38:10     1.2
  @@ -72,7 +72,7 @@
       }
       
       public VariableInfo[] getVariableInfo(TagData data) {
  -        String instanceName = data.getAttributeString( "name" );
  +        String instanceName = data.getAttributeString( "id" );
           String typeName = data.getAttributeString( "type" );
           if (typeName == null) {
               typeName ="java.lang.String";
  
  
  
  1.3       +28 -16    jakarta-taglibs/xtags/xml/xtags.xml
  
  Index: xtags.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/xtags/xml/xtags.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- xtags.xml 2001/05/07 11:13:28     1.2
  +++ xtags.xml 2001/05/07 11:38:24     1.3
  @@ -42,9 +42,13 @@
       <tagclass>org.apache.taglibs.xtags.tags.ParseTag</tagclass>
       <teiclass>org.apache.taglibs.xtags.tags.ParseTagExtraInfo</teiclass>
       <bodycontent>JSP</bodycontent>
  -    <info>Parsers some XML either from a given URL or from the body of this 
tag</info>
  +    <info>
  +        Parsers some XML either from a given URI or from the body of this tag. 
  +        The URI can be either an explicit URL or a URI relative to the 
  +        current web application.
  +    </info>
       <attribute>
  -      <name>name</name>
  +      <name>id</name>
         <required>false</required>
         <rtexprvalue>false</rtexprvalue>
       </attribute>
  @@ -58,15 +62,15 @@
         <required>false</required>
         <rtexprvalue>true</rtexprvalue>
       </attribute>
  -    <script-variable>If the name attribute is set the variable with that name will 
be defined</script-variable>
  +    <script-variable>If the id attribute is set the variable with that id will be 
defined</script-variable>
       <restrictions></restrictions>
       <usage>
         <comment>
         </comment>
         <code><![CDATA[
  -<xtags:parse name="doc1" url="foo/bar.xml"/>
  +<xtags:parse id="doc1" url="foo/bar.xml"/>
   
  -<xtags:parse name="doc2">
  +<xtags:parse id="doc2">
     <root>
       <author firstName="James" surname="Strachan"/>
     </root>
  @@ -91,7 +95,7 @@
         <rtexprvalue>true</rtexprvalue>
       </attribute>
       <script-variable>No</script-variable>
  -    <restrictions>Should be used within an XML context such as an 
&lt;xtag:documents&gt; or s&lt;xtags:forEachs&gt; tag</restrictions>
  +    <restrictions></restrictions>
       <usage>
         <comment>
         </comment>
  @@ -106,7 +110,12 @@
       <tagclass>org.apache.taglibs.xtags.tags.ForEachTag</tagclass>
       <teiclass>org.apache.taglibs.xtags.tags.ForEachTagExtraInfo</teiclass>
       <bodycontent>JSP</bodycontent>
  -    <info>Evaluates the given XPath expression and iterates over the result, 
setting the context node to each element in the iteration</info>
  +    <info>
  +        Evaluates the given XPath expression and iterates over the result, 
  +        setting the context node to each element in the iteration.
  +        If the "id" attribute is specified then a scripting attribute will be
  +        defined with the current item of the iteration.
  +    </info>
       <attribute>
         <name>select</name>
         <required>true</required>
  @@ -128,7 +137,7 @@
         <rtexprvalue>true</rtexprvalue>
       </attribute>
       <attribute>
  -      <name>name</name>
  +      <name>id</name>
         <required>false</required>
         <rtexprvalue>false</rtexprvalue>
       </attribute>
  @@ -137,7 +146,7 @@
         <required>false</required>
         <rtexprvalue>false</rtexprvalue>
       </attribute>
  -    <script-variable>If the name attribute is set the variable with that name will 
be defined</script-variable>
  +    <script-variable>If the id attribute is set the variable with that id will be 
defined</script-variable>
       <restrictions></restrictions>
       <usage>
         <comment>
  @@ -261,13 +270,16 @@
       <tagclass>org.apache.taglibs.xtags.tags.VariableTag</tagclass>
       <teiclass>org.apache.taglibs.xtags.tags.VariableTagExtraInfo</teiclass>
       <bodycontent>empty</bodycontent>
  -    <info>Defines a variable to be the value of the given XPath expression and 
name. 
  -    Specifying a type of 'node' will convert the result to an 
org.apache.taglibs.xtags.Node
  -     or a type of 'string' will convert the result to a String otherwise 
  -     the result will be a list.
  +    <info>
  +        Defines a scripting variable with the given id and the the value of the 
  +        given XPath expression. 
  +
  +        By default the type will be a String. If the "type" attribute specifies 
  +        a type of 'node' it convert the result to an org.dom4j.Node otherwise the
  +        result will be an Object or List.
       </info>
       <attribute>
  -      <name>name</name>
  +      <name>id</name>
         <required>true</required>
         <rtexprvalue>false</rtexprvalue>
       </attribute>
  @@ -286,13 +298,13 @@
         <required>false</required>
         <rtexprvalue>true</rtexprvalue>
       </attribute>
  -    <script-variable>If the name attribute is set the variable with that name will 
be defined</script-variable>
  +    <script-variable>If the id attribute is set the variable with that id will be 
defined</script-variable>
       <restrictions></restrictions>
       <usage>
         <comment>
         </comment>
         <code>
  -      <![CDATA[<xtags:variable name="surname" select="@surname"/>]]> 
  +      <![CDATA[<xtags:variable id="surname" select="@surname"/>]]> 
         </code>
       </usage>
     </tag>
  
  
  

Reply via email to