This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Efficiency of xsl:number with the "value" attribute specified
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] Efficiency of xsl:number with the "value" attribute specified
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Fri, 1 Jun 2001 12:16:25 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
> I have heard of recommendations to avoid xsl:number if
> possible, due to efficiency
> reasons.
>
> However, the processing of xsl:number falls into two separate
> distinct cases -- when
> the number is already supplied in the "value" attribute, and when not.
>
> My question is should I be concerned (so much, or at all)
> about efficiency, in case
> when I'm using the "value" attribute to specify the number.
The main cost of xsl:number is the number of nodes it has to visit. This
doesn't apply if you supply a value, and use xsl:number just for its
number-formatting behavior. However, in that case you might be better off
using the format-number() function - unless you want to do things like roman
numbering.
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list