title: How to Render styles like font color and size which is present inside a span tag in xslt using xsl-fo?
body: <p>I am generating pdf files based on the output from a rich text editor, some of the components like font color, font size for a specific word or a paragraph comes like</p>
  
  <pre><code> &lt;p&gt;Hello Hi &lt;strong&gt;skansdjnsjc&lt;/strong&gt;
   &lt;span style="color:#ce181e"&gt;&lt;em&gt;cddsklncjkdsv&lt;/em&gt;&lt;/span&gt;
   &lt;span style="color:#ce181e"&gt;sdsadsad&lt;/span&gt;&lt;/p&gt;
  </code></pre>
  
  <p>And in my xslt file I did a template match like</p>
  
  <pre><code>  &lt;xsl:template match="span"&gt;     
      &lt;xsl:variable name="color"&gt;
       &lt;xsl:choose&gt;
         &lt;xsl:when test="@color"&gt;
           &lt;xsl:value-of select="@color"/&gt;
         &lt;/xsl:when&gt;
         &lt;xsl:otherwise&gt;
           &lt;xsl:text&gt;black&lt;/xsl:text&gt;
         &lt;/xsl:otherwise&gt;
      &lt;/xsl:choose&gt;
   &lt;/xsl:variable&gt;
   &lt;/xsl:template&gt;
  </code></pre>
  
  <p>But the required styles are not being rendered in the pdf file. Am I missing anything? or is there any solution to it.</p>
  
  <p>Thanks For the help in advance !!!</p>