You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Simone Bortolaso <bo...@softhome.net> on 2001/06/07 11:51:27 UTC

Can not add xsp:expr to xsl:attribute

Hi all, is there a way to jump across the following problem? 

1) 

<xsp:logic> 
if(viewer.isPie()){
   <tr><td bgcolor="#ffffff" width="340" height="20" vlign="bottom" align = "left" colspan = "2">
   <img><xsl:attribute name = "src"> <xsl:value-of select="../report_information/piechart/@path"/><xsp:expr>viewer.getUnavailable()</xsp:expr>   
  </xsl:attribute></img>   
  </td></tr> 
 }
</xsp:logic>


2) Alternatively, I try to define a xsl variable and assign it with in

<xsl:variable name = "param" ><xsp:expr>viewer.getUnavailable()</xsp:expr></xsl:variable>

<xsp:logic> 
if(viewer.isPie()){
   <tr><td bgcolor="#ffffff" width="340" height="20" vlign="bottom" align = "left" colspan = "2">
   <img><xsl:attribute name = "src"> <xsl:value-of select="../report_information/piechart/@path"/><xsl:value-of select="{$param}">   
  </xsl:attribute></img>   
  </td></tr> 
 }
</xsp:logic>

but it return the variable's name  end not its value.

Thank all in advance Simone.