Re: [xsl] Need StringBuffer equivalent in xslt

Subject: Re: [xsl] Need StringBuffer equivalent in xslt
From: Michael Müller-Hillebrand <mmh@xxxxxxxxxxxxx>
Date: Wed, 29 Sep 2010 15:46:10 +0200
Sudheshna Iyer,

In addition to Davids remark and based on my own experiences while learning
XSLT I like to add this:

If you want two separate results you simply process the input twice.

In your description you use the word "during", and this concept is handled
differently in a non-procedural language. The benefits of code IMO far
outweigh the possible extra processing time.

A real-world example: My source XML is a collection of articles by different
authors. I process the content multiple times (all in one XSLT transform): a)
to create HTML pages, b) to create a table of contents from the headings only,
c) to create an alphabetical index from embedded index elements, d) to create
an alphabetical author list from authors names.

- Michael

Am 29.09.2010 um 14:26 schrieb sudheshna iyer:

> I have 10 fields for which I have to check the length and if length is >
required length, I have to trucate those fields.
> In that process, I have to maintain a field containing list of all fields
that got truncated with original values to report back to
> calling program.
>
> I used to have a StringBuffer in java during each condition to append all
fields that got truncated with original values. I need the similar
functionality.

Current Thread