[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

XLST including image in HTML transformation

Subject: XLST including image in HTML transformation
From: Matt Gushee <mgushee@xxxxxxxxxxxxx>
Date: Thu, 24 May 2001 14:37:17 -0600 (MDT)
xlst img
gary cor writes:

 > I hope someone can help.  I have the URI of an image file inside an element 
 > in an XML file I would like the XSL to show the image when it does various 
 > transformations into HTML.

You say URI. Is the URI a URL, or does it have a predictable
relationship to a URL? If so, it should be easy to include a JPEG,
GIF, or PNG in your output. The obvious way is to create a template
such as:

     <xsl:template match="my_graphic">
         <IMG SRC="{@uri}"/>
     </xsl:template>

But perhaps you've tried this. Is there some complication you're not
telling us about?

 > I have tried so many things with no success and am currently running a 
 > script quite seperately which is very difficult to keep adjusting as  the 
 > XML changes.

Can you be more specific? What have you tried?

 > The images are JPEG and there is the possiblitity that some 
 > may also be SVG eventually?

JPEGs are easy, since all you need to do is reference them with an IMG
tag. SVG ... I suppose you would either: (a) if you have the luxury of
assuming the client supports SVG, just dump it into the page (in an
<OBJECT> tag, maybe? I haven't worked w/ SVG myself), or (b) call an
external processor to convert it to one of the standard bitmap
formats.

Matt Gushee
Englewood, CO, USA

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.