Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: Generating an IMG tag [Thread Next] Re: Generating an IMG tagTo: NULL Date: 9/2/2005 2:36:00 AM John Harrison wrote:
>>
>> xsl:attribute perhaps. Something like this
>>
>> <img>
>> <xsl:attribute name="concat('images/', percent)"/>
>> </img>
>>
>> Something like that anyway. You can probably fixup the XPath.
>>
>
> Let's try again
>
> <img>
> <xsl:attribute name="src">
> <xsl:value-of select="concat('images/', concat(percent, '.png'))">
> </xsl:attribute>
> </img>
>
> Alternatively you could wait for someone who knows what they are talking
> about to answer.
>
> I'm pretty sure xsl:attribute is the answer however.
Not that it's better, but here's how I would have likely done it:
<img>
<xsl:attribute name="src">
<xsl:text>images/</xsl:text>
<xsl:value-of select="percent">
<xsl:text>.png</xsl:text>
</xsl:attribute>
</img>
Don't forget an alt attribute!
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
