I have an xml :
<Data>
<Revenue>
<revDate>2015-05-31 00:00:00.000</revDate>
<source>1</source>
<currencyId>50</currencyId>
...
</Revenue>
<Revenue>
...
</Revenue>
</Data>
I need to populate an html template using xsl transformation. The logic is dependent on whether the 'Source' node is 1 or not.
I am trapping the source node in the first row of the revenue data in the xsl as follows -
<xsl:variable name="sourceID">
<xsl:value-of select="Data/revenue[@source][1]/text()"/>
</xsl:variable>
This is then passed onto a javascript function -
<a href=".." onClick="javascript:return isSourceLinked('{sourceID}');">
However,this does not work as the null/blank check on the parameter sourceID always fails(irrespective of whether it contains value or not).
What am i doing wrong - how do I trap the node value?