Hi All, I am working on FOP. I am trying to convert the xml file to pdf using FOP and I have achieved it. But I have One doubt in it. I think you people can help me out. I need to put different colors for true and false. But i dont know how to do it. I have attached my stylesheet with this mail.
<?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="1.0" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" version="1.0" indent="yes"/> <xsl:template match="CompleteReport"> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> <fo:layout-master-set> <fo:simple-page-master page-height="297mm" page-width="210mm" margin="5mm 25mm 5mm 25mm" master-name="PageMaster"> <fo:region-body margin="20mm 0mm 20mm 0mm"/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="PageMaster"> <fo:flow flow-name="xsl-region-body" > <fo:block> <xsl:apply-templates select="Roles|RoleServices"/> <xsl:apply-templates select="name"/> </fo:block> </fo:flow> </fo:page-sequence> </fo:root> </xsl:template> <xsl:template match="Roles|RoleServices"> <fo:block text-align="left"> <xsl:attribute name="space-before">1.3em</xsl:attribute> <fo:inline font-weight="bold" padding="1.5em" text-align="left"> <xsl:value-of select="local-name()"/> </fo:inline> </fo:block> <fo:list-block font-size="8pt"> <xsl:attribute name="space-before">1.3em</xsl:attribute> <fo:list-item> <fo:list-item-label> <fo:block text-align="left"> <xsl:value-of select="@name"/> </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start( )"> <fo:block text-align="right"> <xsl:apply-templates select="*|text()"/> </fo:block> </fo:list-item-body> </fo:list-item> </fo:list-block> </xsl:template> <xsl:template match="Roles/Roles|RoleServices/RoleServices"> <fo:list-block font-size="8pt"> <xsl:attribute name="space-before">1.3em</xsl:attribute> <fo:list-item> <fo:list-item-label> <fo:block text-align="left"> <xsl:value-of select="@name"/> </fo:block> </fo:list-item-label> <fo:list-item-body start-indent="body-start( )"> <fo:block text-align="right"> <xsl:apply-templates select="*|text()"/> -------In this place the text will be displayed Here I need to show True means in one color False means another color. </fo:block> </fo:list-item-body> </fo:list-item> </fo:list-block> </xsl:template> </xsl:stylesheet > Can any one help me out?? Regards Muthu