Xslt xsl number()-函数无法转换
我正在.NET应用程序中使用FOP1.0。Xslt xsl number()-函数无法转换,xslt,apache-fop,Xslt,Apache Fop,我正在.NET应用程序中使用FOP1.0。 我的样式表看起来像 <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet ... version="1.0" ...> ... <xsl:param name="fromPerson" select="'1'"/> <xsl:param name="toPerson" select="'1'"/> ... <xsl:template matc
我的样式表看起来像
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet ... version="1.0" ...>
...
<xsl:param name="fromPerson" select="'1'"/>
<xsl:param name="toPerson" select="'1'"/>
...
<xsl:template match="*[local-name()='Person']">
<xsl:if test="(position() >= number($fromPerson))>
...
</xsl:if>
</xsl:template>
重要:
#UNKNOWN (cli.System.Int32) cannot be converted into an integer
顺便说一句:我用你知道为什么会出现错误吗?我想你需要的是
,而不是
。参数是
元素(或在
元素的XSLT 2中)的子元素。可以传递给全局样式表参数的值类型取决于处理器的API。我猜您使用的处理器的API不允许cli.System.Int32类型的值
实际上,此处列出了Microsoft API接受的类型:
你错了。如果像这里这样指定为顶级元素,则可以从外部将Param传递给xslt。这在xslt 1.0和2.0中是可能的。我不知道这一点,我认为未知包含在变量$fromPerson中,而不是Param$fromPerson中。
#UNKNOWN (cli.System.Int32) cannot be converted into an integer