tags:

views:

69

answers:

2

Hi,

how can i realize something like this:

<img alt="logo" src="/Content/Images/Logos/<xsl:value-of select="/customer/country"/>.png" />

The XSLT processor throws an error because of the "<" - sign here...

+1  A: 

You can use:

<img alt="logo" >
     <xsl:attribute name="src">
        /Content/Images/Logos/<xsl:value-of select="/customer/country"/>.png
     </xsl:attribute>
</img>
Dror
A: 

Elements cannot be nested within attribute values. You can use {...} to embed XPath as follows:

<img alt="logo" src="/Content/Images/Logos/{/customer/country}.png" />
Brandon Gano