I need to calculate a value which is equal to 2* the lowest two dimensions.
<VALUES>
<LENGTH>10</LENGTH>
<WIDTH>12</WIDTH>
<HEIGHT>11</HEIGHT>
</VALUES>
So in the above example, we would have need GIRTH = 2* (LENGTH + HEIGHT) = 44.
resulting in a new XML looking like the below (Do note, that the input and output have been simplified)
<RESULT>
<LENGTH>10</LENGTH>
<WIDTH>12</WIDTH>
<HEIGHT>11</HEIGHT>
<GIRTH>44</GIRTH>
</RESULT>
How would be the cleanest way to get the lowest two? (I this case, LENGTH and HEIGHT but it could be any 2 of the three)
I'd rather not use 3 if statements to get the 3 possibilities covered and i am trying to avoid using C# helpers for everything i don't get/find.
Also, i am using this in BIZTALK2010, i am not sure if it is xslt 1 or xslt 2.