<xsl:for-each select="$script/startWith">
<xsl:variable name = "i" >
<xsl:value-of select="$script/startWith[position()]"/>
</xsl:variable>
<xsl:for-each select="JeuxDeMots/Element">
<xsl:variable name = "A" >
<xsl:value-of select="eName"/>
</xsl:variable>
<xsl:if test="starts-with($A,$i)= true()">
<xsl:variable name="stringReplace">
<xsl:value-of select="substring($i,0,3)"/>
</xsl:variable>
<xsl:value-of select="$stringReplace"/>
</xsl:if>
</xsl:for-each>
</xsl:for-each>
问题:变量$ i无法通过每个xsl。 请帮帮我。XSL:如何将变量传递给每个
我一直这样做。尝试删除变量声明中等号周围的空格: –
Jay
谢谢,但无法正常工作。 – user2537590
什么是错误信息,你得到了什么?在哪一行(有两个引用* i *)? –