Joe Essey
Joe Essey

Reputation: 3538

how to place value of xpath in to html img tag

The following code gets me the appropriate string, but I don't know how to put the value in to an html img tag:

<xsl:value-of select="MT[@N = 'tag']/@V" />

I've tried this:

<img src="<xsl:value-of select="MT[@N = 'tag']/@V" />

and several variations.

Thanks.

Upvotes: 2

Views: 110

Answers (1)

Daniel Haley
Daniel Haley

Reputation: 52888

Use an Attribute Value Template (AVT)

<img src="{MT[@N = 'tag']/@V}" />

Upvotes: 4

Related Questions