Marius Scurtescu wrote:
The spec says that the 'select' attribute is not dynamic, accepts only a string. It probably does not interpret the expressions you put there.
You may have to use some if tags (c:if or x:if) and write two versions of your x:forEach.
Marius
Ruth, Brice wrote:
Good evening.
I'm using the JSTL xml statements and I find myself in a situation where I want to dynamically determine if the "select" XPath used in an <x:forEach> or <x:out> or whatever, is something like:
/[EMAIL PROTECTED]/[EMAIL PROTECTED]/category
- OR -
/[EMAIL PROTECTED]/section
I've tried a great many things, using JSTL tags from the core library to put one of those two strings in a page variable and then doing
<x:forEach select="$xml/$xpathPfx">
using scriptlets to assemble the xpath fragment and doing
<x:forEach select="$xml/<%=xpathPfx%>
to practically any number of other things and I always get a ServletException stating that the XPath processor expected one of '.','..','@', etc.
Is there any way for me to do this?
Thanks!
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Brice D. Ruth Sr. IT Analyst Fiskars Brands, Inc.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
