我该如何选择下面的兄弟的位置(How do I select the position of a f

2019-10-24 10:23发布

我需要选择通过XSL后面的兄弟姐妹的位置。

这不是工作:

<xsl:variable name="nextAnswerListItemPos" select="following-sibling::*[local-name() = 'AnswerListItem'][position()]" />

Answer 1:

<xsl:variable name="nextAnswerListItemPos" select="count(following-sibling::*[local-name() = 'AnswerListItem'][1]/preceding-sibling::*) + 1" />


文章来源: How do I select the position of a following sibling
标签: xslt