Hi Joga Singh Rawat,
deduplication is often successfully performed with xsl:for-each-group.
After you have processed the author names, you could try something along
<xsl:for-each-group select="author/affiliation" group-by="@xreflabel">
<xsl:apply-templates select="."/><!-- processes the first item in the group
-->
</xsl:for-each-group>
Michael
From: Joga Singh Rawat jrawat@xxxxxxxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Wednesday, December 20, 2023 11:02 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Remove duplicate affiliation
Hi Friends,
We need to remove duplicate affiliation that can be unique by @xreflabel.
Could you please let me know any clue.
Input
<authorgroup>
<author>
<name>a</name>
<affiliation xreflabel=b1b><org>..</org> First affiliation</affiliation>
<affiliation xreflabel=b2b><sup>..</sup> Second affiliation</affiliation>
</author>
<author>
<name>b</name>
<affiliation xreflabel=b1b><org>..</org> First affiliation</affiliation>
</author>
<author>
<name>c</name>
<affiliation xreflabel=b3b><org>..</org> Third affiliation</affiliation>
</author>
<author>
<name>d</name>
<affiliation xreflabel=b1b><org>..</org> First affiliation</affiliation>
<affiliation xreflabel=b4b><sub>..</sub> Forth affiliation</affiliation>
</author>
Output
<aug>
<au>a</au>
<au>b</au>
<au>c</au>
<au>d</au>
<aff><org>b&</org> First affiliation</aff>
<aff><sup>b&</sup> Second affiliation</aff>
<aff><org>b&</org> Third affiliation</aff>
<aff><sub>b&</sub> Forth affiliation</aff>
XSL-List info and archive<http://www.mulberrytech.com/xsl/xsl-list>
EasyUnsubscribe<http://lists.mulberrytech.com/unsub/xsl-list/3481519> (by
email<>)
|