If the domain of the current page exists as content of the current page, then, yes, you can select it and use it in an XPath predicate. Otherwise, no, there is no standard, universal variable defined in XPath for the domain of the current page.
Any given XPath hosting language or tool may have a mechanism to provide the domain of a page. For XPath 3.0, they might leverage the standard environment variable functions, fn:environment-variable
and fn:available-environment-variables
.
Alternatively, you could construct the XPath dynamically within the hosting language that knows the page – see How to pass variable parameter into XPath expression?.