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: problems with JSP inside XTAGS
Date Mon, 26 Nov 2001 11:28:05 GMT
Hi Daniel

Firstly what is the value of 'cont'? Is it a number? So that the XPath
expression you are trying to evaluate is something like

/root/States/Locality[2]/code

(Remember XPath indexes start at 1).
If 'cont' is a page level scope you can access it directly with an XPath
expression as follows

<xt:valueOf select='/root/States/Locality[$cont]/code'/>

If you wish to be explicit that cont must be a page level scoped attribute
you could do...

<xt:valueOf select='/root/States/Locality[$page:cont]/code'/>

Otherwise if you are having problems creating dynamic XPath expressions, you
can always use scriplet code...

<% String xpath = "/root/States/Locality[" + cont + "]/code"; %>
<xt:valueOf select="<%= xpath %>"/>

Though the use of XPath variables is preferred.

James
----- Original Message -----
From: "Daniel" <danieljn@tdi.tudistrito.es>
To: <taglibs-user@jakarta.apache.org>
Cc: "Óscar" <olara@tdi.tudistrito.es>
Sent: Monday, November 26, 2001 11:16 AM
Subject: problems with JSP inside XTAGS


> Hello everybody!!! I have a great problem.
>
> I have installed the XTags library, with Tomcat 4.0, and the problem is
that
> I can't put JSP sentences inside the
> XTags. For example:
>
> <xt:valueOf select='/root/States/Locality[<%= cont%>]/code'/>
>
> This makes that no result will be displayed on the screen. If anybody have
> the response for this problem,
> please,  Help me!!!
>
>
> --
> 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