tags:

views:

34

answers:

1

Input XML

<?xml version="1.0" encoding="UTF-8" ?> 
<Z_RFC_SP_POTEXT_OUT >
<ZMPO_TXT>
 <item>
  <LIFNR>0009002008</LIFNR> 
  <ZPOTEXT1>BSE-TSE Statement document is accpeted by [email protected] on 2010-04-12</ZPOTEXT1> 
  <ZPOTEXT2 /> 
  <FLAG /> 
</item>
<item>
 <LIFNR>0009002008</LIFNR> 
 <ZPOTEXT1>Ist Part</ZPOTEXT1> 
 <ZPOTEXT2 /> 
 <FLAG /> 
</item>
<item>
 <LIFNR>0009002008</LIFNR> 
 <ZPOTEXT1>2nd Part</ZPOTEXT1> 
 <ZPOTEXT2 /> 
 <FLAG /> 
</item>
<item> 
 <LIFNR>0009000013</LIFNR> 
 <ZPOTEXT1>vComments for Obj 1hkshkshdiswyidswyidyswidysiysiysskhskchskhckchk</ZPOTEXT1> 
 <ZPOTEXT2 /> 
 <FLAG /> 
</item> 
<item> 
 <LIFNR>0009000017</LIFNR> 
 <ZPOTEXT1>vComments for Obj 1hkshkshdiswyidswyidyswidysiysiysskhskchskhckchk</ZPOTEXT1> 
 <ZPOTEXT2 /> 
 <FLAG /> 
</item> 
<item> 
 <LIFNR>0009000017</LIFNR> 
 <ZPOTEXT1>1st part</ZPOTEXT1> 
 <ZPOTEXT2 /> 
 <FLAG /> 
</item>
<item> 
 <LIFNR>0009000017</LIFNR> 
 <ZPOTEXT1>2nd part</ZPOTEXT1> 
 <ZPOTEXT2 /> 
 <FLAG /> 
</item>
<item> 
 <LIFNR>0009000022</LIFNR> 
 <ZPOTEXT1>INCLUDE ZPTP_TERMS_AND_CONDITIONS_2003 OBJECT TEXT ID ST</ZPOTEXT1> 
 <ZPOTEXT2 /> 
 <FLAG /> 
</item> 
<item> 
 <LIFNR>0009000026</LIFNR> 
 <ZPOTEXT1>INCLUDE ZPTP_TERMS_AND_CONDITIONS_2003 OBJECT TEXT ID ST</ZPOTEXT1> 
 <ZPOTEXT2 /> 
 <FLAG /> 
</item> 
</ZMPO_TXT>
</Z_RFC_SP_POTEXT_OUT>

I am looking for the output

<?xml version="1.0" encoding="UTF-8" ?> 
<Z_RFC_SP_POTEXT_OUT >
<ZMPO_TXT>
<item>
 <LIFNR>0009002008</LIFNR> 
 <ZPOTEXT1>BSE-TSE Statement document is accpeted by [email protected] on 2010-04-12 Ist Part 2nd Part</ZPOTEXT1> 
 <ZPOTEXT2 /> 
 <FLAG /> 
 </item>
 <item> 
  <LIFNR>0009000013</LIFNR> 
  <ZPOTEXT1>vComments for Obj 1hkshkshdiswyidswyidyswidysiysiysskhskchskhckchk</ZPOTEXT1> 
  <ZPOTEXT2 /> 
  <FLAG /> 
 </item> 
 <item> 
  <LIFNR>0009000017</LIFNR> 
  <ZPOTEXT1>vComments for Obj 1hkshkshdiswyidswyidyswidysiysiysskhskchskhckchk 1st part 2nd part</ZPOTEXT1> 
  <ZPOTEXT2 /> 
  <FLAG /> 
 </item> 
 <item>
  <LIFNR>0009000022</LIFNR> 
  <ZPOTEXT1>INCLUDE ZPTP_TERMS_AND_CONDITIONS_2003 OBJECT TEXT ID ST</ZPOTEXT1>  
  <ZPOTEXT2 /> 
  <FLAG /> 
</item> 
<item> 
 <LIFNR>0009000026</LIFNR> 
 <ZPOTEXT1>INCLUDE ZPTP_TERMS_AND_CONDITIONS_2003 OBJECT TEXT ID ST</ZPOTEXT1> 
 <ZPOTEXT2 /> 
 <FLAG /> 
</item> 
</ZMPO_TXT>
</Z_RFC_SP_POTEXT_OUT>

Can any one help me out how to do that using xslt. Its very urgent

Thanks Vineet

A: 

looks like a Munchian Sort can help you further. if you group the items by <LIFNR>, you should be able to drop all text in a single node.

Dormilich
Thanks a lot I have resolved the issue using Munchian algo
vineet