I have this:
And want to transform it to:
Answers, or a tutorial with that transformation in mind would be good. I find XSL mind-bending; and don't do it enough.
edit: fixed error in xml
Code:
<root>
<item>
<category>XYZ</category>
<name>John Doe</name>
</item>
<item>
<category>XYZ</category>
<name>Jane Doe</name>
</item>
<item>
<category>ZZZ</category>
</item>
</root>
And want to transform it to:
Code:
<root>
<category name="XYZ">
<item>
<name>John Doe</name>
</item>
<item>
<name>Jane Doe</name>
</item>
</category>
<category name="ZZZ">
...
</category>
</root>
Answers, or a tutorial with that transformation in mind would be good. I find XSL mind-bending; and don't do it enough.
edit: fixed error in xml