The situation can be summaried somewhat like this.
In the technologies proposed within the w3c's charter, to query an "external" document(s) at the time of having a specific context of a loaded xml document, there disposes a document() function in xslt 1.0 and continued to carry along to xslt 2.0. But, it should only be recognized by the xslt engine. In the xpath 1.0, there isn't any window opened to query the external document(s) at the same time of it (the xpath engine) having a context. But, in xpath 2.0, there is now an xpath function proper (not necessarily being used in xslt) disposed for the purpose, namely, the built-in
doc(). And then, the xquery recommendation, worked out in close collaboration with the group for xslt 2.0 is the closest in the spirit to what the sql is for relational db. In xquery, it should gurantee on xpath 2.0 support right at the beginning. And there is a built-in doc() for the purpose as well.