To satisfy other possible use cases as well as yours, maybe we need to extend the grammar
<x:expect>
<elem x:attribute="XPath expression" />
</x:expect>
and evaluate the expression in the context of the corresponding <elem> in $x:result. If the evaluation result is true, all the attributes in the <elem> are considered as passed. In your case, you would write just <elem x:attribute="true()">. Some might write more conditions such as x:attribute="exists(@*) and empty(@foo)".
Just my quick thought. I don't know its feasibility...