img src and xslt
"ksb1454" <[email protected]> 15 Apr 2007 20:44:09 -0700
| Newsgroups | gmane.comp.mozilla.devel.layout.xslt |
|---|---|
| Organization | http://groups.google.com |
| Message-ID | <[email protected]> |
i know this has been answered in a previous post and I thought i went
over that one pretty good but i still can't get the image to display
can someone look at this code and see what i'm leaving out. Thank you!
here is my code
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="crafting.xsl"?>
<item>
<woodworking>
<apprentice>
<title>Campfire Materials</title>
<desc><img src="heavy_rowan_hammer.JPG"/></desc>
<mats1>5 Rowan Wood</mats1>
<mats2>1 Kindling Material</mats2>
<mats3>1 Ball of Twine</mats3>
</apprentice>
</woodworking>
</item>
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<h3>Apprentice</h3>
<table border="1">
<tr bgcolor="#daa520">
<th align="left">Name</th>
<th align="left">Description</th>
<th align="left">Materials(1)</th>
<th align="left">Materials(2)</th>
<th align="left">Materials(3)</th>
<th align="left">Materials(4)</th>
<th align="left">Materials(5)</th>
</tr>
<xsl:for-each select="item/woodworking/apprentice">
<xsl:value-of select="title"/>
<xsl:attribute name="src"><xsl:value-of select="desc/img/@src"/
></xsl:attribute>
<xsl:value-of select="mats1"/>
<xsl:value-of select="mats2"/>
<xsl:value-of select="mats3"/>
<xsl:value-of select="mats4"/>
<xsl:value-of select="mats5"/>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>