Bug 7849 - xpath evaluator doesn't use scoped variable in select
Summary: xpath evaluator doesn't use scoped variable in select
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Standard Taglib (show other bugs)
Version: 1.0B1
Hardware: Sun Solaris
: P3 blocker (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2002-04-08 19:14 UTC by Stephanie Bodoff
Modified: 2004-11-16 19:05 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Stephanie Bodoff 2002-04-08 19:14:09 UTC
When provide a scoped variable to a select, abook has all empty values. If I use
a constant to select a particular id, it works. 

<x:parse var="booklist" >
  <book id="201">
    <title>My Early Years: Growing up on *7</title>
    <description>What a cool book.</description>
  <book id="202">
    <title>Web Servers for Fun and Profit</title>
    <description>What a cool book.</description>
  <book id="203">
    <title>Web Components for Web Developers</title>
    <description>What a cool book.</description>
<c:if test="${param.bookId != null}">
<x:set var="abook" select="$booklist/books/book[@id=$param:bookId]" />
<h2><x:out select="$abook/title"/></h2>
Comment 1 Shawn Bayern 2002-04-08 19:28:57 UTC
Thanks for the report, Stephanie.  This works now; there may have been a bug 
immediately post-Beta1, or perhaps in Beta1 itself.

By the way, 'param' indicates a request parameter, not a scoped variable.  Just 
wanted to make sure we're talking about the same thing.  If I load your test 
page with a query string of "?bookId=203" (leading to "$param:bookId=203"), I 
get the correct book title.

Also, how much would it cost my publisher in promotional dollars to add my 
books to your list?  :-)