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

Re: [xsl-fo] Select background image from xml file

Subject: Re: [xsl-fo] Select background image from xml file
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Fri, 16 Dec 2011 16:41:50 -0500
Re:  [xsl-fo] Select background image from xml file
At 2011-12-16 15:32 -0600, Colin DeClue wrote:
Hey guys,

I'm trying to have a background image over the entire page for a
report I'm doing, but I need to have the xml determine what the
background image should be. Is there an easy way I can do that?
Currently, I have:

<fo:simple-page-master master-name="first"
           page-width="8.5in"   page-height="11in"
           margin-top="0.13in"  margin-bottom="0.25in"
           margin-left="0.175in" margin-right="0.25in"
background-image="Bol2.png">

The Bol2.png part I want to be a uri I pass in.

If you are generating your XSL-FO from XSLT, you can pass it in as a command-line parameter along the lines of:


  <xsl:param name="bgimage"/>
  ...
  background-image='url("{$bgimage}")'

Note that I've used the appropriate syntax for an image reference in an XSL-FO file. While some processors may accept a simple file name as you've used, that is not what the specification expects to be used.

I hope this helps.

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


-- Contact us for world-wide XML consulting and instructor-led training Free 5-hour video lecture: XSLT/XPath 1.0 & 2.0 http://ude.my/uoui9h Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Google+ profile: https://plus.google.com/116832879756988317389/about Legal business disclaimers: http://www.CraneSoftwrights.com/legal

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.