cts:uri-match("/pattern*.xml", ("limit= {$limit} ")
--> this throws an error
Is there a way to pass the limit value as variable($limit
)?
cts:uri-match("/pattern*.xml", ("limit= {$limit} ")
--> this throws an error
Is there a way to pass the limit value as variable($limit
)?
Inside of a quoted string literal you can't start a code block.
Alternative solutions to achieve what you want:
You can use the concat()
function:
let $limit := 100
return
cts:uri-match("/pattern*.xml", concat("limit=", $limit) )
You can concatenate with the ||
operator:
let $limit := 100
return
cts:uri-match("/pattern*.xml", "limit="||$limit)