I searched and tried various solutions (using xsl:variable for e.g.), but none worked.
Here is my case. This works, but I would like to pass xsl_value-of as argument to alert():
<a href="#" onclick="alert('text')"><xsl:value-of select="@naziv" /></a>
So it would be something like
<a href="#" onclick="alert('{<xsl:value-of select="@naziv" />}')"><xsl:value-of select="@naziv" /></a>