child::para[position()=3][attribute::type=warning] selects the third para child of the context node if that child has a type attribute with value warning