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

           Summary: count function returning incorrect results
           Product: Taglibs
           Version: 1.1.0
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XTags Taglib
        AssignedTo: taglibs-dev@jakarta.apache.org
        ReportedBy: jsarto...@hotmail.com


--- Comment #0 from Jason <jsarto...@hotmail.com> 2009-08-11 13:24:21 PDT ---
Hello,

I am having an issue with using the count function to count the number of
entries in an XML document.  

For example, given the JSP text:
-------------------
<%@ taglib uri ="http://java.sun.com/jsp/jstl/core"; prefix ="c"%>
<%@ taglib uri ="http://java.sun.com/jsp/jstl/xml"; prefix ="x"%>

<x:parse var="doc" xml="<?xml version=\"1.0\" encoding=\"ISO-8859-1\"
?><world><country><id>1</id><name>Canada</name></country><country><id>2</id><name>USA</name></country></world>"
/> 

<x:out select="count($doc/world/country)"/>  
<br>
<x:out select="count($doc/country)"/>

-------------------

will result in the count($doc/world/country) always returns 0 (zero)
but the count($doc/country) will return 2.

Is this a bug?  I have tried debugging the taglib code but I cannot figure out
what is going wrong.

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