I generated by a for each the following field: 214.2+428.4+end
I have used substring-before(prices,\'+end\') but this is a string.
Any ideas how I can take the 2
If the string contains a valid XPath expression (as it does in your example) then you need the ability to dynamically evaluate XPath expressions. This is not a standard feature of XSLT 1.0, however:
Alternatively, if you know that the string contains a sequence of numbers separated by plus signs, then you could write a recursive template to extract the tokens, convert them to numbers, and sum them. Or if it's always two numbers, then you don't even need recursion.
As so often happens, it's not enough to have one example of the input your program has to handle; we need to know what the set of all possible inputs is.