I\'m struggling to get the correct combination of an XPath expression and the namespace specification as required by package XML (argument namespaces) f
Namespace definition without prefix (xmlns="...") is default namespace. In case of XML document having default namespace, the element where default namespace declared and all of it's descendant without prefix and without different default namespace declaration are considered in that aforementioned default namespace.
Therefore, in your case you need to use prefix registered for default namespace at the beginning of all elements in the XPath, for example :
/xmlns:doc//xmlns:b[@omegahat:status='foo']
UPDATE :
Actually I'm not a user of r, but looking at some references on net something like this may work :
getNodeSet(doc, "/ns:doc//ns:b[@omegahat:status='foo']", c(ns="http://something.org"))