xsl-list
[Top] [All Lists]

Re: [xsl] Need StringBuffer equivalent in xslt

2010-09-29 08:46:28
Sudheshna Iyer,

In addition to David’s 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 author’s 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.




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--