Subject: Re: Setting the value of the HREF attribute (Again)
From: Francois Belanger <francois@xxxxxxxxxxx>
Date: Mon, 8 Feb 99 15:35:48 -0500
|
Nigel Byrnes wrote on 08/02/99 13h25:
>Hello again XSL-ers
>
>Thanks for the the advice I received earlier in the day. On the same
>subject however, I have another query. As illustrated below, I am
>looking to set up an email link. The email address exists in the XML
>document, but I need to prepend the string "mailto:" onto it. I can't
>know how to do this in one step. does anyone have any ideas?
This should do it:
<xsl:template match="contactEmail">
<xsl:text>Email: </xsl:text>
<xsl:element name="A">
<xsl:attribute name="HREF">mailto:<xsl:value-of
select="text()"/></xsl:attribute>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
Francois Belanger
Sitepak, Bringing Internet Business into Focus
http://www.sitepak.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|