all groups > sql server notification services > february 2007 >
You're in the

sql server notification services

group:

Using Links in the xslt formatter


Using Links in the xslt formatter Todd C
2/28/2007 11:13:10 AM
sql server notification services: I am fairly new to NS but learning more as the 'beast' grows!

I have a simple notification class that includes an integer field that, when
added at the end of an hyper-link, yields a valid link the user can click
right from within his/her e-mail to get more details.

In my xslt format file, I can retreive the number using the following syntax:
<xsl:value-of select="My_Number" />

How do I concatenate that number at the end of a href tag, as in:

Click <a href="http://My_LINK.aspx?My_Number= ** insert my number here **
">THIS NUMBER</a>

The resulting link should be "http://MyLink.aspx?My_Number=1234"

I am sure it's been done but I don't know xsl style sheets and xslt
formatting that well.

Any help would be appreciated.
--
Re: Using Links in the xslt formatter Joe Webb
3/1/2007 12:00:00 AM
[quoted text, click to view]


Here's the way I do it.

<xsl:template match="notification">
<a>
<xsl:attribute
name="href">http://www.mydomain.com/mypath/<xsl:value-of
select='distinctending'/> </xsl:attribute><xsl:value-of
select="texttoshow"/>
</a>
<br/>
</xsl:template>


HTH...

--
Joe Webb
SQL Server MVP
http://www.sqlns.com



AddThis Social Bookmark Button