This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Displaying Images using MSXML
- To: "'xsl-list at lists dot mulberrytech dot com'" <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] Displaying Images using MSXML
- From: "Hewko, Doug" <Doug dot Hewko at ccra-adrc dot gc dot ca>
- Date: Wed, 15 Aug 2001 07:26:01 -0400
- Reply-To: xsl-list at lists dot mulberrytech dot com
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@novosoft-us.com]
Sent: August 15, 2001 2:41 AM
To: xsl-list@lists.mulberrytech.com
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