Avatar of rshk2001
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</fInfo>
   <bInfo>21-21-02-01-01</bInfo>
   <bInfo>21-21-02-01-02</bInfo>
   <bInfo>21-21-02-01-03</bInfo>
</group>
<group>
   <fInfo>21-21-02-01-03.xml</fInfo>
   <bInfo>21-21-02-01-03A</bInfo>
   <bInfo>21-21-02-01-03B</bInfo>
</group>
<group>
   <fInfo>21-21-02-01-04.xml</fInfo>
   <bInfo>21-21-02-01-04</bInfo>
</group>
<group>
   <fInfo>21-21-02-01-03.xml</fInfo>
   <bInfo>21-21-02-01-03C</bInfo>
   <bInfo>21-21-02-01-04A</bInfo>
</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</fInfo>
   <bInfo>21-21-02-01-01</bInfo>
   <bInfo>21-21-02-01-02</bInfo>
   <bInfo>21-21-02-01-03</bInfo>
   <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</bInfo>
   <bInfo>21-21-02-01-03B</bInfo>
   <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
Web Languages and StandardsXML

Avatar of undefined
Last Comment
Gertone (Geert Bormans)
ASKER CERTIFIED SOLUTION
Avatar of Gertone (Geert Bormans)
Gertone (Geert Bormans)
Flag of Belgium image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
SOLUTION
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of rshk2001
rshk2001

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
Web Languages and Standards
Web Languages and Standards

Web development can range from developing the simplest static single page of plain text to the most complex web-based internet applications, electronic businesses, and social network services using a wide variety of languages and standards, including the familiar HTML, JavaScript and jQuery, ASP and ASP.NET, PHP, ColdFusion, CSS, PHP, Flex and Flash, but also the implementation of a broad list of standards including XML, WSDL, SSDL, VoiceXML and many more.

40K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo