tags:

views:

57

answers:

1

Hello Im very new to the XSLFO. I have a requirement to color a text entry based on some condition. which i do using the snippet

<fo:inline color = "red">
    <xsl:value-of select="."/>
</fo:inline> 

With the above snippet i am able to set the forecolor of the text to RED. My question is how to set the background color for the same.

I can add background color using

 <fo:inline color = "red">
   <fo:block background-color = "yellow">
    <xsl:value-of select="."/>
  </fo:block> 
 </fo:inline> 

But this is making my entry come on a separate line which isnt my requirement

Though the xslfo documentation says there is a property available for to add the background color for a text.

 <fo:inline background-color = "yellow">
 Hello,World
 </fo:inline>

Im using the xslfo version 1.0

Anyone out there to help me out ?

Regards

+1  A: 

background-color is supported for fo:inline.

It is often helpful to test your XSL-FO against several FO engines, in order to rule out issues with XSL-FO support and bugs in the engine that you are using.

Try running against Antennahouse, renderX, Ibex, or any other engine(most offer a trial version) to see if it is a problem with your XSL-FO or your FO engine.

Mads Hansen