all groups > dotnet xml > january 2007 >
You're in the

dotnet xml

group:

insert a xsl:value -of into a href property



Re: insert a xsl:value -of into a href property Martin Honnen
1/29/2007 2:04:16 PM
dotnet xml: [quoted text, click to view]

Use an attribute value template where an XPath expression is braced with
{} e.g.
<a href="Mypage.aspx?docID={docID}">Click this link</a>

Or do it the verbose way
<a>
<xsl:attribute name="href"><xsl:value-of
select="concat('Mypage.apsx?docID', docID)"/></xsl:attribute>
Click this link
</a>


--

Martin Honnen --- MVP XML
insert a xsl:value -of into a href property Rotsey
1/29/2007 5:37:12 PM
Hi,

I want to insert a variable in XSL into a the href property of a anchor.

What is the syntax for this???

<a href="Mypage.apsx?docID=<xsl:value-of select='docID'">Click this link</a>

Is that correct?
rotsey

AddThis Social Bookmark Button