Re: dynamic external images

At 2003-05-30 14:50 -0400, Ai, Larry wrote:
>I try the following:
>
><xsl:variable name="image">
>     <!-- the following template return an image file name -->
>     <xsl:call-template name="create-image"/>
></xsl:variable>
>
><fo:external-graphic src="$image"/>
>
>FOP does not allow variable used in the attribute.

You are triggering an XSLT problem, not an XSL-FO problem.  Use an 
attribute value template to put a variable's value into a result tree 
element's attribute:

   <fo:external-graphic src="{$image}"/>

I hope this helps.

................... Ken


--
Upcoming hands-on courses: (registration still open!)
-      (XSLT/XPath and/or XSL-FO) North America: June 16-20, 2003

G. Ken Holman                mailto:gkholman@CraneSoftwrights.com
Crane Softwrights Ltd.         http://www.CraneSoftwrights.com/f/
Box 266, Kars, Ontario CANADA K0A-2E0   +1(613)489-0999 (F:-0995)
ISBN 0-13-065196-6                      Definitive XSLT and XPath
ISBN 0-13-140374-5                              Definitive XSL-FO
ISBN 1-894049-08-X  Practical Transformation Using XSLT and XPath
ISBN 1-894049-11-X              Practical Formatting Using XSL-FO
Member of the XML Guild of Practitioners:    http://XMLGuild.info
Male Breast Cancer Awareness http://www.CraneSoftwrights.com/f/bc

Received on Friday, 30 May 2003 15:24:36 UTC