
MarkLogic 12 Product Documentation
cts:bind-query-paramscts:bind-query-params(
$query as cts:query,
$params as map:map
) as cts:query
Summary
Replace parameters in a query with actual values.
| Parameters |
| query |
Input query of which to replace the parameters.
|
| params |
A map of parameter name to value bindings, where each key is the name
passed to cts:param() and the corresponding value replaces
that parameter in the query.
|
Example
xquery version "1.0-ml";
let $query-template:=cts:word-query(cts:param("wordParam"))
return cts:bind-query-params($query-template,map:entry("wordParam","cat"))
=> cts:word-query("cat", ("lang=en"), 1)
Copyright © 2026 MarkLogic Corporation. MARKLOGIC is a
registered trademark of MarkLogic Corporation.