Bug related to XPath predicates?

I am having trouble with XPath expression like this: //input[2]
In the following code, I would expect the alert to display "1", but instead it displays "0".

<div>
   <input type="text"/>
   <input type="text"/>
   <input type="text"/>
</div>
                       
<b:button>Count
   <e:handler event="click">
      <!-- Why does this return 0? -->
      <c:alert select="count(//input[2])" />
</b:button>

However, the following three function as expected:

<c:alert select="count(//input[1])" />
<c:alert select="count(//div/input[2])" />
<c:alert select="count(//*/input[2])" />

Is this a bug in Backbase, or am I misunderstanding the XPath expression?

Re: Bug related to XPath predicates?

Hi Dale,

Thank you for the report.

This is indeed a problem in the software, it is confirmed and entered into the tracking system

Sergey/