commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Ochs" <>
Subject Re: [jelly] bringing a jelly::core variable into an jelly::xml xpath
Date Fri, 15 Aug 2003 00:23:24 GMT
I have tried <xml:set var="input" 
select="$groups//group[@name='content']/@desc"/> and it works, but I was 
trying to make my example simple.
What if 'content' above is a variable that the user enters at the command 
line during execution? Or if I want to allow the user to enter an entire 

thanks, dan

>From: Paul Libbrecht <>
>Reply-To: "Jakarta Commons Users List" <>
>To: Jakarta Commons Users List <>
>Subject: Re: [jelly] bringing a jelly::core variable into an jelly::xml 
>Date: Thu, 14 Aug 2003 15:31:51 +0200
>Dan Ochs wrote:
>>I'm trying to figure out a way to pass a variable from a jelly::core var 
>>into a jelly::xml XPath expression.  The document loading and parsing is 
>>working correctly. The following code does not raise an exception, but 
>>also does not return anything.  Any other combination I try rasises 
>>various exceptions, null pointer being the most common.
>>thanks for the help, dan
>>   <group desc="I am your content description" name="content"/>
>><xml:parse var="groups" xml="groups.xml"/>
>><jelly:set var="input">$groups//group[@name='content']/@desc</jelly:set>
>><jelly:set var="desc">
>>   <xml:expr select="${input}"/>
>Have you tried, instead of <jelly:set var="input">... the following ?
><xml:set var="input" select="$groups//group[@name='content']/@desc"/>
>To unsubscribe, e-mail:
>For additional commands, e-mail:

MSN 8 with e-mail virus protection service: 2 months FREE*

View raw message