Subject: RE: [xsl] Cannot produce a carriage return From: Frank Shen <xshen888@xxxxxxxxxxxx> Date: Thu, 4 Jul 2002 08:53:43 -0700 (PDT) |
Hi, Michael: Thanks a lot. Frank Shen --- Michael Kay <michael.h.kay@xxxxxxxxxxxx> wrote: > Use <xsl:text> </xsl:text> to produce a newline > character. > > Michael Kay > Software AG > home: Michael.H.Kay@xxxxxxxxxxxx > work: Michael.Kay@xxxxxxxxxxxxxx > > > -----Original Message----- > > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On > Behalf Of Frank Shen > > Sent: 03 July 2002 20:58 > > To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx > > Subject: [xsl] Cannot produce a carriage return > > > > > > 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 > __________________________________________________ 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Cannot produce a carriage, Michael Kay | Thread | [xsl] call-template with dynamic pa, Saied Gerami |
Re: [xsl] Cannot produce a carriage, Frank Shen | Date | Re: [xsl] The Future of Browser-Bou, Robert S. Koberg |
Month |