<XPath xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
(//. | //@* | //namespace::*)
[
    ancestor-or-self::ds:SignedInfo
] 
</XPath>