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

Count nodes which are NOT of a particular name

From: Martin Holmes <mholmes@uvic.ca>
Date: Thu, 28 Oct 2004 10:42:17 -0700
To: www-xsl-fo@w3.org
Message-ID: <clrb14$dad$1@sea.gmane.org>

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 Thursday, 28 October 2004 20:22:04 GMT

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