Kiwi Posted May 15, 2008 Posted May 15, 2008 I have an XSL sheet for creating CSV data files. It strips any extra return characters and commas from the data and creates the CSV without having quotes around all the data. The trouble is I need to have carriage return+line feed as the EOL char. For some reason I am getting two carriage returns + line feed. Please see attached CSL file. Any help greatly appreciated! data.xsl.zip
beverly Posted June 30, 2008 Posted June 30, 2008 Are you really trying to strip out (in this order): "," CR LF ? If so, you might not be actually stripping them out, and therefore are keeping them AND adding the $crlf at the end. Maybe you need to do this:
Kiwi Posted July 2, 2008 Author Posted July 2, 2008 Thanks for the reply Beverly. However the Translate function is working fine. The problem is not in the charaters I am taking out of the data, it is in the CRLF I am trying to put in. The $crlf variable does not output a simple crlf sequence. cheers!
comment Posted July 2, 2008 Posted July 2, 2008 (edited) FWIW, I used your file to perform a test export, and the lines end exactly with CRLF - no duplication. --- Oh, - here's the file, in case it helps. result.txt.zip Edited July 2, 2008 by Guest
Kiwi Posted July 2, 2008 Author Posted July 2, 2008 Hi - sorry forgot to point out that this is to run on a windows platform. I have just tried it on a MAC and it works fine. On a PC it does not.
beverly Posted July 18, 2008 Posted July 18, 2008 OK, I've run into this a few times in the last 2 weeks. IF your xsl:output _method_ is "text", then you must, let me repeat: MUST, optimize your XSLT. What that means is remove any and ALL whitespace from between and around tags and text, unless the text is intended to be included. What you are seeing (on windows) is the additional whitespace (returns) that are in the XSLT. It shouldn't be that way, they should be [color:red]IGNORED, but there appears to be a bugglet there (windows only, as mac does not require the optimization). Try it and let us know if that's the solution.
Joost Miltenburg Posted May 11, 2010 Posted May 11, 2010 (edited) Hi Beverly, Do you have any insights into when/or if FMI will fix this bug ? We are at FM11 already and still the bug remains... This is really silly. I'll try stripping out any stuff that is in my template... I am still getting the extra lines... could you help out ? I'll include the xsl... TIA a_simple_sheet.xsl.zip Edited May 11, 2010 by Guest
Recommended Posts
This topic is 5310 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now