This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Count all the following nodes of a perticular parent
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] Count all the following nodes of a perticular parent
- From: "Michael Kay" <mhkay at iclway dot co dot uk>
- Date: Fri, 29 Jun 2001 10:42:51 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
> how can i count following nodes of a perticular node, with a
> perticular parent.
If the context node is the second <branch>, then count(following-sibling::*)
(which I think is what I suggested when you first raised the question) will
return 2. Note that this is actually counting elements, not nodes.
Mike Kay
Software AG
> the xml is something like that:
> <root>
> <branch>
> <subBranch>
> .
> .
> <branch>
> <subBranch>
> .
> .
> <branch_anotherType>
>
> <subBranch>
> .
> <branch_anotherType>
>
> <subBranch>
> .
> .
> </root> .
>
> actually i want to count how many child nodes exists after
> 2nd <branch>
> element.
> i expected to have 2 as the result
>
> thank you.
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list