XSL:FO How do I add color to the <span> elements inside of the <p> element
<p>Question: How can I add color to the span elements using xsl:fo?</p>

<p>Assume that I have a document with paragraph blocks that look like this:</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;diffreport&gt;&lt;css/&gt;&lt;diff&gt;
&lt;p&gt;One morning, when Gregor Samsa woke from troubled dreams, he found himself transformed in his bed into a horrible vermin. He lay on his armour-like back, and if he lifted his head a little he could see his brown belly, slightly domed and divided by arches into stiff sections. The bedding was hardly able to cover it and seemed ready to slide off any moment. His many legs, pitifully thin compared with the size of the rest of him, waved about helplessly as he looked. 
&lt;span style="background-color:rgb(255, 255, 255); color:rgb(102, 102, 102)"&gt;&lt;span class="diff-html-added" id="added-diff-0" previous="first-diff" changeId="added-diff-0" next="added-diff-1"&gt;Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts.&lt;/span&gt;&lt;/span&gt;
&lt;/p&gt;
&lt;/diff&gt;&lt;/diffreport&gt;
</code></pre>

<p>I have created an xsl:fo template file that looks like this.</p>

<pre><code>&lt;?xml version="1.0"?&gt;
&lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:s="http://www.stylusstudio.com/xquery"&gt;
&lt;xsl:template match="/"&gt;
    &lt;fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"&gt;
        &lt;fo:layout-master-set&gt;
            &lt;fo:simple-page-master master-name="default-page" page-height="11in" page-width="8.5in" margin-left="0.6in" margin-right="0.6in" margin-top="0.79in" margin-bottom="0.79in"&gt;
                &lt;fo:region-body/&gt;
            &lt;/fo:simple-page-master&gt;
        &lt;/fo:layout-master-set&gt;
        &lt;fo:page-sequence master-reference="default-page"&gt;
            &lt;fo:flow flow-name="xsl-region-body"&gt;
                &lt;fo:block&gt;
                    &lt;fo:block text-align="center"&gt;
                        &lt;fo:block&gt;
                            &lt;xsl:text&gt;Report&lt;/xsl:text&gt;
                        &lt;/fo:block&gt;
                    &lt;/fo:block&gt;
                    &lt;fo:table width="100%" border-style="outset" border-width="2pt" background-repeat="repeat"&gt;
                        &lt;fo:table-column/&gt;
                        &lt;fo:table-body&gt;
                            &lt;fo:table-row&gt;
                                &lt;fo:table-cell border-style="inset" border-width="2pt" padding="2pt" background-repeat="repeat" display-align="center"&gt;
                                    &lt;fo:block&gt;
                                        &lt;xsl:text&gt;Document&lt;/xsl:text&gt;
                                    &lt;/fo:block&gt;
                                &lt;/fo:table-cell&gt;
                            &lt;/fo:table-row&gt;
                            &lt;fo:table-row&gt;
                                &lt;fo:table-cell border-style="inset" border-width="2pt" padding="2pt" background-repeat="repeat" display-align="center"&gt;
                                    &lt;fo:block&gt;
                                        &lt;xsl:apply-templates/&gt;
                                    &lt;/fo:block&gt;
                                &lt;/fo:table-cell&gt;
                            &lt;/fo:table-row&gt;
                        &lt;/fo:table-body&gt;
                    &lt;/fo:table&gt;
                &lt;/fo:block&gt;
            &lt;/fo:flow&gt;
        &lt;/fo:page-sequence&gt;
    &lt;/fo:root&gt;
&lt;/xsl:template&gt;
&lt;xsl:template match="span[@class='diff-html-added']"&gt;
    &lt;span style="color:green; background-color: #ccffcc;"&gt;
    &lt;xsl:value-of select="."/&gt;&lt;/span&gt;
&lt;/xsl:template&gt;
&lt;xsl:template match="span[@class='diff-html-removed']"&gt;
        &lt;span style="color:red; text-decoration: line-through; background-color: #fdc6c6;"&gt;
        &lt;xsl:value-of select="."/&gt;&lt;/span&gt;
&lt;/xsl:template&gt;
&lt;xsl:template match="span[@class='diff-html-added']" mode="clean"/&gt;
&lt;xsl:template match="span[@class='diff-html-removed']" mode="clean"/&gt;
</code></pre>

<p></p>

<p>The report is working but for some reason this xsl template that I have added to include red and green coloring in the  elements is not working for me because it is not displaying.</p>

<pre><code>&lt;xsl:template match="span[@class='diff-html-added']"&gt;
    &lt;span style="color:green; background-color: #ccffcc;"&gt;
    &lt;xsl:value-of select="."/&gt;&lt;/span&gt;
&lt;/xsl:template&gt;
</code></pre>

<p>What do I need to do to fix my xsl template so that the span elements will appear as green or red?</p>