下面的 XSLT 样式表语句是错误的
   <xsl:variable name="formatInfo" select="'dateTime'" />
XSLT call-template 模板名不可以是变量
<xsl:call-template name="$formatInfo" />

这是因为 XSLT call-template 模板名不可以是变量,它是一个 QName, 不能是表达式或者是属性值模板

但是据说 Saxon 支持在运行时指定模板名,比如
XSLT call-template 模板名不可以是变量<xsl:call-template name="{$formatInfo}" saxon:allow-avt="yes"/>

相关文章: