|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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> |
|
#2
|
|||
|
|||
|
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 |
|
#3
|
|||
|
|||
|
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 ? |
|
#4
|
|||
|
|||
|
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 |
|
#5
|
|||
|
|||
|
Thanks A LOOOOOOOOOOOT
![]() |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > display a picture with xslt |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|