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>

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.