W3C home > Mailing lists > Public > www-xsl-fo@w3.org > October 2004

Re: Count nodes which are NOT of a particular name

From: Elvira Nieto Carretero <Elvira.Nieto@isotrol.com>
Date: Fri, 29 Oct 2004 09:05:47 +0200 (CEST)
Message-ID: <1131.62.81.202.117.1099033547.squirrel@62.81.202.117>
To: www-xsl-fo@w3.org

Hi,

count(../myNode[name()!=myNode])

>
> Hi there,
>
> I'm trying to write an XPath function that counts all the siblings of a
> current node which are NOT "myNode" elements. To count all the myNode
> elements, I'd do this:
>
> 	count(../myNode)
>
> How do I negate this, to get
>
> 	[pseudo-code] count(../* WHERE name() NOT 'myNode')
>
> I just can't figure out the syntax for this.
>
> Cheers,
> Martin
>
>
>
>
Received on Friday, 29 October 2004 07:05:50 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:06:13 GMT