Click to See Complete Forum and Search --> : XSL - Displaying an Image, Filename is in the XML


bertieisaacm
12-17-2008, 04:09 PM
To Whom...
This is my very first example to get a feel for XSLT: inside of the xml as an elements value, I have a filename.
...
<filename>item1.jpg</filename>
...
inside of my xsl I have tried to simply display the image as follows.
...
<img src='<xsl:value-of select="filename" />' />
...
I have tried many other ways that seemed obvious, but I have had no luck...
Can somebody let me know how this seemingly simple task will work.
Merry Christmas AND/OR Happy Holidays.

Charles
12-17-2008, 05:19 PM
<img>
<xsl:attribute name="alt">
<xsl:value-of select="alt-text"/>
</xsl:attribute>
<xsl:attribute name="src">
<xsl:value-of select="filename"/>
</xsl:attribute>
</img>Or something like that.

And a "Bah, Humbug!" to you.