2013-05-01 15:13:47 |
Sorin Marian Nasoi |
description |
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';
variable $queryID := xqxq:prepare-main-module('xquery version ''3.0'';
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}</a>');
xqxq:bind-variable( $queryID, xs:QName("ext"), "5");
xqxq:evaluate($queryID) |
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';
variable $queryID := xqxq:prepare-main-module('xquery version ''3.0'';
declare variable $ext as xs:integer external := 0; <a>{$ext}</a>');
xqxq:bind-variable( $queryID, xs:QName("ext"), "5");
xqxq:evaluate($queryID) |
|