Subject: Re: [xsl] Output to a file...and line feeds...|
From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Date: Mon, 23 Jul 2007 17:30:42 +0100
1. How is the best way to create a new text file (or Excel CSV file) using an XSLT file?
If you mean in addition to the result of the transform then it's like DC says, but if you mean _as_ the result of the transform then use <xsl:output method="text"/>
2. how is the best way to create a line-feed? (After printing my comma separated values, I need to "drop down" a line for the next data group.)
If you are creating it using a function (such as concat()) within an attribute then I use
(which is :) otherwise use <xsl:text>
</xsl:text> I would advise against doing: <xsl:text> </xsl:text> ..because it becomes a maintenance issue when you can see how much white space you're adding to the result.