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
ash chavanSubject: Carriage return in the output
Author: ash chavan
Date: 24 Oct 2007 11:47 AM
Hello,

I am using the ant task to convert my XML to csv format as follows:
<target name="testcsv">
<xslt style="report-40.csv.xsl" in="40.xml" out="40.csv">
<classpath refid="compile.classpath"></classpath>
<outputproperty name="method" value="xml"/>
<outputproperty name="encoding" value="UTF-8"/>
<outputproperty name="indent" value="yes"/>
<outputproperty name="media-type" value="text/html"/>
</xslt>
</target>
In my xsl, I am using, <xsl:text>&#xD;&#xA;</xsl:text> for the carriage return and line feed but when my process my XML, I see &#13; at the end of each line. Could any one tell me what am I doing wrong?

Postnext
Ivan PedruzziSubject: Carriage return in the output
Author: Ivan Pedruzzi
Date: 24 Oct 2007 10:34 PM

Hi Ash

Try changing the output method to text

<outputproperty name="method" value="text"/>

Hope this helps
Ivan Pedruzzi
Stylus Studio Team

Postnext
ash chavanSubject: Carriage return in the output
Author: ash chavan
Date: 25 Oct 2007 11:08 AM
Thanks Ivan.
It worked. It was a great help.

Postnext
ash chavanSubject: Tab delimited file in Excel
Author: ash chavan
Date: 08 Nov 2007 11:22 AM
I need some further help on the topic. I am generating my csv file using the task:
<target name="testcsv">
<xslt style="report-40.csv.xsl" in="40.xml" out="40.csv">
<classpath refid="compile.classpath"></classpath>
<outputproperty name="method" value="text"/>
<outputproperty name="encoding" value="UTF-8"/>
<outputproperty name="indent" value="yes"/>
<outputproperty name="media-type" value="application/vnd.ms-excel"/>
</xslt>
</target>
I want to open the file in Microsoft excel but the tabs are displayed as some character and my elements are separated based on comma.
What am I doing wrong here? Any help would be appreciated.

Posttop
Alberto MassariSubject: Tab delimited file in Excel
Author: Alberto Massari
Date: 09 Nov 2007 05:51 AM
A csv file uses comma as separator; could you attach the actual XML?

Alberto

 
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.