Description
The fn:doc-available function is a way to avoid the errors returned by the fn:doc function if a document is not available. This function will return true if calling the fn:doc function on the same URI will result in a document node. It will return false if the fn:doc function would not return a document node.
This description is © Copyright 2007, Priscilla Walmsley. It is excerpted from the book XQuery by Priscilla Walmsley, O'Reilly, 2007. For a complete explanation of this function, please refer to Appendix A of the book. Arguments and Return TypeName | Type | Description |
$uri |
xs:string? |
the URI of the document to check for |
return value |
xs:boolean |
ExamplesXQuery Example | Results |
---|
doc-available(
'http://www.datypic.com/functx./input/order.xml') |
true |
doc-available(
'http://www.datypic.com/functx./input/foo.xml') |
false |
See Alsofn:doc | Opens a document based on a URI |
History |
Recommended Reading:
|