Subject: Re: xml to xml mapping - how to combine two groups
From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Date: Tue, 8 Jan 2008 15:24:34 +0000
|
On 08/01/2008, Andy.Lewis@xxxxxxxxxxx <Andy.Lewis@xxxxxxxxxxx> wrote:
> I'm not sure how to add to a thread so I'm listing my original question
> to be sure. I've added a note at the bottom.
Just reply to an email in the thread...
> I'm receiving XML data with two different groups of elements. Let's call
> them GROUP-A and GROUP-B.
>
> I need to merge the two into single groups of elements. I may have more
> of one group than the other.
Uppercase markup is horrible....
Anyway, one way to do what you're after is to find the maximum number
of children in group A or group B, then process each child of each
group from 1 to the maximum. Where a child doesn't exist at a given
position, nothing will be output.
How you go about it depends on which version of XSLT you're using...
cheers
--
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/
|