xsl-list
[Top] [All Lists]

Re: xsl:for-each evaluator?

2003-06-11 12:25:38
If you have:

<xsl:for-each select="$someExpression">
. . .
</xsl:for-each>

Then the number of times the body of the xs:for-each element will be
evaluated is:

count($someExpression)


The speed of finding count($someExpression) should be proportional to the
length of $someExpression.


In case you were asking about the time it would take to evaluate the
xsl:for-each, the answer is that this in general is impossible to predict -- 
there is a theorem in the theory of Algorithms (about universal functions, I
think), which states that in general it is impossible if a computation is
going to terminate.



=====
Cheers,

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



"Corey Wilson" <corey(_at_)onlineinfoservices(_dot_)com> wrote in message
news:000501c33046$7cb86890$7501a8c0(_at_)donte(_dot_)(_dot_)(_dot_)
Does anyone know of a program that will evaluate an xsl:for-each loop to
tell the number of computations the loop is doing?  Or the speed of the
algorithm (ie O(n log n) ...).


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






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