PDA

View Full Version : img doesn't show


ScottInTexas
10-26-2003, 10:54 PM
The image in this XML file doesn't show up.


XSL File =

<?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>
<link rel='stylesheet' href='styles.css' type='text/css' />
<body>
<h1><xsl:value-of select="resume/name" /></h1>
<div id="photoImg" border="none" clear="left"><xsl:value-of select="resume/photo" /></div>

etc., etc.

XML File =

<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="resume.xsl" ?>

<resume>
<photo><img src="images/TravisOn6X6.jpg" width="482" height="361" alt="" border="0" /></photo>
<name>Scott Stewart</name>
<licno >1234567890</licno>



Everything else shows up correctly. In a stand alone HTML file the img shows up correctly.

Thanks for the help.

mda2711
10-31-2003, 04:56 PM
I'm not sure, but I think the documents are treating the img tag in the XML document as an XML element, not data that can be used.
As for a soloution, I really don't know. I'm having trouble displaying links using the href etc from an XML document, and this looks like the same sort of problem.

justame
10-31-2003, 05:34 PM
sco...
/me just a searched® on www.google.com for...
insert images xml
n' just a found® this... http://www.developerfusion.com/show/3227/



<WEBIMG>
<IMG NAME='BuyHeader' src='/images/someotherimage.jpg'/>
</WEBIMG>

ummm seems theyyyre just a using® <webimg> vs. your <photo>

mayyybe thattt will just a work® ifin' you change your 'tag' ...:O)))

just a goodluck® n' hoping it helps...:O)))

jkd
10-31-2003, 08:27 PM
Instead of:

<div id="photoImg" border="none" clear="left"><xsl:value-of select="resume/photo" /></div>


Use:


<div id="photoImg" border="none" clear="left"><img src="{resume/photo/img/@src}" width="482" height="361" alt="" border="0"/></div>

justame
11-01-2003, 05:36 AM
/me just a whispers® to jkd...

<photo> + <webimg>=<photoimg> lol...

mda2711
11-01-2003, 11:29 AM
I mentioned above about the link, could any of that help me?

ScottInTexas
11-01-2003, 02:56 PM
Thanks for the replies.

JKD's worked just fine. Now if I can only get the xml page to obey the zindex I think I'll be done with this site.