XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old June 17th, 2003, 04:17 AM
Foustan Foustan is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Tunis
Posts: 5 Foustan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy display a picture with xslt

hi everyone , i'm a begginer with xml/xslt and i have a little problem with an xslt stylesheet.
with stylesheet designer i have built an xslt stylesheet and attach it an xml file. One of my goals is to display a gif picture that the filename is situated in the xml file between these tag <Chart>myimage.gif</Chart>

the xslt stylesheet work fine until the line concerned by displaying the gif file.(<xsl:for-each select="Chart">) i do not know why it does not display anything

anyone to help me ? thanks

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<head/>
<body>
<xsl:for-each select="/">
<xsl:for-each select="Report">
<xsl:for-each select="DATA">
<xsl:if test="position()=1">
<table border="1">
<thead>
<tr>
<td>DestinationIP</td>
<td>Count</td>
</tr>
</thead><tbody>
<xsl:for-each select="../DATA">
<tr>
<td><xsl:for-each select="DesinationIP">
<xsl:apply-templates/>
</xsl:for-each>
</td>
<td><xsl:for-each select="Count">
<xsl:apply-templates/>
</xsl:for-each>
</td></tr>
</xsl:for-each>
</tbody></table>
</xsl:if>
</xsl:for-each>
</xsl:for-each>
</xsl:for-each>
<xsl:for-each select="Chart">
<img border="0">
<xsl:attribute name="src"><xsl:value-of select="../Report"/></xsl:attribute>
</img>
</xsl:for-each>
</body>
</html>
</xsl:template>

Reply With Quote
  #2  
Old June 17th, 2003, 04:36 AM
Foustan Foustan is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Tunis
Posts: 5 Foustan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
sorry i thought it was not necessary.
i have attached the xml file
the original xslt
and the picture i want to display
in the xslt file the path u will find is where the picture is sored

thanks
Attached Files
File Type: zip xslt.zip (8.6 KB, 364 views)

Reply With Quote
  #3  
Old June 17th, 2003, 05:26 AM
Foustan Foustan is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Tunis
Posts: 5 Foustan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
the picture is sotred in a different directory than the xml file.
under my root website directory : i have three directory
/Xmlfiles
/xsltfiles
/report for storing the pictures

that's why i have written ../report
it's not correct ?

Reply With Quote
  #4  
Old June 17th, 2003, 05:33 AM
Foustan Foustan is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Tunis
Posts: 5 Foustan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
ok thanks it works when picture is in the same directory of the xml file

if it's in another directory ? what would be the instruction that i have to write

Reply With Quote
  #5  
Old June 17th, 2003, 05:48 AM
Foustan Foustan is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Location: Tunis
Posts: 5 Foustan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks A LOOOOOOOOOOOT

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > display a picture with xslt


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway