My intent is in an XSL, to display only once the text node for set of nodes with a common value. For example, I have the following XML:
<Nodes>
<Node att="1">A</Node>
<Node att="1">B</Node>
<Node att="2">C</Node>
<Node att="2">D</Node>
<Node att="3">E</Node>
</Nodes>
My output would be: “ACE”.
I don’t know what the values of the attribute “att” will be. It can be any string.
Any suggestion would be greatly appreciated!
This can even be done just in a single XPath expression:
So, wrapping it in XSLT gives us:
and applying this to the provided XML document:
produces the wanted, correct result: