RE: [xsl] Displaying Images using MSXML

Subject: RE: [xsl] Displaying Images using MSXML
From: "Hewko, Doug" <Doug.Hewko@xxxxxxxxxxxxxxx>
Date: Wed, 15 Aug 2001 07:26:01 -0400
The problem is that MSXML (4.0 might, but not earlier version) does not
support the <xsl:output="html"/> declaration. <xsl:output="html"> requires
1999/XSL/Transform

Here's another way to try your image:
<img>
<xsl:attribute name="src">
<xsl:value-of select="filename"/>
</xsl:attribute>
</img>


-----Original Message-----
From: Alexander Gutman [mailto:gutman@xxxxxxxxxxxxxxx]
Sent: August 15, 2001 2:41 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] Displaying Images using MSXML


Hello.

Sean Kelly wrote:
> a newbie question using MSXML.
> i'm wondering how i would go about transforming an xml file that holds 
an
> image's filename, to display that image. eg,
> 
> <?xml version="1.0"?>
> 
> <images>
>     <picture>
>         <filename>sunflower.jpg</filename>
>         <text>a photgraph of a sunflower</text>
>     </picture>
>     <picture>
>         <filename>starfish.gif</filename>
>         <text>a photgraph of a starfish</text>
>     </picture>
> </images>
> 
> can anyone point me in the right direction on how i acheive this. i
> understand that an image in XSL the <IMG> tag needs to be closed ie. 
<IMG
> SRC="starfish.gif"/>

Actually, I do not what's the problem.
The image should be displaied (in a clients' browser)
if you do what you say. :-)
So, what kind of help do you need?

How to get a filename from your source?
Then use an appropriate XPath expression; e.g.,
"(/images/picture/filename)[1]" returns the first filename.

How to obtain the desired output with <IMG>'s?
Then code as you say, with the filename substituted
by your expression in "{...}".

How to make those tags "unclosed"?
Then specify <xsl:output method="html"/>.

What else? :-)

-- 
Alexander E. Gutman

 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