Using XSLT variable in Xpath expression

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
I have the following basic xslt expression but im wanting to use an xsl:variable in the xpath expression but have no idea of how to get this to work. Can Anyone help?

<div class=codeseg>
<div class=codecontent>
<div class=codesniptitle><span style="width:100% Code Snippet
  <xsl:template match="Column[@type=exp_dblabel]
    <xsl:variable name="Data" select="msxsl:node-set(getdata:getinfo())" />
    <xsl:variable name="v_class" select="@class"/>
    <span style="font-weight:bold <xsl:variable name="v_condition" select="Condition"/>
    <xsl:variable name="SelectedData" select="msxsl:node-set(<span style="font-weight:bold $Data/table/header[$v_condition])"/>
    <xsl:for-each select="$SelectedData
      <td class="$v_class
        <xsl:value-of select="unifield"/>
      </td>
    </xsl:for-each>
  </xsl:template>
Cheers Colin


View the full article
 
Back
Top