3 November, 2010
0 Comments
1 category
There are 2 ways to generate a HTML <A> link with XSLT:
Using the <xsl:element>
<xsl:element name="a"> <xsl:attribute name="href"> <xsl:value-of select="url"/> </xsl:attribute> <xsl:value-of select="url"/> </xsl:element>
Using only text
<a href="{url}"><xsl:value-of select="url"/></a>
HTML link, that fires a JavaScript function with parameter
<xsl:element name="a"> <xsl:attribute name="href">javascript:myFunction(<xsl:value-of select="@parameter1"/>);</xsl:attribute> My link text </xsl:element>
Tags: XSLT
Category: Uncategorized