on 04-14-2010 12:15 PM
Hi experts,
I am doing file to mail scenario, i am sending the text file as an attachment using reciever mail adapter.
I did everything, i can able to send the mail with text file attachment, but with in the file i got multiple rows, i need to put line break in XSLT mapping.
I did use following statement but it is inserting small rectangle between the records, the records are not separating with new lines, all are in one line.
<xsl:text>*#xA;</xsl:text>
note: in real coding replace * with &
Can anyone suggest me how to insert new line in XSLT mapping.
My XSLT mapping as look like:
<?xml version='1.0'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ns0="http://www.Coj.co.za/SapIsuToABSA/DirectDebitFile">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:variable name="break"><br/></xsl:variable>
<xsl:variable name="space"> </xsl:variable>
<xsl:variable name="newline"><xsl:text></xsl:text></xsl:variable>
<xsl:template match="/">
<ns1:Mail xmlns:ns1="http://sap.com/xi/XI/Mail/30">
<Subject>Please Check Attached Direct Debit File</Subject>
<From>S@za</From>
<To>P@za</To>
<Content_Type>text/plain</Content_Type>
<Content>
<xsl:for-each select="MT_SapIsuToABSA_DirectDebitFile/DirectDebitRec/Body">
<xsl:value-of select="Space1"/>
<xsl:value-of select="Cust_AccNo"/>
<xsl:value-of select="Reserve_1"/>
<xsl:value-of select="Cust_Name"/>
<xsl:value-of select="Cust_Name1"/>
<xsl:value-of select="Cust_Bank_AccNo"/>
<xsl:value-of select="Space2"/>
<xsl:value-of select="Cust_Bank_BranchNo"/>
<xsl:value-of select="Reserve_2"/>
<xsl:value-of select="Space3"/>
<xsl:value-of select="Cust_AccNo_1"/>
<xsl:value-of select="Space4"/>
<xsl:value-of select="Reserve_3"/>
<xsl:value-of select="Deduction_Amnt"/>
<xsl:value-of select="Space5"/>
<xsl:value-of select="Reserve_4"/>
<xsl:value-of select="Space6"/>
<xsl:value-of select="Action_Date"/>
<xsl:value-of select="Space7"/>
<xsl:value-of select="Reserve_5"/>
<xsl:text>*#xA;</xsl:text>
note: in real coding replace * with &
</xsl:for-each>
</Content>
</ns1:Mail>
</xsl:template>
</xsl:stylesheet>
Kind regards,
Praveen
Hi,
Plz try this (instead of <xsl:text>*#xA;</xsl:text> use below statement):
<xsl:value-of select="$newline"/>
Thanks
Amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Praveen,
Did you try using <xsl:variable name="UC13" select="'
'"/> or <xsl:variable name="UC10" select="'
'"/>
?
Regards,
Gautam Purohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I think <xsl:text>#xa;</xsl:text> should do the trick, but depending on which OS (ux or win), the "new line" chars sequence is different (win would require a CRLF like <xsl:text>#xd;*#xa;</xsl:text>)
Chris
-> &
Edited by: Christophe PFERTZEL on Apr 14, 2010 2:16 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.