954,568 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Set background color to a text using XSLFO

Hello Im very new to the XSLFO. I have a requirement to color a text entry with a suitable background color which i do using the snippet

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


With the above snippet i am able to set the forecolor of the text to RED but not the background color.


Though 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

Although 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>


The background color still doesnt get applied to the text.
Im using the xslfo version 1.0

Anyone out there to help me out what could be the cause?

Cheers

vatsag
Newbie Poster
1 post since Jul 2010
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: