Merge adjacent sibling nodes with XSLT

Here should go questions about transforming XML with XSLT and FOP.
xsltstarter
Posts: 1
Joined: Sat Jun 02, 2012 2:56 am

Merge adjacent sibling nodes with XSLT

Post by xsltstarter »

the input is
<body>
<headnote>
<info>
<case:parallelcite>(Case
<ci:cite searchtype="CASE-REF">
<ci:case>
<ci:caseref>
<ci:reporter value="C"/>
<ci:edition><ci:date year="1993"/>
</ci:edition>
<ci:page num="57"/>
</ci:caseref></ci:case><ci:content>C-57/93</ci:content></ci:cite>)
</case:parallelcite>

<case:parallelcite>
(Case
<ci:cite searchtype="CASE-REF">
<ci:case>
<ci:caseref>
<ci:reporter value="C"/>
<ci:edition><ci:date year="1993"/>
</ci:edition>
<ci:page num="57"/>
</ci:caseref></ci:case><ci:content>C-57/93</ci:content></ci:cite>)
</case:parallelcite>

</info>
</headnote>
</body>

output should combine both case:parallelcite in to one



<body>
<headnote>
<info>
<case:parallelcite>(Case
<ci:cite searchtype="CASE-REF">
<ci:case>
<ci:caseref>
<ci:reporter value="C"/>
<ci:edition><ci:date year="1993"/>
</ci:edition>
<ci:page num="57"/>
]</ci:caseref></ci:case><ci:content>C-57/93</ci:content></ci:cite>)
<ci:cite searchtype="CASE-REF">
<ci:case>
<ci:caseref>
<ci:reporter value="C"/>
<ci:edition><ci:date year="1993"/>
</ci:edition>
<ci:page num="57"/>
</ci:caseref></ci:case><ci:content>C-57/93</ci:content></ci:cite>)

</case:parallelcite>

</info>
</headnote>
</body>