So I can't really handle it within the xpath expression?!
But your solutions works totally fine, so I guess I will do it this way.
I thought it might make a performance difference to call the function, but I can be totally wrong with this thought :-).