Koes, Derrick wrote: > Interestingly enough, putting the background-image attribute as a "real" > attribute of fo:block in the transform produces the desired result. > However, adding it with an xsl:attribute element does not produce the > desired result. > I think I need to use xsl:attribute because I want to add/set the > attribute > conditionally. > > 1. works: > > <fo:block background-image="draft.jpg"> > > > 2. does not work: > > <fo:block> > <xsl:attribute name="background-image"> > <xsl:value-of select="draft.jpg"/> > </xsl:attribute>
The xsl:value-of evaluates an XPath expression, and I don't think "draft.jpg" qualifies. Look at your fo file to be sure. I think that all you need is: <fo:block> <xsl:attribute name="background-image"> draft.jpg </xsl:attribute> ... </fo:block> Then you can wrap your conditional logic around the line containing "draft.jpg". HTH. Victor Mote --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]