Setinger
Setinger

Reputation: 169

Go to parent and count the number of childs in XSLT

I have like

<Father>
<child1/>
<child2/>
<child3/>
<child4/>
</Father>

I am at <child1> node.(or in any other child node.) now I need to count the number of childs Father has. How to do this?

Upvotes: 0

Views: 1425

Answers (1)

Martin Honnen
Martin Honnen

Reputation: 167506

Does count(../*) help? It counts the child elements of the parent of the context node.

Upvotes: 4

Related Questions