I have an issue with calling an image across to my transformed xsl file.
It seems to be something very simple, yet I can't find a solution to it. I have tried searching on here already and using the various similar answers provided but have had no luck.
I'm trying to use the string inside
<image>string</image>
as the filepath to display my graphic.
Any resultant I've tried always gives me the small broken graphic icon.
Thanks in advance.
EDIT: I'll be more specific. (Sorry it's been a long day)
I'm using Notepad++, with the "XML Tools" plugin, I can apply the XSL Transformation by specifying the xsl file when I am focused on the XML file. Where I save it as a newly created html file.
Opening it should display all my data + the image. But instead, I get the placeholder instead for when a graphic cannot be located. (i.e. in Internet Explorer its the small icon with the red cross.)
Using the stylesheet method call at the start of the file should also allow me to view the transformation without the need to create any new file using Firefox. But it also fails to display.
Here is my XML:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet href="aperture_event_page.xsl" type="text/xsl"?>
<listings
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="aperture_venues.xsd">
<venue id="apv_01">
<image>/images/apv_01.png</image>
<other elements></other elements>
...
<more elements>
<elements></elements>
...
</more elements>
</venue>
<venue id="apv_02">
#repeat#
</venue>
<venue id="apv_03">
#repeat#
</venue>
<venue id="apv_04">
#repeat#
</venue>
</listings/>
and my XSL:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" omit-xml-declaration="yes"/>
<xsl:template match="/">
<xsl:element name="html">
<xsl:element name="head">
<xsl:element name="title">Event</xsl:element>
</xsl:element>
<xsl:element name="body">
<xsl:element name="image">
<img src="{image}"/>
</xsl:element>
<xsl:apply-templates select="/listings/venue/image"/>
</xsl:element>
</xsl:element>
</xsl:template>