jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 47681] count function returning incorrect results
Date Wed, 12 Aug 2009 13:31:30 GMT

--- Comment #1 from Jason <jsartoris@hotmail.com> 2009-08-12 06:31:27 PDT ---
Just an addition to my original post.  
The "count($doc/world/country)" call will return zero (I think it should return
2.  But when you put the $doc/world/country in a x:forEach tag it will behave
correctly and result in two iterations...like this:

<x:forEach select="$doc/world/country" var="test">
   found a country<br>

This will result in "found a country<br>" being printed out twice..which is

It seems that once the expression is wrapped in the count function it is not
handled properly.  

I noticed in the XPathUtil.adaptParamsForXalan method is only checking if the
xpath variable starts with a '$' in order to create the appropriate Node and
resolve the variable.  In the case of the count($doc/world/country) expression
this does not start with a '$' and will result in the method creating a
DummyDocument instead of resolving the variable appropriately.  


Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

View raw message