RE: [xsl] XPath count function in JavaScript

Subject: RE: [xsl] XPath count function in JavaScript
From: Jeff Beadle <Jbeadle@xxxxxxxx>
Date: Thu, 6 May 2004 08:29:36 -0400
Hi Tomas,

The reason you are not seeing the output of the count is because you are
loading the value into an xsl:variable and not to the output of the
transform.

An xsl:variable is pretty much like any other "variable" construct in other
programming languages.  So, you are not going to see the variables value
unless you "return it" or display it somehow from its context/scope.

In order to get the value to the output stream of the transform, you need to
either select the value from the variable or directly output the count value
... either way you'll most likely want to use xsl:value-of, which I believe
someone has already shown you how to do.

This is a pretty fundamental concept, so you may want to look into getting a
book on xslt to learn more about the language.

- Jeff

Current Thread