This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Converting XML source to CSV output


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]