You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Rashmi Rubdi <de...@yahoo.com> on 2006/08/03 01:52:46 UTC

Value of the variable set with x:set , is [attribute_name=attribute_value] instead of just attribute_value

Hello, 
   
  I searched everywhere for a solution, but couldn't find an answer to this scenario:
   
  If I output the value of the attribute l_id as follows, the correct output - attribute's value - is being displayed
  <x:out select="$transformed/Products/Product[1]/@l_id"/>
   
  However, If I try the following, the value of attribute l_id is being printed as [l_id="some_value"] instead of just some_value
   
  <x:set var="key" select="$transformed/Products/Product[1]/@l_id" />
<c:out value="${key}"/>
   
  How do I make only the xml node's attribute value be stored in the variable while using x:set ?
   
   
   

 		
---------------------------------
Groups are talking. We&acute;re listening. Check out the handy changes to Yahoo! Groups. 

Re: Value of the variable set with x:set , is [attribute_name=attribute_value] instead of just attribute_value

Posted by Rashmi Rubdi <de...@yahoo.com>.
Thank you, the solution you have provided works perfectly for my case.
   
  I was just wondering that if [attribute_name=attribute_value] does not have any purpose then, why not just set the value to attribute_value directly when using x:set
   
  If it does have a purpose then the way x:set works now is fine. Anyway this is probably for another discussion thread. 
   
  I think we can close this thread now. Thank you once again for the help.

Kris Schneider <kr...@dotech.com> wrote:
  One way:

<c:set var="key"><x:out 
select="$transformed/Products/Product[1]/@l_id"/></c:set>
<c:out value="${key}"/>


 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: Value of the variable set with x:set , is [attribute_name=attribute_value] instead of just attribute_value

Posted by Kris Schneider <kr...@dotech.com>.
One way:

<c:set var="key"><x:out 
select="$transformed/Products/Product[1]/@l_id"/></c:set>
<c:out value="${key}"/>

Rashmi Rubdi wrote:
> Hello, 
>    
>   I searched everywhere for a solution, but couldn't find an answer to this scenario:
>    
>   If I output the value of the attribute l_id as follows, the correct output - attribute's value - is being displayed
>   <x:out select="$transformed/Products/Product[1]/@l_id"/>
>    
>   However, If I try the following, the value of attribute l_id is being printed as [l_id="some_value"] instead of just some_value
>    
>   <x:set var="key" select="$transformed/Products/Product[1]/@l_id" />
> <c:out value="${key}"/>
>    
>   How do I make only the xml node's attribute value be stored in the variable while using x:set ?

-- 
Kris Schneider <ma...@dotech.com>
D.O.Tech       <http://www.dotech.com/>

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