Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 8th, 2010, 01:54 AM
Registered User
 
Join Date: Jul 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Question Setting background color for a text in 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

Code:
<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

Code:
<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.

Code:
 <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?

Regards

Last edited by vatsag; July 8th, 2010 at 02:03 AM.. Reason: To give more clarity
 
Old July 8th, 2010, 11:05 AM
Friend of Wrox
 
Join Date: Jul 2006
Posts: 430
Thanks: 28
Thanked 5 Times in 5 Posts
Send a message via Yahoo to bonekrusher
Default

Code:
<fo:inline color = "red" background-color = "yellow">
    <xsl:value-of select="."/>
</fo:inline>
Should work. What fo processor are you using? and what version. I tested it in FOP .95 and it works.
 
Old July 9th, 2010, 12:35 AM
Registered User
 
Join Date: Jul 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi
How can i check the version of the fo ?
 
Old July 9th, 2010, 06:03 PM
Friend of Wrox
 
Join Date: Jul 2006
Posts: 430
Thanks: 28
Thanked 5 Times in 5 Posts
Send a message via Yahoo to bonekrusher
Default

What FO processor are you using? Apache FOP, XEP etc..





Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting background color for a text in XSLFO vatsag XSLT 0 July 8th, 2010 01:53 AM
How to change background color of text beetle_jaipur Javascript How-To 1 December 1st, 2009 02:03 AM
background-color: white; covers text smgolden CSS Cascading Style Sheets 6 August 3rd, 2007 12:21 PM
Setting Background color of the Stage with AS robprell Flash (all versions) 2 December 12th, 2005 02:51 PM
Changing Text Box Background Color rodmcleay Javascript How-To 9 December 11th, 2003 05:07 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.