I am having the same problem but I can't seem to make any iteration of the above suggested Xpath work with my form.
This works fine '../preceding-sibling::my:group2/my:EndMileage[1]' in a regular form but obviously doesn't work in a browser form.
How would I apply the same suggestion above to my xPath?
I've tried the obvious one and it keeps saying it is not a valid location of a field or group.
Tried - '../my:group2:my:EndMileage[count(preceding-sibling::my:group2/my:EndMileage) = (count(current()/../preceding-sibling::my:group2/my:EndMileage) - 1)]'
Any help would be greatly appreciated.
David
[
edited by: dipster at 11:25 AM (GMT -8) on 2010-08-09]
Fixed my problem... It was a syntax issue.
../preceding-sibling::my:group2/my:EndMileage[(count(../preceding-sibling::my:group2)) = (count(current()/../preceding-sibling::my:group2/my:EndMileage) - 1)]
This works fine. It's better than having to create an extra field to get the current position().