Hi, this question is related to:
grouping by nodes questions
After some thought, I rephrased my question and created an example.
Suppose I want to group elements by name and then put them into "groups". For example:
Input:
Code:
<data>
<tools>Hammer</tools>
<conditions>Sunny</conditions>
<conditions>Dry</conditions>
<tools>Saw</tools>
<tools>Nail Gun</tools>
<safety>Safety Glasses</safety>
<conditions>Clear</conditions>
</data>
Desired output
Code:
<new>
<group>
<conditions>Clear</conditions>
<conditions>Dry</conditions>
<conditions>Sunny</conditions>
</group>
<group>
<tools>Hammer</tools>
<tools>Nail Gun</tools>
<tools>Saw</tools>
</group>
</new>
*Assume there can be an infinite number of children of <data>
This is a very simple example. In my actual document, I am processing this information into a FO file for PDF output. I am probably over thinking this one. I appreciate the help.
Thanks