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" > <books> <book id="201"> <lastname>Duke</lastname> <firstname></firstname> <title>My Early Years: Growing up on *7</title> <price>10.75</price> <year>1995</year> <description>What a cool book.</description> <inventory>20</inventory> </book> <book id="202"> <lastname>Jeeves</lastname> <firstname></firstname> <title>Web Servers for Fun and Profit</title> <price>10.75</price> <year>2000</year> <description>What a cool book.</description> <inventory>20</inventory> </book> <book id="203"> <lastname>Masterson</lastname> <firstname>Webster</firstname> <title>Web Components for Web Developers</title> <price>17.75</price> <year>2000</year> <description>What a cool book.</description> <inventory>20</inventory> </book> </books> </x:parse> <c:if test="${param.bookId != null}"> <x:set var="abook" select="$booklist/books/book[@id=$param:bookId]" /> <h2><x:out select="$abook/title"/></h2> </c:if>
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? :-)