tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james_strac...@yahoo.co.uk>
Subject Re: rtexprvalue apparently being ignored for xtag forEach select parameter
Date Wed, 19 Dec 2001 10:13:22 GMT
Hi Richard

----- Original Message -----
From: "Richard Sand" <rsand@vgalleries.com>
> 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:taglibs-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:taglibs-user-help@jakarta.apache.org>
>
>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-user-help@jakarta.apache.org>


Mime
View raw message