We could add an options parameter to the XSLT document function, providing the same options as fn:doc. It's complicated by the fact that fn:document already has an optional second argument (a node ...