Hi,
Yes it can be done with XSLT, though you did not specify how you're trying to accomplish this. The easiest way is to use xsl:element to create an HTML img tag then display images from your hard disk.
The xml file (I called it gallery.xml)
<?xml version="1.0"?>
<?xml:stylesheet type="text/xsl" href="gallery.xsl"?>
<gallery>
<topic>Image Gallery</topic>
<picture>
<description>Description for Image 1.</description>
<image>1.gif</image>
</picture>
<picture>
<description>Description for Image 2.</description>
<image>2.gif</image>
</picture>
</gallery>
The xsl file (I called it gallery.xsl)
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl
utput method="html" />
<xsl:template match="/">
<html>
<head>
<title>My Image Gallery</title>
</head>
<body>
<h3>
<xsl:value-of select="gallery/topic"/>
</h3>
<xsl:for-each select="gallery/picture">
<xsl:value-of select="description"/>
<br />
<xsl:element name="img">
<xsl:attribute name="src">
<xsl:value-of select="image"/>
</xsl:attribute>
</xsl:element>
<br />
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
You end up being who you are.
http://www.geocities.com/lillamarta
Bookmarks