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:[email protected]] Sent: Tuesday, March 10, 2009 9:22 AM To: Jeff Hooker; [email protected] 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="//imageda...@role = 'watermark']"><xsl:value-of select="//imageda...@role = 'watermark']/@fileref"/></xsl:when> <xsl:otherwise>path/to/default/watermark.png</xsl:otherwise> </xsl:choose> </xsl:parameter> David _____ From: Jeff Hooker [mailto:[email protected]] Sent: Tuesday, March 10, 2009 5:11 PM To: [email protected] 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
