https://issues.apache.org/bugzilla/show_bug.cgi?id=47681



--- Comment #1 from Jason <jsarto...@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>
</x:forEach>

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

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.  

Regards,
Jason

-- 
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-unsubscr...@jakarta.apache.org
For additional commands, e-mail: taglibs-dev-h...@jakarta.apache.org

Reply via email to