echo /child::doc/child::chapter[position\(\)=5]/child::section[position\(\)=2] selects the second section of the fifth chapter of the doc document element
../xgrep "/xgrep-test/child::doc/child::chapter[position()=5]/child::section[position()=2]" xgrep-test1.xml

