Hello Bertrand,
I don’t know if this is helpful in your situation, but this works in Tamino 4.1 XQuery:
let $maxMajor := max(input()/project[common/name='Project666']/version/major)
for $project in input()/project
where $project/common/name='Project666'
and $project/version/major = $maxMajor
return $project
I hope that helps,
Trevor.
#API-Management#webMethods#Tamino