[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Image in XSL?
Eddy, This is what I used to display an image. The XML snippet: <homepage> <pagecontents> <top> <image-clear1 src="tp.gif" width="55" height="4" /> <image-clear2 src="tp.gif" width="141" height="2" /> <image-logo src="bo.gif" width="432" height="72" /> <image-clear3 src="tp.gif" height="15" /> </top> </pagecontents> </homepage> The XSL snippet: <table><xsl:for-each select="homepage/pagecontents/top"> <tr><td><img> <xsl:attribute name="src"> <xsl:value-of select="image-clear1/@src" /> </xsl:attribute> <xsl:attribute name="width"> <xsl:value-of select="image-clear1/@width" /> </xsl:attribute> <xsl:attribute name="height"> <xsl:value-of select="image-clear1/@height" /> </xsl:attribute> </img></td> <td><img> <xsl:attribute name="src"> <xsl:value-of select="image-clear2/@src" /> </xsl:attribute> <xsl:attribute name="width"> <xsl:value-of select="image-clear2/@width" /> </xsl:attribute> <xsl:attribute name="height"> <xsl:value-of select="image-clear2/@height" /> </xsl:attribute> </img></td> <td valign="top" align="left"> <img> <xsl:attribute name="src"> <xsl:value-of select="image-logo/@src" /> </xsl:attribute> <xsl:attribute name="width"> <xsl:value-of select="image-logo/@width" /> </xsl:attribute> <xsl:attribute name="height"> <xsl:value-of select="image-logo/@height" /> </xsl:attribute> </img> </td> </tr> </xsl:for-each></table> </td> </tr> </table> and so on..... This displays the images correctly. Hope this helps. Joe ----- Original Message ----- From: "Medina, Edward" <emedina@xxxxxxx> To: <xsl-list@xxxxxxxxxxxxxxxx> Sent: Friday, August 04, 2000 9:03 AM Subject: RE: Image in XSL? > Chris > :<IMG > > : <xsl:attribute name="SRC"> > : file://H:/xml/test/disp_jsr_banner_gif > : </xsl:attribute> > :</IMG> > : > :Ciao Chris > : > > I'll try this, but won't it > display the link, instead of the image? > I was able to display it with the following > > <IMG SRC="disp_jsr_banner.gif"/> > > I'm interested in your idea though and I will > try it. > > Eddy > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|