Setting xsl:value-of into an href attribute and the text field of a link in an XSLT

Posted by Josh on Stack Overflow See other posts from Stack Overflow or by Josh
Published on 2010-04-01T19:19:24Z Indexed on 2010/04/01 19:23 UTC
Read the original article Hit count: 329

Filed under:
|
|
|

I am trying to set an a href that is both a link to and has the text for a link through an XSLT transformation. Here's what it looks like so far.

<xsl:element name="a">
                            <xsl:attribute name="href">
                                <xsl:value-of select="actionUrl"/>
                            </xsl:attribute>
                            <xsl:text><xsl:value-of select="actionUrl"/></xsl:text> 
                        </xsl:element>

The problem is that it says "xsl:value-of cannot be a child of the xsl:text element". Any ideas?

© Stack Overflow or respective owner

Related posts about xslt

Related posts about href