I would need the following signature added to XQXQ:
declare %an:sequential function xqxq:bind-variable(
$query-key as xs:anyURI,
$var as xs:QName,
$value as xs:string*) as empty-sequence() external ;
such that the XQXQ can cast to the correct type internally.
details about the issues I have:
- one creates a XQUERY (please see below) that raises an error because of the external variable binding:
xqxq:bind-variable( $queryID, xs:QName("ext"), "5");
should be
xqxq:bind-variable( $queryID, xs:QName("ext"), xs:integer(5));
I would need the following signature added to XQXQ:
declare %an:sequential function xqxq:bind-variable(
$query-key as xs:anyURI,
$var as xs:QName,
$value as xs:string*) as empty-sequence() external ;
such that the XQXQ can cast to the correct type internally.
details about the issues I have:
- one creates a XQUERY (please see below) that raises an error because of the external variable binding:
xqxq:bind-variable( $queryID, xs:QName("ext"), "5");
should be
xqxq:bind-variable( $queryID, xs:QName("ext"), xs:integer(5));
XQUERY:
import module namespace xqxq = 'http:// www.zorba- xquery. com/modules/ xqxq'; main-module( 'xquery version ''3.0'';
variable $queryID := xqxq:prepare-
declare namespace o = ''http:// www.zorba- xquery. com/options/ features' ';declare option o:enable ''hof'';
declare variable $ext as xs:integer external := 0; <a> {$ext}& lt;/a> '); $queryID)
xqxq:bind-variable( $queryID, xs:QName("ext"), "5");
xqxq:evaluate(