Did you look at your html generated?
Just do this:
--------------------
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" indent="yes"/>
<xsl:template match="images">
<html><body>
<xsl:apply-templates/>
</body></html>
</xsl:template>
<xsl:template match="image">
Before Image
<img src="{filename}" width="50" height="50" border="1" /> After Image
</xsl:template>
</xsl:stylesheet>
--------------------
You didn't need to define a variable, and besides, you can't define a variable
outside a template context and have the expression refer the context of a
template.
dwh
Bennett wrote:
> image.xsl:
> ---------------------------------------
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0">
> <xsl:output method="html" indent="yes"/>
>
> <xsl:variable name="source">
> <xsl:value-of select="./filename" />
> </xsl:variable>
>
> <xsl:template match="images">
> <html>
> <body>
> <xsl:apply-templates/>
> </body>
> </html>
> </xsl:template>
>
> <xsl:template match="//image">
> Before Image
> <img src="${source}" width="50" height="50" border="1" /> After Image
> </xsl:template>
> </xsl:stylesheet>
> ---------------------------------------