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

RE: problem with image path

Subject: RE: problem with image path
From: <Jarno.Elovirta@xxxxxxxxx>
Date: Fri, 15 Oct 2004 10:12:20 +0300
xsl image path
Hi,

> The following is my code snippets for handling <img> tag.I
> have some problem
> with image path.
> I am created a servlet to converting a web page into pdf.For
> this i have
> used a button on my page
> to invoke the servlet and gets the pdf of current web page.
> Here i am used
> the image path as
> <img src="http://localhost:8080/PDF/images/banner.gif"
> />.Here the image
> will be displayed on the web page
> and i can convert it into pdf using the following xsl.Now i
> have created a
> pdf converter application(standalone application)and tried
> with some html
> page.Here what my problem is the images in the web pages are
> not get with
> pdf document.Because in normal web page we can specify the
> path of image as
>
> <img   src="images/banner.gif"/>
>
>
> <!--********Code to handle img tag***********-->
>
> <xsl:template match="img">
> <fo:block>
> 	<fo:external-graphic>
> 		<xsl:attribute name="src">
> 			<xsl:text>url('</xsl:text>
> 				<xsl:value-of select="@src"/>
> 			<xsl:text>')</xsl:text>
> 		</xsl:attribute>
> 	</fo:external-graphic>
> </fo:block>
> </xsl:template>
>
>
>
> How can i convert this path to actual path?How can i handle
> both url and
> local path?

If the above code generates

  <fo:block><fo:external-graphic src="url('images/banner.gif')"/><fo:block>

what is the base URL your FO processor uses? If you don't actually store the
resulting FO file into the parent directory of images, then the base URL could
be the directory where the FO processor was started or something else you
don't want.

Cheers,

Jarno - Hocico: Temple of Lies

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.