[xsl] merging the contents of consecutive duplicate elements

Subject: [xsl] merging the contents of consecutive duplicate elements
From: "Annmarie Rubin \(anrubin\)" <anrubin@xxxxxxxxx>
Date: Mon, 17 Oct 2005 15:36:00 -0700
Hello list,

I haven't found this in the archives. I have XML that can contain
duplicate, consecutive elements with different contents, for example:

<info>
      <para>text A </para>
      <note>note A </note>
 </info>
 <info>
      <para>text B</para>
      <note>note B</note>
      <para>text C</para>
  </info>

Is there a way to do the following:

merge the contents of the duplicate elements into a single info element,
for example:

<info>
    <para>text A</para>
    <note>note A</note>
    <para>text B</para>
    <note>note B</note>
    <para>text C</para>
</info>

Thanks,

Ann Marie

Current Thread