# doc-available

Returns true if a document with the given URI can be successfully loaded, false otherwise.

doc-available($uri as xs:string?) → xs:boolean

Arguments
| $uri | xs:string? | The URI of the required document (relative to the static base URI)
Result | xs:boolean

Links to W3C specifications

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

Applies to: XPath 2.0, XSLT 2.0, XQuery 1.0 and later versions

XPath 2.0 Specification

XPath 3.0 Specification

Notes on the Saxon implementation

Saxon effectively executes the `doc()` function and returns true if it succeeded; as a side-effect, the document will be available in memory for use when the `doc()` function is subsequently called with this URI.

A user-supplied URIResolver is invoked in the same way as for the `doc()` function.

Next