rshk2001
asked on
XSL Grouping
Can you please let me know how to group below input file:
<root>
<group>
<fInfo>21-21-02.xml</fInfo >
<bInfo>21-21-02-01</bInfo>
</group>
<group>
<fInfo>21-21-02-01.xml</fI nfo>
<bInfo>21-21-02-01-01</bIn fo>
<bInfo>21-21-02-01-02</bIn fo>
<bInfo>21-21-02-01-03</bIn fo>
</group>
<group>
<fInfo>21-21-02-01-03.xml< /fInfo>
<bInfo>21-21-02-01-03A</bI nfo>
<bInfo>21-21-02-01-03B</bI nfo>
</group>
<group>
<fInfo>21-21-02-01-04.xml< /fInfo>
<bInfo>21-21-02-01-04</bIn fo>
</group>
<group>
<fInfo>21-21-02-01-03.xml< /fInfo>
<bInfo>21-21-02-01-03C</bI nfo>
<bInfo>21-21-02-01-04A</bI nfo>
</group>
</root>
to as below:
<?xml version="1.0" encoding="utf-8"?>
<root>
<group>
<fInfo>21-21-02.xml</fInfo >
<bInfo>21-21-02-01</bInfo>
</group>
<group>
<fInfo>21-21-02-01.xml</fI nfo>
<bInfo>21-21-02-01-01</bIn fo>
<bInfo>21-21-02-01-02</bIn fo>
<bInfo>21-21-02-01-03</bIn fo>
<bInfo>21-21-02-01-04 <info>New data</info></bInfo>
</group>
<group>
<fInfo>21-21-02-01-03.xml< /fInfo>
<bInfo>21-21-02-01-03A</bI nfo>
<bInfo>21-21-02-01-03B</bI nfo>
<bInfo>21-21-02-01-03C <info>New data</info></bInfo>
</group>
<group>
<fInfo>21-21-02-01-04.xml< /fInfo>
<bInfo>21-21-02-01-04A <info>New data</info></bInfo>
</group>
<group>
<fInfo>21-21-02-01-03.xml< /fInfo>
</group>
</root>
Thanks
<root>
<group>
<fInfo>21-21-02.xml</fInfo
<bInfo>21-21-02-01</bInfo>
</group>
<group>
<fInfo>21-21-02-01.xml</fI
<bInfo>21-21-02-01-01</bIn
<bInfo>21-21-02-01-02</bIn
<bInfo>21-21-02-01-03</bIn
</group>
<group>
<fInfo>21-21-02-01-03.xml<
<bInfo>21-21-02-01-03A</bI
<bInfo>21-21-02-01-03B</bI
</group>
<group>
<fInfo>21-21-02-01-04.xml<
<bInfo>21-21-02-01-04</bIn
</group>
<group>
<fInfo>21-21-02-01-03.xml<
<bInfo>21-21-02-01-03C</bI
<bInfo>21-21-02-01-04A</bI
</group>
</root>
to as below:
<?xml version="1.0" encoding="utf-8"?>
<root>
<group>
<fInfo>21-21-02.xml</fInfo
<bInfo>21-21-02-01</bInfo>
</group>
<group>
<fInfo>21-21-02-01.xml</fI
<bInfo>21-21-02-01-01</bIn
<bInfo>21-21-02-01-02</bIn
<bInfo>21-21-02-01-03</bIn
<bInfo>21-21-02-01-04 <info>New data</info></bInfo>
</group>
<group>
<fInfo>21-21-02-01-03.xml<
<bInfo>21-21-02-01-03A</bI
<bInfo>21-21-02-01-03B</bI
<bInfo>21-21-02-01-03C <info>New data</info></bInfo>
</group>
<group>
<fInfo>21-21-02-01-04.xml<
<bInfo>21-21-02-01-04A <info>New data</info></bInfo>
</group>
<group>
<fInfo>21-21-02-01-03.xml<
</group>
</root>
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Gertone! Apologies since I was away whereby I didnt checked my emails. Also, thanks for your solution and I will try to fit that into my requirements. As you said, true this is bit complicated the way the grouping is required. I appreciate your help.
Please accept https:#a36941614 as the answer. It does solve the grouping part completely.
After that response there is some noise, but that made me give some more explanation and references in https:#a36968349, that if you want you can make an assisted answer simply for the references
After that response there is some noise, but that made me give some more explanation and references in https:#a36968349, that if you want you can make an assisted answer simply for the references
http://www.stylusstudio.com/xsllist/200607/post90410.html
http://www.codeproject.com/KB/XML/groupxml.aspx