tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wadim Kruse <z-c...@web.de>
Subject Re: jstl 1.1.2, xml - how to concat two variables?
Date Thu, 24 May 2007 09:22:39 GMT

Problem solved another way around: JSP which returns an XSL-Stylesheet.


Wadim Kruse wrote:
> 
> Hi,
> 
> I wasn't able to figure out, how to concat two variables (xml-document and
> xpath-expression).
> The documentation says that "XPathExpression" in <x:set var="" select="">
> should be a string literal... What is the way to use a variable
> XPathExpression to select an xml-fragment? I don't want to hard-code it in
> the JSP. In case it's not possible to concat two variables, what would be
> the alternative to do that? SAX-filter?
> 
> Best regards,
> Wadim
> 
> 
> ----------------------------------------------------------------------------------------------
> <%@ pagelanguage="java"contentType="text/html; charset=UTF-8" 
>         pageEncoding="UTF-8"%> 
> 
> <%@ taglibprefix="c"uri="http://java.sun.com/jsp/jstl/core"%> 
> <%@ taglibprefix="x"uri="http://java.sun.com/jsp/jstl/xml"%> 
> 
> <c:setvar="doc"> 
>         <c:importurl="data/collection.xml"></c:import> 
> </c:set> 
> 
> <c:setvar="xpath"> 
>        ...some xpath-expression...
> </c:set> 
> 
> <c:setvar="xsl"> 
>         <c:importurl="styles/tree2.xsl"></c:import> 
> </c:set> 
> 
> <x:parsevar="xml"xml="${doc}"/> 
> 
> <x:setvar="test"select="$xml$xpath"/>   <!-- DOESN'T WORK!!! , hard-coded
> xpath works... -->
> 
> <x:outselect="{$test}"/>
> 

-- 
View this message in context: http://www.nabble.com/jstl-1.1.2%2C-xml---how-to-concat-two-variables--tf3806497.html#a10780246
Sent from the Taglibs - User mailing list archive at Nabble.com.


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


Mime
View raw message