[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Cannot produce a carriage return

Subject: Re: Cannot produce a carriage return
From: Joerg Heinicke <joerg.heinicke@xxxxxx>
Date: Wed, 03 Jul 2002 22:23:33 +0200
resultset row field
<xsl:template match="ROW">
  <xsl:apply-templates/>
  <xsl:text>& #10;</xsl:text>
</xsl:template>

(without the space)

Regards,

Joerg

Frank Shen wrote:
I have a xml file <?xml version="1.0"?>
<RESULTSET><ROW><FIELD>1000000001</FIELD><FIELD>frank</FIELD><FIELD>shen</FIELD><FIELD></FIELD></ROW><ROW><FIELD>1000000002</FIELD><FIELD>Mark</FIELD><FIELD>Bronco</FIELD><FIELD></FIELD></ROW>
</RESULTSET>


I want to create a CSV file from it. Something like:

1000000001,frank,shen,,
1000000002,Mark,Bronco,,

The xsl file I use to create CSV file is like :
<?xml version="1.0" encoding="ISO-8859-1" ?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
>
<xsl:output method="text"/>


<xsl:template match="RESULTSET">"account id","first
name","last name",other,
<xsl:apply-templates /> </xsl:template>
<xsl:template match="ROW"><xsl:apply-templates
/>
</xsl:template>
<xsl:template match="FIELD"><xsl:apply-templates
/>,</xsl:template>


</xsl:stylesheet>

But since I don't have a line feed between each 'ROW'
tag, I got:
1000000001,frank,shen,,1000000002,Mark,Bronco,,

No matter how I use , and for-each, in the xsl
file, I couldn't get the right result.


Does anyone has any idea? I am desprate.

Thanks


__________________________________________________ Do You Yahoo!? Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com

XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list





XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.