Re: [xsl] display dynamic image URL using xsl-fo external-graphic

Subject: Re: [xsl] display dynamic image URL using xsl-fo external-graphic
From: Tony Graham <Tony.Graham@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 23 Nov 2009 09:26:08 +0000
On Mon, Nov 23 2009 08:04:34 +0000, Arvind_PATIL@xxxxxxxxxxxxxxxxx wrote:
> Hi,
> My requirement is to display a dynamic image using XSL-FO
> external-graphics tag.
> The source of the image is a servlet URL:
>
> For eg: 
> http://10.89.17.26:8081/myapp/servlet/acs/dynamicImage?arg=0sOH6mFP%2Bve
> f3Jr%2BbDwfj8qdlFQtHaP9%2BaGhIynH%2Bw%2FSY1Z1DoiUhj3O6HXUi16BZP9MOwQyCSM
> tOYtUQbM%2F8MF1dgg1i3R1%2FkorW%2BbzRtipJpVlBUTpt4YCYKanyh3JOx5kv4%2B7Txy
> LwRa62YhV2kiQMgRE%
>
> If I paste this URL to browser's URL (and with my Application sever on),
> it displays the image correctly.
>
> I am trying to display using below code snippet:
> <fo:external-graphic src="url('$dynURL')">
>  </fo:external-graphic> 
>
> How do I ensure that it can be displayed in PDF using xsl-fo?

For starters, in your XSLT it should be:

   src="url('{$dynURL}')"

so $dynURL is evaluated rather than the literal '$dynURL' appearing in
the FO.

It's hard to say what else can be going wrong until you confirm that you
have the right URL in the FO, and it would probably also help if you
said which XSL formatter you are using.

Regards,


Tony Graham                         Tony.Graham@xxxxxxxxxxxxxxxxxxxxxx
Director                                  W3C XSL FO SG Invited Expert
Menteith Consulting Ltd                               XML Guild member
XML, XSL and XSLT consulting, programming and training
Registered Office: 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland
Registered in Ireland - No. 428599   http://www.menteithconsulting.com
  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
xmlroff XSL Formatter                               http://xmlroff.org
xslide Emacs mode                  http://www.menteith.com/wiki/xslide
Unicode: A Primer                               urn:isbn:0-7645-4625-2

Current Thread