OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: 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:dcramer@motive.com]
Sent: Tuesday, March 10, 2009 9:22 AM
To: Jeff Hooker; docbook-apps@lists.oasis-open.org
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:Jeff_Hooker@pmc-sierra.com]
Sent: Tuesday, March 10, 2009 5:11 PM
To: docbook-apps@lists.oasis-open.org
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

 

 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]