xslt变量值

xslt变量值,xslt,Xslt,我有一段代码: <xsl:variable name="varPriceDate"> <xsl:call-template name="lookup_MarketGNLPricesFile_Valor"> <xsl:with-param name="PARAM_Key" select="'A'"/> </xsl:call-template> </x

我有一段代码:

        <xsl:variable name="varPriceDate">
          <xsl:call-template name="lookup_MarketGNLPricesFile_Valor">
            <xsl:with-param name="PARAM_Key" select="'A'"/>
          </xsl:call-template>
        </xsl:variable>
        <xsl:element name="priceDate">
          <xsl:value-of select="Col[$varPriceDate]"/>
        </xsl:element>
        <xsl:variable name="varPrice">
          <xsl:call-template name="lookup_MarketGNLPricesFile_Valor">
            <xsl:with-param name="PARAM_Key" select="'B'"/>
          </xsl:call-template>
        </xsl:variable>
        <xsl:element name="price">
          <xsl:value-of select="Col[$varPrice]"/>
        </xsl:element>

其中
显示与
相同的结果。
你能帮助我吗?我需要解决它

这两个变量的值都是结果树片段(在XSLT2.0中,文档节点),结果树片段的有效布尔值始终为true。因此,表达式
Col[$varPriceDate]
Col[$varPrice]
都相当于简单地编写
Col


要纠正这一点,我们需要知道代码的目的是什么,这一点还不清楚。

向我们展示一些上下文,我们确实需要查看调用的模板的返回类型和值。您可能需要类似于
Col[position()=$var]
的内容,而不是您所拥有的内容,但这只是一种猜测,请向我们展示必要的详细信息,我们可以帮助您,而无需猜测。