Reputation: 4033
I am very very new to ASP and im trying to setup a new email for a friend.
They have a xsl file which is the template for an email which is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" version="1.0" encoding="UTF-8" />
<xsl:template match="/">
Here is the text for the email, go to our website <a href="">here</a>
</xsl:template>
</xsl:stylesheet>
They want to put in some dynamic values into the email, so i have entered the following
<a href="https://secure.website.com/page.asp?uid=<xsl:value-of select="email/userid"/>">Click here</a>
When i insert that, i keep getting errors, but when i use that code without the href tags, it displays fine.
If someone could help me out that would be great.
Cheers,
Upvotes: 0
Views: 70
Reputation: 7215
What you are looking for is this:
<a href="{email/userid}">
The salient point being that {...} points to the attribute or node value.
You could also try something like this:
<a>
<xsl:attribute name="href">https://secure.website.com/page.asp?uid=<xsl:value-of select="email/userid" /></xsl:attribute>
</a>
make sure to not have whitespace inside the xsl:attribute tag.
Upvotes: 1