document

Single argument function: Loads one or more documents identified by their URIs. URIs are handled by the URIResolver in the same way as the doc() function.

Two argument functionLoads one or more documents identified by their URIs, using the base URI of the node given in the second argument 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()*

Links to W3C specifications

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

Applies to: XSLT 2.0 and later versions

XSLT 2.0 Specification

XSLT 2.1 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.