echo child::para[attribute::type='warning'][position\(\)=2] selects the second para child of the context node that has a type attribute with value warning
../xgrep "/xgrep-test/child::para[attribute::type='warning'][position()=2]" xgrep-test1.xml

