Hiya!
I have this XSL file that basically creates a list of dynamic anchors that when clicked take you to a news story with a graphic in the same page:
Code:
<?xml version="1.0"?>
<xsl:transform
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<html>
<head/>
<body bgcolor="#777777">
<img src="HEADER.jpg" />
<h2 id="contents">News Articles</h2>
<xsl:apply-templates mode="toc"/>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="Article" mode="toc">
<a href="#{ArticleTitle}" ><xsl:value-of select="ArticleTitle"/></a><br/>
</xsl:template>
<xsl:template match="Article">
<div>
<h2><a name="{ArticleTitle}"><xsl:value-of select="ArticleTitle"/></a></h2>
<xsl:apply-templates/>
</div>
</xsl:template>
<xsl:template match="ArticleTitle"/>
<xsl:template match="ArticleEntry">
<p><img src="{ImageLoc}" width="100px" height="100px" id="image"/></p>
<p><a href="trans_XML_TV.php">back to story links</a></p>
<p><a href="index.html">home</a></p>
<p><xsl:apply-templates/></p>
<p><a href="trans_XML_TV.php">back to story links</a></p>
<p><a href="index.html">home</a></p>
</xsl:template>
</xsl:transform>
Problem is the graphic does not display (where ImageLoc is the node in the XML containing the path to the image):
Code:
<p><img src="{ImageLoc}" width="100px" height="100px" id="image"/></p>
In the HTML source comes out like this:
Code:
<p><img src="" width="100px" height="100px" id="image"/></p>
Does anyone know what I am doing wrong?
Cheers!