Subject: RE: [xsl] adding a newline to my output with XSL From: Pankaj Jain <pjain@xxxxxxxxxxx> Date: Mon, 15 Oct 2001 14:22:44 +0100 |
Archie, Sorry for not being coherent. What I was trying to do was put one record on each line separated by commas. I figured it out how to get what I needed below. <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0"> <xsl:output method="text" omit-xml-declaration="yes" indent="no" /> <xsl:strip-space elements="/Equities/Equity" /> <xsl:template match="/"> <xsl:apply-templates /> </xsl:template> <xsl:template match="Equity/*"> <xsl:value-of select="text()" /><xsl:text>,</xsl:text> </xsl:template> </xsl:stylesheet> -----Original Message----- From: Archie Russell [mailto:archier@xxxxxxxxxxxxxxx] Sent: Friday, October 12, 2001 8:59 PM To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx' Subject: RE: [xsl] adding a newline to my output with XSL not sure exactly what you're trying to do--do you want them all on a single line, or one on each line? if you want a newline in there, just put a newline in <xsl:text> at the end of your equity template....eg <xsl:text> </xsl:text> -a > I am trying to take an XML and create a pipe delimited file, or comma > delimited file. My problem so far is that using the > stylesheet below, all > newlines are eliminated, however, if I take out the '<xsl:strip-space > elements="*">' statement, then I get one value on each line. > What I would > like to do is put each "<Equity>" entry on a line with a '|' > or a ',' as the > delimiter. > > > > <?xml version="1.0"?> > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0"> > <xsl:output method="text" omit-xml-declaration="yes" > indent="no" /> > <xsl:strip-space elements="*"> > <xsl:template match="/Equities" mode="listdetails"> > <xsl:apply-templates /> > </xsl:template> > > <xsl:template match="/Equity" mode="listdetails"> > <xsl:value-of select="name()" /> > <xsl:value-of select="text()" /> > <xsl:text disable-output-escaping="yes"></xsl:text> > </xsl:template> > > </xsl:stylesheet> > > > > ---------------------------------------------------- > This email with all information contained herein or attached > hereto may > contain confidential and/or privileged information intended for the > addressee(s) only. If you have received this email in error, > please contact > the sender and immediately delete this email in its entirety and any > attachments thereto.. > > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list ---------------------------------------------------- This email with all information contained herein or attached hereto may contain confidential and/or privileged information intended for the addressee(s) only. If you have received this email in error, please contact the sender and immediately delete this email in its entirety and any attachments thereto.. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] adding a newline to my ou, Archie Russell | Thread | [xsl] Call Template with variable n, Yash |
[xsl] MSXML 4.0 install warning, Michael Beddow | Date | [xsl] RE: XSL-List Digest V3 #1175, Robert Stuart |
Month |