I have a basic knowledge of XSLT transformation, but have been struggling with the following:
My xml contains :
<fixednode1>do not transform me</fixednode1>
<fixednode2>do not transform me also</fixednode2>
<element1Label>1234</element1Label>
<element7Label>hello</element7Label>
<element9Label>bar</element9Label>
I want to transform the entire xml so that, apart from the 2 fixed nodes, each node value is pre-pended by its node name followed by a colon and a whitespace, like this:
<fixednode1>do not transform me</fixednode1>
<fixednode2>do not transform me also</fixednode2>
<element1Label>element1Label: 1234</element1Label>
<element7Label>element7Label: hello</element7Label>
<element9Label>element9Label: bar</element9Label>
It should preferably be a generic transformation - the xml will sometimes contain node names which are unknown to the stylesheet. Only the 2 fixed nodes will remain the same, but they must not be transformed, only retained in the result.
I've wrestled with a "choose,when,otherwise" statement, but I'm lost at the moment. Any help or advice would be appreciated.
Kind Regards
Scrat