Re: Image in XSL?

Subject: Re: Image in XSL?
From: "Joe McDonald" <joe@xxxxxxxxxxxxxxx>
Date: Fri, 4 Aug 2000 12:34:22 -0400
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


Current Thread