开发者

Setting background color for a text in XSLFO

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:va开发者_JS百科lue-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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜