chapter[title] selects the chapter children of the context node that have one or more title children <?xgrep-match [xgrep-test1.xml]--------------------------------?> <chapter> <title name="t1">Title</title> <title name="t2">Introduction</title> <title name="t3"/> </chapter> <?xgrep-match [xgrep-test1.xml]--------------------------------?> <chapter> <title/> </chapter>