[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] New Line using XSLT


Subject: Re: [xsl] New Line using XSLT
From: "Vishnu vishnu@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 1 Mar 2016 10:04:19 -0000

Hi Patrik,

Thanks for the suggestion.

I have tested the below code and attached is the transformed output text file
that is not as per the expected output if I open it with simple notepad but if
I open it with notepad++ than its looking fine.

The code that I have use:-

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="2.0">

    <xsl:output method="text"/>
    <xsl:param name="ResultDir"
select="'file:/D:\ccc_support\Resources\xslt_For_CAnalysis'"/>
    <xsl:template match="/">
        <xsl:result-document href="{$ResultDir}/one210.txt" encoding="UTF-8">
        <xsl:for-each select="1 to 10">
            <xsl:value-of select="."/>
            <xsl:text>&#x0A;</xsl:text>
        </xsl:for-each>
            </xsl:result-document>
    </xsl:template>

</xsl:stylesheet>

Please suggest.

Thanks for your support,
Vishnu
From: Dr. Patrik Stellmann patrik.stellmann@xxxxxxxxx
[mailto:xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx]
Sent: Tuesday, March 01, 2016 2:16 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: AW: [xsl] New Line using XSLT

This code works for me:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="2.0">

     <xsl:output method="text"/>

     <xsl:template match="/">
         <xsl:for-each select="1 to 10">
              <xsl:value-of select="."/>
              <xsl:text>&#x0A;</xsl:text>
         </xsl:for-each>
     </xsl:template>

</xsl:stylesheet>

Patrik


------------------------------------------------------------------
Systemarchitektur & IT-Projekte
Tel: +49 40 33449-1142
Fax: +49 40 33449-1400
E-Mail: Patrik.Stellmann@xxxxxxxxx<mailto:Patrik.Stellmann@xxxxxxxxx>


Von: VISH RAJPUT svishnu.singh4@xxxxxxxxx<mailto:svishnu.singh4@xxxxxxxxx>
[mailto:xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx]
Gesendet: Dienstag, 1. MC$rz 2016 09:30
An: xsl-list@xxxxxxxxxxxxxxxxxxxxxx<mailto:xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Betreff: [xsl] New Line using XSLT

Hi,

I want to generate a "text" file in which every row should be in separate
line.
I have use "&#x0A;,&#x0D;" and <xsl:text>
</xsl:text>

But all the above seems not to work.

Please suggest.

--
Vishnu Singh | http://marklogicgd.blogspot.in/
XSL-List info and archive<http://www.mulberrytech.com/xsl/xsl-list>
EasyUnsubscribe<-list/2718916> (by email)

GDV Dienstleistungs-GmbH & Co. KG
GlockengieCerwall 1
D-20095 Hamburg
www.gdv-dl.de<http://www.gdv-dl.de>

Sitz und Registergericht: Hamburg
HRA 93 894
USt.-IdNr : DE 205183123

KomplementC$rin:
GDV Beteiligungsgesellschaft mbH
Sitz und Registergericht: Hamburg
HRB 71 153

GeschC$ftsfC<hrer:
Dr. Jens Bartenwerfer
Michael Bathke
Volker Sonnenburg

------------------------------------------------------------------
Diese E-Mail und alle AnhC$nge enthalten vertrauliche und/oder rechtlich
geschC<tzte Informationen. Wenn Sie nicht der richtige Adressat sind oder
diese E-Mail irrtC<mlich erhalten haben, informieren Sie bitte sofort den
Absender und vernichten Sie diese E-Mail. Das unerlaubte Kopieren sowie die
unbefugte Weitergabe der E-Mail ist nicht gestattet.

This e-mail and any attached files may contain confidential and/or privileged
information. If you are not the intended recipient (or have received this
e-mail in error) please notify the sender immediately and destroy this e-mail.
Any unauthorised copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.
XSL-List info and archive<http://www.mulberrytech.com/xsl/xsl-list>
EasyUnsubscribe<-list/778978> (by email<>)
"This e-mail and any attachments transmitted with it are for the sole use of
the intended recipient(s) and may contain confidential , proprietary or
privileged information. If you are not the intended recipient, please contact
the sender by reply e-mail and destroy all copies of the original message. Any
unauthorized review, use, disclosure, dissemination, forwarding, printing or
copying of this e-mail or any action taken in reliance on this e-mail is
strictly prohibited and may be unlawful."
1
2
3
4
5
6
7
8
9
10


Current Thread
Keywords