1 2 3 4 5 6 7 8
<XPath xmlns:n1="http://example.net" > (//. | //@* | //namespace::*) [ ancestor-or-self::n1:elem2 ] </XPath>