Hello,I've just recently started using Apache's XTAGS JSP tag libraries, andI've run 
into a problem with some of the functions.  The standardvalueOf and forEach tags work 
fine, but for some reason the position()and last() functions always return 0 and the 
count() function returns1.  I believe I'm using the latest dom4j and xalan libraries 
forparsing.  Has anyone experienced this?Here is a quick snippet of my code.  Maybe 
I'm doing something wrong,but it seems fairly straight-forward:<xtags:parse url="<%= 
Url %>" /><%-- The following always returns 1 even though     there are many STOCKLOC 
elements in the XML stream --%><p>Total count = <xtags:valueOf select="count 
('/STOCKLOCS/STOCKLOC')" /></p><table>  <xtags:forEach select="/STOCKLOCS/STOCKLOC">   
 <%-- These tags work and return the proper values --%>    <tr>      
<td><xtags:valueOf select="STOCKLOCID" /></td>      <td><xtags:valueOf 
select="STOCKLOCCODE" /></td>      <td><xtags:valueOf select="STOCKLOCNAME" /></td>    
</tr>    <%-- The following is always true         since position and last are both 
always 0 --%>    <xtags:if test="position() = last()">      <tr><td>TOTAL</td></tr>    
</xtags:if>  </xtags:forEach></table>Thanks for your help,Garrett Vlieger



---------------------------------
Do You Yahoo!?
Sign-up for Video Highlights of 2002 FIFA World Cup

Reply via email to