Re: [xsl] Count a substring of an attribute in childnodes

Subject: Re: [xsl] Count a substring of an attribute in childnodes
From: "Ragulf Pickaxe" <jawxml@xxxxxxxxxxx>
Date: Wed, 09 Mar 2005 13:26:04 +0000
really it is pretty confusing to people offering help if you post input and output from unrelated expressions.

Copy-paste/writing error, sorry



count() is very efficient but has nothing to do with the problem that you have: it counts the number of nodes in a set, or in xslt2 it counts the number of items in a sequence. It has nothing to do with calculating totals.

I thought I had seen count being used in the way I tried (counting the total of node values in a given nodeset). After rereading, I see that it must have been sum, that I was thinking of.


I tried select="sum(number(colspec[contains(@colwidth,'*')]/substring-before(@colwidth,'*')))" instead, but this does not work either. So it will be the recursive template.
I must say that I find I still lack understanding of XPath :-(


Regards,
Ragulf Pickaxe :-/

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


Current Thread