Xslt 如何从另一个xsl文件中的xsl:template访问xsl文件中的变量

Xslt 如何从另一个xsl文件中的xsl:template访问xsl文件中的变量,xslt,Xslt,在home.xsl中 <xsl:template match="/Screen"> <xsl:variable name="field" select="ListOfNames[@group='1']/*[name() != 'StaticLabel']"/> ..... <xsl:call-template name="SecondaryTemplate"> <xsl:with-par

在home.xsl中

<xsl:template match="/Screen">
        <xsl:variable name="field" select="ListOfNames[@group='1']/*[name() != 'StaticLabel']"/>

.....

    <xsl:call-template name="SecondaryTemplate">
                    <xsl:with-param name="radiofield" select="$field"/>
    </xsl:call-template> 

.....
在另一个文件中:base.xsl

<xsl:template name="SecondaryTemplate">
    <xsl:param name="radiofield"/>
    <xsl:for-each select="$radiofield">
      <xsl:variable name="i" select="position()"/>
       <xsl:text><xsl:copy-of select="@*"/>    </xsl:text>
    </xsl:for-each>
</xsl:template>

这是从
secondary template
访问
home.xsl
中定义的
字段值的正确方法吗?出于某种原因,
xsl:text
的输出总是空的


但是,当我在
home.xsl
中执行“xsl:text”时,我能够获得
字段的内容。我没有直接访问原始xml的权限,因为这是保密的……我只能解析内容并将其打印出来。

如果使用xsl:text$radioField,它是否有值?然后在每个循环中添加xsl:text,以便知道迭代的内容。yes$radiofields具有值,因为我看到其他xsl页面调用相同的数据location=“ListOfNamesEtc”…生成后,我们确实看到JSP页面具有输出。我只是觉得奇怪,在home.xsl上,当我调用相同的数据位置时,它没有给我任何输出。。。