RE: Setting the draft.watermark.image parameter value

From
Jeff Hooker <>
Date
2009-03-10T16:28:16+00:00
ID
[email protected]_nt.nt.pmc-sierra.bc.ca
Thread
RE: Setting the draft.watermark.image parameter value
That 
was actually the route that I first tried, and I couldn't figure out why it 
wasn't working. When I hardcoded the values, it worked, when I had a choose 
statement, it didn't. 

 

I 
could be wrong, but here's what I've concluded: the draft.watermark.image value 
needs to be set before the scripts actually start parsing the xml file and 
laying out the FO, therefore, I can't use the contents of the XML to set the 
value of the parameter in the usual fashion; sneakiness is needed. 
Thoughts?

  
-----Original Message-----
From: David Cramer 
  [mailto:]
Sent: Tuesday, March 10, 2009 9:22 
  AM
To: Jeff Hooker; 
  
Subject: RE: Setting the 
  draft.watermark.image parameter value

  

  
Parameters can 
  contain all kinds of interesting things. For example, you might do something 
  like this:

  
 

  
<xsl:parameter 
  name=”draft.watermark.image”>

  
<xsl:choose>

  
<xsl:when 
  test=”//imagedata[@role = ‘watermark’]”><xsl:value-of 
  select=”//imagedata[@role = 
  ‘watermark’]/@fileref”/></xsl:when>

  
<xsl:otherwise>path/to/default/watermark.png</xsl:otherwise>

  
</xsl:choose>

  
</xsl:parameter>

  
 

  
David

  

  

  
  

  
From: Jeff 
  Hooker [mailto:] 
Sent: Tuesday, March 10, 2009 5:11 
  PM
To: 
  
Subject: Setting the 
  draft.watermark.image parameter value

  
 

  

  
Hi 
  all,

  

  
 

  

  
I'm trying to allow 
  my users to set their own watermark simply by defining an image labeled 
  "watermark" within their document. This means I need to set the value of 
  the draft.watermark.image value dynamically. This is a little difficult 
  because, as far as I can tell, the parameter value needs to be set 
  before the target file is processed (makes sense, just inconvienent at the 
  moment). Is there any boilerplate way of getting around 
  this?

  

  
 

  

  
Thanks,

  

  
Jeff