I need to find all HTML tags a in the body except those from footer and limit them to a certain value.
Without any limitation, I have found this :
//body | //a[not(ancestor::footer)]
Not sure it is correct though.
With the limitation :
//body | //a[not(ancestor::footer)]/a[position()<=25]
But this not work
Or :
//body | //a[not(ancestor::footer)] | /a[position()<=25]
But it does not limit anything
What would be the correct syntax to combine conditions ?