T
thomas
Hi folks,
I was wandering how to output images using XML and XSLT. I've tried but I
can't get it to work
I've used XML and XSLT before but it was in a different format. See for
yourself :-
http://www.guitarmidi.co.uk/gui/index.html
but here I didn't use any images and I only output 1 result per table row.
What I want to do now is output 4 results per table row and I want to use
some images. I would like to have the image and the name of the artist in a
cell and when you click on the image it takes you to the official website of
the artist.
part of the output.xsl file
================
<xsl:variable name="link1"><xsl:apply-templates select="./link"
/></xsl:variable>
<td><a href="{$link1}" target="_blank"><code to show image></a></td>
<td><xsl:apply-templates select="./artist" /></td>
I have a directory called images with the images I want to use
(rolling_stones.jpg, beatles.jpg etc)
heres my data.xml file
==============
<catalogue>
<record>
<artist>rolling stones</beatles>
<link>http://www.rollingstones.com/home.php</link>
</record>
<record>
<artist>beatles</beatles>
<link>http://www.beatles.com</link>
</record>
<record>
<artist>david bowie</beatles>
<link>http://www.davidbowie.com</link>
</record>
<record>
<artist>bob dylan</beatles>
<link>http://www.bobdylan.com/index.html</link>
</record>
</catalogue>
Any help with this would be appreciated.
I was wandering how to output images using XML and XSLT. I've tried but I
can't get it to work
I've used XML and XSLT before but it was in a different format. See for
yourself :-
http://www.guitarmidi.co.uk/gui/index.html
but here I didn't use any images and I only output 1 result per table row.
What I want to do now is output 4 results per table row and I want to use
some images. I would like to have the image and the name of the artist in a
cell and when you click on the image it takes you to the official website of
the artist.
part of the output.xsl file
================
<xsl:variable name="link1"><xsl:apply-templates select="./link"
/></xsl:variable>
<td><a href="{$link1}" target="_blank"><code to show image></a></td>
<td><xsl:apply-templates select="./artist" /></td>
I have a directory called images with the images I want to use
(rolling_stones.jpg, beatles.jpg etc)
heres my data.xml file
==============
<catalogue>
<record>
<artist>rolling stones</beatles>
<link>http://www.rollingstones.com/home.php</link>
</record>
<record>
<artist>beatles</beatles>
<link>http://www.beatles.com</link>
</record>
<record>
<artist>david bowie</beatles>
<link>http://www.davidbowie.com</link>
</record>
<record>
<artist>bob dylan</beatles>
<link>http://www.bobdylan.com/index.html</link>
</record>
</catalogue>
Any help with this would be appreciated.