child::*[self::chapter or self::appendix] selects the chapter and appendix children of the context node
Section2
Title Introduction </chapter> <?xgrep-match [xgrep-test1.xml]--------------------------------?> <chapter> <title/> </chapter> <?xgrep-match [xgrep-test1.xml]--------------------------------?> <chapter/> <?xgrep-match [xgrep-test1.xml]--------------------------------?> <appendix/>