Re: [xsl] Problem:Counting specific type of nodes lying in between two nodes in a tree

Subject: Re: [xsl] Problem:Counting specific type of nodes lying in between two nodes in a tree
From: "Joris Gillis" <roac@xxxxxxxxxx>
Date: Mon, 07 Feb 2005 16:27:13 +0100
Tempore 16:03:59, die 02/07/2005 AD, hinc in xsl-list@xxxxxxxxxxxxxxxxxxxxxx scripsit Sanjukta Mitra <sanmit27@xxxxxxxxx>:

  If the current node is ptr6 this should return 4
Herebs the piece of code that is not working:

<xsl:param name="Cnt"
select="count(ancestor::decisiontree_answer[@answer='no'][ancestor::decisiontree_question[.=$stop_question]>
0])"/>

Hi,


Try this code:
<xsl:param name="Cnt" select="count(ancestor::decisiontree_answer[@answer='no'][ancestor::decisiontree_question=$stop_question])"/>


Btw, why are those element names so long? The root element is named 'decisiontree', so why actually repeat that string over and over again?


regards, -- Joris Gillis (http://www.ticalc.org/cgi-bin/acct-view.cgi?userid=38041) "In the land of the blind, the one-eyed man is king"

Current Thread