如何让 xsl 使用 for each 循环来抓取项目,但只能在所选内容中达到某个索引。我尝试做的是获取一个由 web 服务控制的数字,并将 out_data_info 中的项目返回到该索引。我遇到的问题是它只返回该索引处的数据,而不是该索引之前的所有数据。
<xsl:variable name="count" select=".//out_rec_count/text()"/>
<xsl:for-each select="//out_data_info[number($count)]">
<xsl:apply-templates select="." />
</xsl:for-each>
有没有办法在使用 for each 循环时做我想做的事?