Re: Count nodes which are NOT of a particular name

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 UTC