我正在将XML文档转换为XML文档。该指令的输出:
<xsl:value-of select="'a 2'"/>
应该:
..>a 2<...
目前的输出是:
a 2
所以实体被解释了。我该怎么逃避呢?
我试过了
4.
<xsl:character-map name="entities">
<xsl:output-character character=" " string=" "/>
</xsl:character-map>
<xsl:output encoding="UTF-8" indent="yes" method="xml" use-character-maps="entities"/>
对于转换,我使用Oxygen 20.1和嵌入式Saxon EE 9.8.0.12
In Character map you should use
<xsl:character-map name="entities">
<xsl:output-character character=" " string="&#8198;"/>
</xsl:character-map>
Instead
<xsl:output-character character=" " string=" "/>