【发布时间】:2015-12-07 03:33:31
【问题描述】:
我们可以用 ISO-8859-1 unicode 代替 UTF-8 进行 XSLT 转换吗?
目前,我在使用 UTF-8 时没有遇到任何问题。 下面的代码工作正常:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:this="http://this.com"
xmlns:wd="urn:com.workday.report/abcd_services" version="2.0">
<xsl:output method="text" indent="yes" encoding="UTF-8"/>
虽然下面的代码给出了错误:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:this="http://this.com"
xmlns:wd="urn:com.workday.report/INT1204_GE_Capital_Fleet_Services" version="2.0">
<xsl:output method="text" indent="yes" encoding="ISO-8859-1"/>
【问题讨论】:
-
您使用的是哪个 XSLT 处理器,确切的错误消息是什么?
-
错误是什么?您使用的是哪个 XSLT 引擎?您可能没有正确处理“文本”方法
-
只是为了检查:如果将“text”更改为“html”,输出是什么?有时对 html 的支持会更好,它可以帮助查明原因
标签: xml xslt unicode utf-8 iso-8859-1