Page 1 of 1

Merge adjacent sibling nodes with XSLT

Posted: Sat Jun 02, 2012 3:01 am
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>