This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Converting XML source to CSV output
- To: Mark Feblowitz <mfeblowitz at frictionless dot com>
- Subject: Re: [xsl] Converting XML source to CSV output
- From: Jeni Tennison <jeni at jenitennison dot com>
- Date: Thu, 20 Sep 2001 16:42:15 +0100
- CC: "'xsl-list at lists dot mulberrytech dot com'" <xsl-list at lists dot mulberrytech dot com>
- Organization: Jeni Tennison Consulting Ltd
- References: <4DBDB4044ABED31183C000508BA0E97F024D52F3@fcpostal.frictionless.com>
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi Mark,
> Perhaps an faq, but why is it that "concat" is used instead of
> merely outputting the text as encountered and letting the output
> stream act as a de facto concat?
Probably just because it's longer to have multiple xsl:value-of than
it is to use a single one, e.g. compare:
<xsl:value-of select="$rec1" />
<xsl:text>,</xsl:text>
<xsl:value-of select="$rec2" />
<xsl:text>,</xsl:text>
<xsl:value-of select="$recn" />
<xsl:text>,</xsl:text>
with:
<xsl:value-of select="concat($rec1, ',', $rec2, ',', $recn, ',')" />
Given that a substantial portion of XSLT processing time is taken up
parsing XML (including the stylesheet), the smaller the stylesheet the
better, arguably.
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list