Tips that make life of a software engineer easier.
Well, not exactly. Some posts are open questions that I haven't found an answer ... yet

Thursday, March 29, 2007

Escape CSV string in XSLT

To output CSV format, we will need to escape a field if it has quote, or comma or line feed. To escape a CSV string in XSLT is not a straight forward task. After a little search I found the following solution which passed my test. The code is from a thread I found here: http://www.cygwin.com/ml/xsl-list/2001-03/msg00794.html