Hi Richard ----- Original Message ----- From: "Richard Sand" <[EMAIL PROTECTED]> > Hi, > > My xtags tag is: > > <xtags:forEach > select="/help/<%=subjectstr%>[<%=subjectstr%>-key=$subjectkey][1]">
Try building up the xpath in one single expression. e.g. <xtags:forEach select="<%= "/help" + subjectstr + "[" + subjectstr + "-key=$subjectjey][1]" %>"/> Or using a variable for the XPath expression... <% String xpath = "/help" + subjectstr + "[" + subjectstr + "-key=$subjectjey][1]"; %> <xtags:forEach select="<% xpath %>"/> James > > where subjectstr is a string that can be set to "topic" or "keyword". > > However, I get the following exception: > > Message: org.dom4j.InvalidXPathException: Invalid XPath expression: > /help/[-key=$subjectkey][1] Expected one of '.', '..', '@', '*', > > You can see from the exception that the variable 'subjectstr' is not being > put into the expression. I commented out the rest of my code and left > <%=subjectstr%> there just to make sure that the variable was set properly > and it was. It seems to me like the "rtexprvalue" is being ignored from the > tld for the select parameter. > > Has anyone else seen this behavior? > > I'm using Tomcat 4.01 on W2k. > > Thanks! > > Best regards, > > Richard > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
