This actually succeeds when there is a namespace declaration. It returns an empty set, and this is what the specification says it returns, therefore it is considered successful.
Your definition of success seems to be different from the definition in the specification. You are not talking about this, but we can guess that you expect the elements of the “project” to return, even if they are in a different namespace from the one you are looking for.
I will not go any further; @alecxe gave you the answer, and you will find the same question a thousand times if you look for the "default XPath namespace". In the future, however, do not assume that we implicitly know what you expect from your incorrect code: let us know about the desired result; and don’t assume that we know what you mean by “failure”: tell us what is really happening.
source share