/descendant::olist/child::item selects all the item elements that have an olist parent and that are in the same document as the context node <?xgrep-match [xgrep-test1.xml]--------------------------------?> <item name="item2"/>