Re: [xsl] Using count() with a param?

Subject: Re: [xsl] Using count() with a param?
From: Joerg Heinicke <joerg.heinicke@xxxxxx>
Date: Tue, 28 May 2002 22:38:41 +0200



Dean Saxe wrote:
I am attempting to write a stylesheet which will be used to count the number
of nodes in a document.  However, I need to be able to pass the nodes which
I want to be counted in to the stylesheet as a parameter ($nodeName).
Obviously, I cannot use count($nodeName), since the parameter is text and
not a node set.  I have also attempted to use count(*[name()=$nodeName]),
however, this always results in a count of zero, since I need to specify the
fully qualified name of the node (e.g. /Report/Body/Table/Record and not
just Record).

Has anyone tackled this problem successfully?  Any insight into this issue
is greatly appreciated!


Dean H. Saxe

XSL-List info and archive:

Current Thread