Is it possible to sum the temperatures following XML:
<days>
<day><temperature>40 F</temperature></day>
<day><temperature>45 F</temperature></day>
<day><temperature>50 F</temperature></day>
</days>
In xpath 2.0, I could get the average of the three numbers using
avg(//days/day/temperature/number(translate(.,' F','')))
Is it possible to write an expression in pure xpath 1.0 that can do the same thing? This response to a question regarding the use of 'sum' on impure nodes in xpath 1.0 causes me to think that maybe it's not.
So, to summarize, is there any way to get the average temperature from these impure nodes using only an xpath 1.0 expression?