load image from XML with XSL
I am using an XML document with all the content from my website, now I want to put my images in there to. To view the document I'm using XSL, how must I put the images in the XML?
[184 byte] By [
paetje] at [2007-11-11 8:08:40]

# 1 Re: load image from XML with XSL
There are 2 things you can do. You can just put the images into your xsl file, like you do in a normal html document. Or you can put the paths or the names of the images into your xml and then collect it from the file. To collect it from the xml file, use the for each and the value-of methods of xsl. You can find enough on that on the internet. Here you see an example of an empty xsl with html inside.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:output method="html" doctype-public= "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" />
<xsl:template match="/">
<html >
<head>
<title>Here you put the title</title>
</head>
<body>
Here you put the rest of the document
</body>
</html>
</xsl:template>
</xsl:stylesheet>