Jump to content
Sign in to follow this  
babynaamaw

<Image> Not Showing In The Browser. Newbie Here.

Recommended Posts

I have a problem trying to figure out how to make this work. This is for the project that Ive been making lately from my work. The company have this XML file that I need to get work with my already done website and Im planning to link this one to the already made website that Ive made. Here are the codes that Ive been trying to figure out for a week now and it still doesnt work in the browser. <?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="sample.xslt"?><rental modTime="2011-08-30-15:02:54" status="current"><images> <img id="a" modTime="2011-08-30-15:02:54" file="p2i4.jpg"/> <img id="b" modTime="2011-08-30-15:02:54" file="p2i5.jpg"/> <img id="c" modTime="2011-08-30-15:02:54" file="p2i6.jpg"/> <img id="d" modTime="2011-08-30-15:02:54" file="p2i7.jpg"/> <img id="e"/> <img id="f"/> <img id="g"/> <img id="h"/> <img id="i"/> <img id="j"/> <img id="k"/> <img id="l"/> <img id="m" modTime="2011-08-30-15:02:54" file="Photo/p2i3.jpg"/> <img id="n"/> <img id="o"/> <img id="p"/> <img id="q"/> <img id="r"/> <img id="s"/> <img id="t"/> <img id="u"/> <img id="v"/> <img id="w"/> <img id="x"/> <img id="y"/> <img id="z"/> </images></rental><name></name> <creationDate></creationDate> <author></author> <copyright></copyright> <authorEmail></authorEmail> <authorUrl></authorUrl> <version></version><description></description><files><filename>console.xml</filename> <filename>p2i3.jpg</filename> <filename>p2i4.jpg</filename> <filename>p2i5.jpg</filename> <filename>p2i6.jpg</filename> <filename>p2i7.jpg</filename> <filename>p3i8.jpg</filename> <filename>p4i10.jpg</filename> <filename>p4i9.jpg</filename> <filename>p5i11.jpg</filename> <filename>p5i12.jpg</filename> <filename>console.xml</filename> </files> and here is my sample XSLT code which im experimenting so I can start with the designing: <?xml version="1.0"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="/"> <html> <head> <title>Our Items</title> </head> <body style="background-color: #DACFE5; font-family:Arial, Helvetica, sans-serif"> <table border="1" align="center"> <tbody> <tr> <th>Pictures</th> </tr> <xsl:for-each select="//rental"> <tr> <td> <xsl:value-of select="rental/images/img"/> </td> </tr> </xsl:for-each> </tbody> </table>

Share this post


Link to post
Share on other sites

You haven't really told us which result you want, you do a value-of on "img" elements yet in your sample the "img" elements are all empty so it is not clear what you want to output as a value-of on an empty element does not output anything.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...