Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8088

Re: concatenating multiple occurances of the same fieldin XSLT

$
0
0

Hi Sandeep, Yes your code works, but I found I have a slightly different requirement     

 

<E1EDKT1 SEGMENT="1">         <TDID>F01</TDID>         <E1EDKT2 SEGMENT="1">            <TDLINE>Combination of Header and Detail</TDLINE>         </E1EDKT2>         <E1EDKT2 SEGMENT="1">            <TDLINE>Concatenated</TDLINE>         </E1EDKT2></E1EDKT1>

 

I need to concatenate TDLINE occurrences based on TDID = F01, to make the output as

 

<Output>combination of Header and Detail concatenated</Output>

 

So I am trying with the following code which is not quite concatenating      

 

<xsl:for-each select="E1EDKT1">    <xsl:choose>     <xsl:when test="normalize-space(TDID) = 'F01'">      <xsl:for-each select="E1EDKT2/TDLINE">  <Output>            <xsl:value-of select="." />                            </Output>  </xsl:for-each>    </xsl:when>   </xsl:choose></xsl:for-each> 

Viewing all articles
Browse latest Browse all 8088

Trending Articles