的,我有以下XML:XSLT - Occurence属性
<Books>
<Book author="John" country="Norway"/>
<Book author="Paul" />
<Book author="Steve" country="England"/>
</Books>
<Books>
<Book author="George" />
<Book author="Thomas" country="Germany"/>
</Books>
我想找到属性“国家”的每个“书”元素内的位置。
<Books>
<Book author="John" country="Norway"/> --1
<Book author="Paul" />
<Book author="Steve" country="England"/> --2
<Book author="Bob" country="Denmark"/> --3
</Books>
<Books>
<Book author="George" />
<Book author="Thomas" country="Germany"/> --1
</Books>
我们可以使用哪种XPath函数?
非常感谢,像魅力一样工作。 –