I am using xsl:fo to generate a pdf using apache FOP, when I have come across the following issue:
<fo:table-cell
xsl:use-attribute-sets="btInfo mt10pt mb10pt">
<fo:block text-align="left" linefeed-treatment="preserve">
<xsl:text disable-output-escaping="yes"><xsl:value-of
select="BankDetails" />
</xsl:text>
</fo:block>
</fo:table-cell>
where bankDetails is a variable which contains entire paragraph of text with html tags.
When I print it as is,it displays html tags literally(such as <p>, <br>, <ul><li>
etc) instead of preserving the formatting.
How do I overcome this limitation ?
BankDetails is a variable, here is an example of a text which can be included(but not limited to) in BankDetails, the following text should render and not display with tags:
<ul style="list-style-position: inside;">
<li>Relying on provisions of the Motor Vehicles Act 1988, Justice R Devdas noted that as per section 147(2), the maximum liability in respect of damages caused to any third party was Rs 6,000, and that the Motor Accidents Claims Tribunal (MACT), </li>
<li>Bengaluru hadn’t taken into account relevant factors before awarding Rs 75,000 as compensation.</li>
<li>Suhas R Reddy’s car had suffered extensive damage after it collided with the bus on March 9, 2009. Suhas claimed compensation under ‘own damages’ from his vehicle’s insurer, Royal Sundaram Alliance Insurance, and was paid Rs 1,18,420.</li>
</ul>