XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
alec eiffelSubject: extra carriage returns in "csv" output from xslt
Author: alec eiffel
Date: 09 Mar 2009 12:24 PM
Hi there,

I'm using this XSL to process an XML file that I eventually want in CSV.

<?xml version='1.0' ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output indent="no" method="text"/>
<xsl:template match="nC">
<xsl:text disable-output-escaping="yes">"</xsl:text>
<xsl:value-of select="normalize-space(id)"/>
<xsl:text disable-output-escaping="yes">"</xsl:text>
<xsl:text disable-output-escaping="yes">,</xsl:text>
<xsl:text disable-output-escaping="yes">"</xsl:text>
<xsl:value-of select="normalize-space(name)"/>
<xsl:text disable-output-escaping="yes">"</xsl:text>
</xsl:template>
</xsl:stylesheet>

And I am getting this output:



"01","basic"

"02","task1 bundle"


"03","task2 bundle"


"04","task1 family"

Where the carriage returns between lines are extra, and need to be suppressed. The spaces at the beginning of lines need to be suppressed in the CSV output, which I want to look like:

"01","basic"
"02","task1 bundle"
"03","task2 bundle"
"04","task1 family"


Can anyone see what I am doing wrong here? Thanks for the input!!

alec

Posttop
Tony LavinioSubject: extra carriage returns in
Author: Tony Lavinio
Date: 09 Mar 2009 03:45 PM
Originally Posted: 09 Mar 2009 03:44 PM
<Double-posting. See http://www.stylusstudio.com/SSDN/default.asp?action=9&read=8379&fid=48 >

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.