[xsl] Split with delimiter and remove duplicate

Subject: [xsl] Split with delimiter and remove duplicate
From: "Pankaj Chaturvedi" <pankaj.chaturvedi@xxxxxxxxx>
Date: Fri, 27 Jun 2008 18:03:14 +0530
Hi all,

I've an case wherein I need to split the data of the element <affil> here,
using [number] as the delimiter. Do search/replace will be best way to
handle it?

Below is the sample input and desired output.



Input:
=======

 <affil>
 [1] 1This is the first affiliation (which repeats), will appear once in
affiliation list  [2] 2This is the second affiliation, University of
Wisconsin-Madison, Madison, WI, USA</affil>


Output:
=======
  <affils>
	 <affil>1This is the first affiliation, University of
Wisconsin-Madison, Madison, WI, USA</affil>
	 <affil>2This is the second affiliation, University of
Wisconsin-Madison, Madison, WI, USA</affil>
  </affils>	   


Though, I've an another issue of duplication of <affil> elements, when I
need to collect all the <affil> elements in <affilist> and duplicate must be
removed, but, think I can handle that using 2.0 for-each-group.


Thanks for advises.


Pankaj Chaturvedi

============================================================================
================


Confidentiality Notice:" This message and any attachment(s)
contained here are information that is confidential, proprietary to
IDS Infotech Ltd. and its customers.
Contents may be privileged or otherwise protected by law. The
information is solely intended for the individual or the entity it
is addressed to. If you are not the intended recipient of this
message, you are not authorized to read, forward, print, retain,
copy or disseminate this message or any part of it. If you have
received this e-mail in error, please notify the sender immediately
by return e-mail and delete it from your computer."

Current Thread