XQuery Module
Jump to navigation
Jump to search
This XQuery Module contains functions to evaluate XQuery strings and modules at runtime.
Conventions
All functions in this module are assigned to the http://basex.org/modules/xquery namespace, which is statically bound to the xquery prefix.
All errors are assigned to the http://basex.org/errors namespace, which is statically bound to the bxerr prefix.
Functions
xquery:eval
| Signatures | xquery:eval($expr as xs:string) as item()* |
| Summary | Evaluates $expr as XQuery expression at runtime and returns the resulting items. |
| Errors | BXXQ0001: the query contains updating expressions.
|
| Examples |
|
xquery:invoke
| Signatures | xquery:invoke($uri as xs:string) as item()* |
| Summary | Opens $uri as file, evaluates it as XQuery expression at runtime, and returns the resulting items. |
| Errors | BXXQ0001: the query contains updating expressions.
|
xquery:type
Added in Version 7.2.
| Signatures | xquery:type($expr as item()*) as item()*
|
| Summary | Similar to fn:trace($expr, $msg), but instead of a user-defined message, it emits the compile-time type and estimated result size of its argument.
|
Errors
| Code | Description |
|---|---|
BXXQ0001
|
A dynamically evaluated query must not contain any updating expressions. |
Changelog
This module was introduced with Version 7.3. Functions have been adopted from the obsolete Utility Module.