I have the following xml (HL7)
message.
`<OBR>One</OBR>`
`<ZCT>Two</ZCT>`
`<OBR>Three</OBR>`
`<ZCT>Four</ZCT>`
I need to map these to another XML like this:
`<Number>`
`<One>One</One>`
`<Two>Two</Two>`
`</Number>`
`<Number>`
`<One>Three</One>`
`<Two>Four</Two>`
`</Number>`
Nothing in these fields correlates. I can rely on the structure/order of the fields but that´s it. So I need to map all the OBR fields, together with the following ZCT fields, before the next OBR occurs.
Any suggestions on how to solve this?
If you could combine both xml-fragments into one like i.e. this:
Then the following xsl:
gives this result: