I'm new to xslt and trying to process below XML using XSLT :
<xml>
<characters>
<char a="a1" b="b1" y="y1" z="z1" weight="100">F</char>
<char a="a2" b="b2" y="y2" z="z2" weight="80">r</char>
<char a="a3" b="b3" y="y3" z="z3" weight="80">o</char>
<char a="a4" b="b4" y="y4" z="z4" weight="100">m</char>
</characters>
</xml>
to produce output XML :
<word>
<value>From</value>
<coordinates>a1 b1 y4 z4</coordinates>
<avgWeight>90</avgWeight>
</word>
where coordinates form the first and last characters coordinates and avgWeight aggregate the values of weight tag.
Since XSLT variables are immutable, I'm unable perform below operation. Help me in finding solution.
I don't see what variables, immutable or not, have to do with it. This is just straightforward XSLT:
XSLT 1.0