Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xslt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/algorithm/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xml 如何在XSL中显示输出变量文本_Xml_Xslt_Xsl Fo_Apache Fop - Fatal编程技术网

Xml 如何在XSL中显示输出变量文本

Xml 如何在XSL中显示输出变量文本,xml,xslt,xsl-fo,apache-fop,Xml,Xslt,Xsl Fo,Apache Fop,当我遇到以下问题时,我正在使用xsl:fo使用ApacheFop生成pdf: <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=

当我遇到以下问题时,我正在使用xsl:fo使用ApacheFop生成pdf:

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

其中bankDetails是一个变量,它包含带有html标记的整个文本段落。 当我按原样打印它时,它会逐字显示html标记(如

等),而不是保留格式

我如何克服这个限制

BankDetails是一个变量,下面是一个可包含(但不限于)在BankDetails中的文本示例,以下文本应呈现且不显示标签:

<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),&nbsp;</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>
  • 根据1988年《机动车法》的规定,R Devdas法官指出,根据第147(2)节,对任何第三方造成损害的最大责任为6000卢比,且机动车事故索赔法庭(MACT)
  • 在给予75000卢比的赔偿之前,班加罗尔没有考虑相关因素
  • 2009年3月9日,苏哈斯·雷迪的汽车与公交车相撞,造成了严重损坏。Suhas向其车辆的保险公司皇家Sundaram Alliance Insurance索赔“自身损失”,并获得了118420卢比的赔偿

银行详细信息是变量还是元素?请扩展您的问题,同时显示(简短版本的)
BankDetails
的外观。FOP无法理解您的HTML标记。您需要将HTML转换为FOP能够理解的XSL-FO词汇表。如果HTML标记在
的文本值中以
等形式出现,则您还有一个问题。解决这一问题的难易程度部分取决于您使用的XSLT版本。版本详细信息为:,我的FOP版本为1.1如何将html转换为xsl fo词汇表?使用
,而不是
,并为html元素添加模板,以将其转换为FOs和属性。