Shawn, it makes sense!...and it works! Thank you for your fast answer. Regards
Xavier XP> -----Message d'origine----- XP> De : Shawn Bayern [mailto:[EMAIL PROTECTED]] XP> Envoyé : vendredi 13 septembre 2002 10:37 XP> À : Tag Libraries Users List XP> Objet : Re: flow control and conditional logic XP> XP> XP> On Fri, 13 Sep 2002, Xavier Prélat wrote: XP> XP> > I want to create a dynamic select box using JSTL core and xml tags. XP> > XP> > // setting a variable called 'selector' XP> > <c:set var="selector"><%= strAction %></c:set> XP> > XP> > // displaying select box...all html tags are not XP> represented...it's not my XP> > mistake ;-) XP> > XP> > <x:forEach select="$xmlMenu/modules/module" var="mod"> XP> > <x:if select="$mod/module-load-status = '${selector}'"> XP> > <option value="<x:out select="$mod/@id"/>"> <x:out XP> > select="$mod/@name"/></option> XP> > </x:when> XP> > </x:forEach> XP> > XP> > This problem is that I can't get a value for ${selector} in the line : XP> > <x:if select="$mod/module-load-status = '${selector}'"> XP> > XP> > Any ideas....I am getting a bit confused about the way to XP> access variables XP> > from these tags! XP> XP> Normally, you can use JSTL's expression language to access attributes XP> dynamically. However, this is inconsistent with XPath's syntax, so you XP> cannot use the JSTL EL in an XPath expression. The rule is simple: you XP> can't use the EL in any JSTL <x:*> tag attribute named "select." XP> XP> Instead, simply refer to 'selector' via an XPath variable: XP> XP> $mod/module-load-status = $selector XP> XP> See the JSTL spec or "JSTL in Action" for a list of what namespace XP> prefixes can be used within an XPath expression (e.g., XP> "$sessionScope:foo" XP> and so forth). XP> XP> -- XP> Shawn Bayern XP> "JSTL in Action" http://www.jstlbook.com XP> XP> XP> -- XP> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>