Folder
Folder

Reputation: 43

Match node with specific Ancestor Xpath Xslt

So my question will seems fairly simple to any XSLT/XPATH veteran but I didn't found any post about it so here it is.

What is the correct XPATH syntax to select nodes with specific ancestor ?

Let say I want all "country" nodes that have "europe" as ancestor (not direct parent), I've tried many different syntaxes but can't find the right one neither the ressources to help me resolve this.

Thanks a lot for your time.

Upvotes: 1

Views: 1143

Answers (1)

Martin Honnen
Martin Honnen

Reputation: 167716

match="europe//country" will match country elements with a europe ancestor.

Upvotes: 2

Related Questions