我正在尝试将选择值的结果传递给另一个选择值的参数。这是带有伪语句的完整代码(myVar)
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="yes" />
<xsl:variable name="data" select="document('user.xml')/user/data" />
<xsl:template match="/">
<xsl:for-each select="form/field">
<p class="field">
<xsl:attribute name="style">left:<xsl:value-of
select="left" />;top:<xsl:value-of select="top" />;
</xsl:attribute>
myVar = <xsl:value-of select="text" />
<xsl:value-of select="$data[@key = {@myVar}]/@value" />
</p>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>