|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: 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
|
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
|

Cart








