xsl-list
[Top] [All Lists]

Re: "sum" of "substring"

2003-10-26 00:56:47
MHO, this is really the realm of a flat-text processing program
like awk or perl. You have a wonderful XSLT hammer, but
you're trying to use it on a screw.

As shown in my reply to the original message, solving this kind of problems
is straightforward in xslt using the "transform-and-sum" template of FXSL.

Look for examples of using the "transform-and-sum" template by searching the
list for "transform-and-sum".

Among other things this template has been used to sum numbers containing
commas or measurement units, to implement "time arithmetic" and to sum
hexadecimal numbers.

This is just an example of many kind of problems, which are considered
extremely difficult or not suitable for XSLT, but are in fact unproblematic,
easy and straightforward to solve using the FXSL library.

Of course, someone may argue that:

   XSLT + FXSL

is not the same as just XSLT.


A good reply to this is that if someone knows XSLT but doesn't know and use
FXSL, they probably do not know completely XSLT  :o)


=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>