Re: [xsl] question about count(node())

Subject: Re: [xsl] question about count(node())
From: "Eric Bréchemier" <eric.brechemier@xxxxxxxxx>
Date: Sat, 23 Jun 2007 01:05:33 +0200
Hi Abel,

On 6/22/07, Abel Braaksma wrote:
If you want to count *all* nodes, I assume you mean all descendants from
block. Use: count(//node()). If you want all nodes, but not the
whitespace or text nodes, use count(//*). If you want all nodes, but not
whitespace nodes, including text nodes, you can use count(//text()[.] |
//*). etc

Actually, rather count(.//node()), count(.//*), etc... unless the OP wants to count all nodes in the document ;)

Cheers,

Eric Brichemier

Current Thread