fn:document

Loads one or more documents identified by their URIs (using the base URI of the node given in the second argument, if it is supplied, to resolve any relative URIs). URIs are handled by the URIResolver in the same way as the doc() function.

document($uri as item()*) ➔ node()*

Arguments

 

$uri

item()*

Result

node()*

document($uri as item()*, $base as node()*) ➔ node()*

Arguments

 

$uri

item()*

 

$base

node()*

Result

node()*

Namespace

http://www.w3.org/2005/xpath-functions

Links to W3C specifications

XSLT 3.0 Specification

Notes on the Saxon implementation

The Saxon implementation calls the same underlying code as the doc() function; the differences are in the way relative URIs are handled, and the fact that a single call can process multiple URIs.