xsl-list
[Top] [All Lists]

Re: [xsl] For CSV output file - should end of record marker be line feed or a carriage return from xsl

2014-11-12 10:26:10
Michael's response is spot on. Depends on the receiving application.

I happen to write many style sheets to extract content from tech pubs to 
generate spread sheets for program managers. Everything is imported straight 
into Excel. I use a semi-colon (;) for my delimiters and use 
<xsl:text>&#xA;</xsl:text> for all my end or line/rows.

Works perfectly for every import into Excel.


C Flanders                                                           

From: Michael Kay mike(_at_)saxonica(_dot_)com 
[mailto:xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com] 
Sent: Friday, November 07, 2014 1:43 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] For CSV output file - should end of record marker be line 
feed or a carriage return from xsl

This question has nothing to do with XSLT and is therefore off-topic. It's a 
question about CSV. You won't find a standard for CSV files - you just have to 
do what works for your receiving application.

Michael Kay
Saxonica
mike(_at_)saxonica(_dot_)com
+44 (0) 118 946 5893



On 7 Nov 2014, at 17:39, Catherine Wilbur cwilbur(_at_)uwindsor(_dot_)ca 
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> wrote:


1) Currently I am using a line feed in my code at the end.  Should it be a line 
feed or carriage return?  Reason I am asking is because when I open my CSV file 
in NotePad or WordPad the data wraps.  But with Notes++ or Excel the data does 
not wrap.  Currently using a line feed at end of my data.  Assuming it should 
be a carriage return.  Guessing that the data is wrapping when I open the CSV 
file because it does not recognize the carriage return or line feed but Notes++ 
does recognize these characters. 

http://stackoverflow.com/questions/7965642/explicitly-specify-linefeed-character-and-not-carriage-return
 

Should I be using a line feed in my code.  (this is what I am using now) 
        
<xsl:text>&#xA;</xsl:text>


Or should I be using a carriage return in my code. 
<xsl:text>&#xD;</xsl:text>



_____________________________________________________________________
Catherine Wilbur  |  Senior Application Programmer  |  IT Services 
401 Sunset Avenue, Windsor ON Canada  N9B 3P4 
(T) 519.253.3000 Ext. 2745  |  (F) 519.973.7083  |  (E) 
cwilbur(_at_)uwindsor(_dot_)ca 
www.uwindsor.ca/its 
XSL-List info and archive 
EasyUnsubscribe (by email) 

XSL-List info and archive 
EasyUnsubscribe (by email) 
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>