tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Digby <>
Subject How do I pass a variable into an x select?
Date Sat, 04 Sep 2004 17:47:58 GMT
I've just noticed that the select attribute of all the x tags isn't 
ynamic, so I can't pass in a variable - which is kind of exactly what I 
need to do. Is there a workaround, or am I going to have to abandon jstl 
xml for xsl or something?

What I'm trying to do is below (v variable fails, but I can't hardcode 
the "two" for obvious reasons.



<x:parse var="xml">
     <channels id="channels">
         <channel id="tv">
             <channel id="one"/>
             <channel id="two"/>
             <channel id="three"/>
             <channel id="four"/>
         <channel id="sky">
             <channel id="movies"/>
             <channel id="sports"/>
<c:set var="v" value="three"/>
Self: <x:out select="$xml//channel[@id='two']/@id"/>
Index: <x:out select="$xml/channels/@id"/>
Parent: <x:out select="$xml//channel[@id='${v}']/../@id"/> <!--FAILS!-->
First: <x:out 
Last: <x:out 
Next: <x:out 
Prev: <x:out 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message