I've been trying to use XSL to output data that my XML has. One of the requirements that is set is to have an image file in the XML file:
<room id="001"> <capacity>2 Adults</capacity> <room_name>King Double</room_name> <cost_st>$1700</cost_st> <cost_lt>$3400</cost_lt> <loc>Ground Floor</loc> <info>&in2;</info> <feat>&ft2;</feat> <deal>&pk2;</deal> <photo>kingdouble.jpg</photo> </room> While I can grab the string in between the tags, I can't seem to call the image file. Am I writing something wrong here, or is it an error in the XSL? As this is an assignment, I won't be posting my XSL thus far as I have other students from my course that refer to this website as well (this is to avoid plaigarism).
EDIT: This is a portion of my XSL:
<tr border="2" bgcolor="#ffebcd"> <td> <xsl:value-of select="room_name"/> </td> <td> <xsl:value-of select="capacity"/> </td> <td> <xsl:value-of select="info"/> </td> <td> <xsl:value-of select="loc"/> </td> <td> <xsl:value-of select="feat"/> </td> <td> <xsl:value-of select="cost_st"/> </td> <td> <xsl:value-of select="cost_lt"/> </td> </tr> </xsl:template> What I'm trying to do is call the image file without specifying the particular image because the XSL file will be used as a template for two separate XML pages.
No comments:
Post a Comment