<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 *)? –