[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Re: need help with MAX and MIN functions (if they exist)


Subject: [xsl] Re: need help with MAX and MIN functions (if they exist)
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Mon, 21 Jul 2003 19:58:12 +0200

> That?s exactly it.  The rest of your answer re-iterates the power of HOF's
and the other many pro's of using FXSL, but I think
> sometimes you miss the point of using exslt - its easy!
>
> I just think when a new user ask's for min() and max() functions, it's
best to let them discover exslt before incurring the extra
> learning curve of fxsl.

Hi Andrew,

Thank you so much for giving me the opportunity to dispel yet another myth
about FXSL -- when used by an end user in the "xsl:call-template mode" FXSL
is not more difficult than EXSLT.

For example, to obtain the maximum in the case when the nodes of the
node-set passed as parameter have numeric values, one just calls the
"maximum" template, e.g.:

      <xsl:call-template name="maximum">
        <xsl:with-param name="pList" select="/*/*"/>
      </xsl:call-template>

The same goes for many other templates likely to be needed by such an user.

> I just think when a new user ask's for min() and max() functions, it's
best to let them discover exslt before incurring the extra
> learning curve of fxsl.

It is also nice to let them know that many of these functions do not need to
be implemented as extensions. Encouraging a beginner to look for (and write
his own) extension functions in any case he finds difficult will often be a
bad service to this person.

Remember how often people start writing their extension functions to
implement a counter for a

        "for(i=1; i < 10; i++)" -type

iteration.


As for the usefulness of EXSLT, there isn't any disagreement between us. I
wouldn't have implemented the functions of its "sets" and "common" module if
I thought EXSLT was not useful.


=====
Cheers,

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






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



Current Thread