I'd try something like this
ex:expression="max(.major_ingredient.cost, .minor_ingredient.cost)"
Let me know if that works!
David
Please note, though, that the behavior of these expression might get
bizarre once each operand or argument is a set of values rather than a
single value. For example,
.foo * .bar
works well if .foo evaluates to, say, [ 2 ] and .bar to, say, [ 3 ]. The
result would be [ 6 ]. However if
.foo --> [ 2, 5 ]
.bar --> [ 7, 3 ]
the then result is (as implemented)
[ 2*7, 2*3, 5*7, 5*3 ]
Also note that the dot . operator returns a set of values with no
duplicate. In certain cases, when you want duplicates, use the .@ operator.
David