DO NOT REPLY [Bug 47681] New: count function returning incorrect results
[email protected] Tue, 11 Aug 2009 13:24:22 -0700 (PDT)
| Newsgroups | gmane.comp.jakarta.taglibs.devel |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
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: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Jason <[email protected]> 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.