Change id: inline-function
Implementations | |||||||||||||||
Tests | BaseX 7.7 XQ30 |
EMC/xDB xDB_main_r2411365 XQ30 |
Saxon-EE 9.5.1.1 XP20 |
Saxon-EE 9.5.1.1 XQ10 |
Saxon-EE 9.5.1.1 XP30 |
Saxon-EE 9.5.1.1 XQ30 |
Saxon-EE 9.5.1.4 XQX30 (QT3 v1.1) |
XmlPrime 3.0.0.0 XP30 (QT3 vCVS) |
XmlPrime 3.0.0.0 XQ30 (QT3 vCVS) |
XmlPrime 3.0.0.0 XQX30 (QT3 vCVS) |
XmlPrime 3.0.0.0 XP20 (QT3 vCVS) |
XmlPrime 3.0.0.0 XQX10 (QT3 vCVS) |
XmlPrime 3.0.0.0 XQ10 (QT3 vCVS) |
Zorba 2.9 XQ10 (QT3 vCVS) |
Zorba 2.9 XQ30 (QT3 vCVS) |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
K2-SeqSubsequenceFunc-8[+]
X K2-SeqSubsequenceFunc-8: let $f :=function() { subsequence(subsequence((1, 2, 3, 4), 3, 1), 1, 4) } return $f() |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
pass | pass | pass | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XP30+ XQ30+, satisfied=true) was not met. |
pass |
K2-SeqSubsequenceFunc-9[+]
X K2-SeqSubsequenceFunc-9: let $f :=function() { subsequence((1, 2, 3), 1) } return $f() |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
pass | pass | pass | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XP30+ XQ30+, satisfied=true) was not met. |
pass |
fn-true-22[+]
X fn-true-22: let $t := true#0 return 3[$t()] |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
pass | pass | pass | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XP30+ XQ30+, satisfied=true) was not met. |
pass |
FunctionCall-014[+]
X FunctionCall-014: let $f := function($a as xs:integer, $b as xs:integer) as xs:integer { data(<a>{$a}{$b}</a>) } return $f(12, 34) |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
n/a
notXP30 |
pass | n/a | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XQ30+, satisfied=true) was not met. |
pass |
FunctionCall-025[+]
X FunctionCall-025: function($in as xs:double*) as xs:double {sum($in, 0.0e0)}((1, xs:float(0.25), xs:decimal(0.5))) |
no result | n/a | no result | n/a
notXP20 |
n/a
notXQ10 |
pass | n/a
notXQ30 |
pass | n/a | n/a | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XP30+, satisfied=true) was not met. |
n/a
Dependency (type=spec, value=XP30+, satisfied=true) was not met. |
FunctionCall-026[+]
X FunctionCall-026: function($in as xs:string*) as xs:string {string-join($in, ';')}((xs:anyURI('http://one.com/'), xs:anyURI('http://two.com/'))) |
no result | n/a | no result | n/a
notXP20 |
n/a
notXQ10 |
pass | n/a
notXQ30 |
pass | n/a | n/a | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XP30+, satisfied=true) was not met. |
n/a
Dependency (type=spec, value=XP30+, satisfied=true) was not met. |
FunctionCall-039[+]
X FunctionCall-039: declare namespace lu = 'http://www.w3.org/XQueryTest/ListUnionTypes' ; import schema "http://www.w3.org/XQueryTest/ListUnionTypes"; function() as lu:restrictedUnionType {23}() |
no result | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
n/a
notXP30 |
pass | n/a | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XQ30+, satisfied=true) was not met. |
fail |
FunctionCall-040[+]
X FunctionCall-040: declare namespace lu = 'http://www.w3.org/XQueryTest/ListUnionTypes' ; import schema "http://www.w3.org/XQueryTest/ListUnionTypes"; let $f := function() as lu:namespaceSensitiveUnionType {node-name(<a/>)} return local-name-from-QName($f()) |
no result | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
n/a
notXP30 |
pass | n/a | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XQ30+, satisfied=true) was not met. |
pass |
FunctionCall-041[+]
X FunctionCall-041: declare namespace lu = 'http://www.w3.org/XQueryTest/ListUnionTypes' ; import schema "http://www.w3.org/XQueryTest/ListUnionTypes"; let $f := function() as lu:namespaceSensitiveUnionType {xs:untypedAtomic('xsi:type')} return local-name-from-QName($f()) |
no result | wrongError
expected: XPTY0117 actualCode: XPTY0004 |
pass | n/a
notXP20 |
n/a
notXQ10 |
n/a
notXP30 |
pass | n/a | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XQ30+, satisfied=true) was not met. |
wrongError
Expected error: XPTY0117. Found error: XPTY0004 |
FunctionCall-042[+]
X FunctionCall-042: declare namespace lu = 'http://www.w3.org/XQueryTest/ListUnionTypes' ; import schema "http://www.w3.org/XQueryTest/ListUnionTypes"; declare function local:hof($f as function(xs:integer) as xs:integer) as xs:integer {$f(3) + 1}; let $f := function($a as lu:unionType) as xs:integer {$a + 2} return local:hof($f) |
no result | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
n/a
notXP30 |
pass | n/a | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XQ30+, satisfied=true) was not met. |
pass |
XQST0125_1[+]
X XQST0125_1: let $f := %public function($arg as xs:integer) as xs:integer { $arg + 1 } return $f(1) |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
n/a
notXP30 |
pass | n/a | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XQ30+, satisfied=true) was not met. |
wrongError
Expected error: XQST0125. Found error: XPST0003 |
XQST0125_2[+]
X XQST0125_2: let $f := %private function($arg as xs:integer) as xs:integer { $arg + 1 } return $f(1) |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
n/a
notXP30 |
pass | n/a | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XQ30+, satisfied=true) was not met. |
wrongError
Expected error: XQST0125. Found error: XPST0003 |
hof-026[+]
X hof-026: let $f := function($x as xs:string) as xs:string { upper-case($x) } let $n := function-name($f) return <a loc="{local-name-from-QName($n)}" uri="{namespace-uri-from-QName($n)}" arity="{function-arity($f)}" eloc="{empty(local-name-from-QName($n))}" euri="{empty(namespace-uri-from-QName($n))}"/> |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
n/a
notXP30 |
pass | n/a | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XQ30+, satisfied=true) was not met. |
pass |
hof-030[+]
X hof-030: declare variable $sep as xs:string := "\s"; declare function local:splitter() as (function(xs:string) as xs:string*)? { function($x as xs:string) { for $i in tokenize($x, $sep) return upper-case($i)} }; string-join(local:splitter()("A nice cup of tea"), '|') |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
n/a
notXP30 |
pass | n/a | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XQ30+, satisfied=true) was not met. |
pass |
hof-031[+]
X hof-031: declare function local:splitter($sep as xs:string) as (function(xs:string) as xs:string*) { function($x as xs:string) { for $i in tokenize($x, $sep) return upper-case($i)} }; string-join(local:splitter("\s")("A nice cup of tea"), '|') |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
n/a
notXP30 |
pass | n/a | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XQ30+, satisfied=true) was not met. |
pass |
hof-046[+]
X hof-046: declare function local:splitter($x as xs:string) as (function() as xs:string*)* { for $sep in ('\s', ',', '!') return function() { for $i in tokenize($x, $sep) return upper-case($i) } }; <out>{ for $f as function(*) in local:splitter("How nice! Thank you, I enjoyed that.") return <tokens>{ for $t in $f() return <t>{$t}</t> }</tokens> }</out> |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
n/a
notXP30 |
pass | n/a | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XQ30+, satisfied=true) was not met. |
pass |
hof-047[+]
X hof-047: declare function local:splitter($x as xs:string) as (function() as xs:string*)* { for $sep in ('\s', ',', '!') return function() { for $i in tokenize($x, $sep) return let $f := function(){ concat($sep, ':', upper-case($i)) } return $f() } }; <out>{ for $f as function(*) in local:splitter("How nice! Thank you, I enjoyed that.") return <tokens>{ for $t in $f() return <t>{$t}</t> }</tokens> }</out> |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
n/a
notXP30 |
pass | n/a | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XQ30+, satisfied=true) was not met. |
pass |
hof-051[+]
X hof-051: let $f := function($a as xs:string, $b as xs:string) { starts-with($a, $b) and ends-with($a, $b)}(?, 'a') return <out>{$f('abracadabra')}</out> |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
n/a
notXP30 |
pass | n/a | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XQ30+, satisfied=true) was not met. |
pass |
hof-912[+]
X hof-912: declare function local:apply($fns as (function(xs:string) as xs:string)*, $s as xs:string) as xs:string* { for $f in $fns return $f($s) }; let $ops := (upper-case#1, lower-case#1, function($x){translate($x, 'e', 'i')}, substring-before(?, ' ', ?)) return string-join(local:apply($ops, 'Michael Kay'), '~') |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
n/a
notXP30 |
pass | n/a | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XQ30+, satisfied=true) was not met. |
pass |
hof-913[+]
X hof-913: declare function local:apply($fns as (function(xs:string) as xs:string)*, $s as xs:string) as xs:string* { for $f in $fns return $f($s) }; let $ops := (upper-case#1, lower-case#1, function($x){translate($x, 'e', 'i')}, string-length#1) return string-join(local:apply($ops, 'Michael Kay'), '~') |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
n/a
notXP30 |
pass | n/a | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XQ30+, satisfied=true) was not met. |
pass |
hof-914[+]
X hof-914: declare function local:apply($fns as (function(xs:string) as xs:string)*, $s as xs:string) as xs:string* { for $f in $fns return $f($s) }; let $ops := (upper-case#1, lower-case#1, function($x as xs:double){string($x)}) return string-join(local:apply($ops, 'Michael Kay'), '~') |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
n/a
notXP30 |
pass | n/a | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XQ30+, satisfied=true) was not met. |
pass |
function-item-7[+]
X function-item-7: (let $a := 92, $b := true() return function($c) { $a, $b, $c })("lala") |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
pass | pass | pass | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XP30+ XQ30+, satisfied=true) was not met. |
pass |
function-item-9[+]
X function-item-9: function-name(let $a := 92, $b := true() return function($c) { $a, $b, $c }) |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
pass | pass | pass | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XP30+ XQ30+, satisfied=true) was not met. |
pass |
function-item-10[+]
X function-item-10: (let $a := 92, $b := true() return function($c) { $a, $b, $c }) instance of function(item()*) as item()* |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
pass | pass | pass | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XP30+ XQ30+, satisfied=true) was not met. |
pass |
function-item-11[+]
X function-item-11: (let $a := 92, $b := true() return function($c) { $a, $b, $c })((xs:QName("foo"), 5.0e3)) |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
pass | pass | pass | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XP30+ XQ30+, satisfied=true) was not met. |
pass |
function-item-12[+]
X function-item-12: function($a as item()) as item() { $a } instance of function(*) |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
pass | pass | pass | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XP30+ XQ30+, satisfied=true) was not met. |
pass |
function-item-13[+]
X function-item-13: function($a as item()) as xs:integer { $a } instance of function(item()) as item() |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
pass | pass | pass | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XP30+ XQ30+, satisfied=true) was not met. |
pass |
function-item-14[+]
X function-item-14: function($a as item()) as item() { $a } instance of function(xs:string) as item() |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
pass | pass | pass | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XP30+ XQ30+, satisfied=true) was not met. |
pass |
function-item-15[+]
X function-item-15: function($a as item()) as item() { $a } instance of function() as item() |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
pass | pass | pass | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XP30+ XQ30+, satisfied=true) was not met. |
pass |
function-item-16[+]
X function-item-16: function($a as item()) as xs:integer { $a } instance of function(item(), item()) as item() |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
pass | pass | pass | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XP30+ XQ30+, satisfied=true) was not met. |
pass |
function-item-17[+]
X function-item-17: function($a as xs:string) as item() { $a } instance of function(item()) as item() |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
pass | pass | pass | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XP30+ XQ30+, satisfied=true) was not met. |
pass |
inline-function-1[+]
X inline-function-1: function() { 5 } instance of function(*) |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
pass | pass | pass | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XP30+ XQ30+, satisfied=true) was not met. |
pass |
inline-function-2[+]
X inline-function-2: function-name(function() { 5 }) |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
pass | pass | pass | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XP30+ XQ30+, satisfied=true) was not met. |
pass |
inline-function-3[+]
X inline-function-3: function() as xs:integer { 5 }() |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
pass | pass | pass | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XP30+ XQ30+, satisfied=true) was not met. |
pass |
inline-function-4[+]
X inline-function-4: function($a as xs:integer) as xs:integer { $a + 5 }(3) |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
pass | pass | pass | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XP30+ XQ30+, satisfied=true) was not met. |
pass |
inline-function-5[+]
X inline-function-5: function($a as xs:integer, $b as xs:double) as xs:double { $a * $b + 5 }(3, 2) |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
pass | pass | pass | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XP30+ XQ30+, satisfied=true) was not met. |
pass |
inline-function-6[+]
X inline-function-6: function($a, $b as xs:double) as xs:double { $a * $b + 5 } instance of function(item()*, xs:double) as xs:double |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
pass | pass | pass | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XP30+ XQ30+, satisfied=true) was not met. |
pass |
inline-function-7[+]
X inline-function-7: function($a as node()+, $b) as xs:double { $a * $b + 5 } instance of function(node(), item()*) as xs:double |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
pass | pass | pass | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XP30+ XQ30+, satisfied=true) was not met. |
pass |
inline-function-8[+]
X inline-function-8: function($a as node()+) { $a + 5 } instance of function(node()) as item()* |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
pass | pass | pass | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XP30+ XQ30+, satisfied=true) was not met. |
pass |
inline-function-9[+]
X inline-function-9: function() { true() } instance of function() as item()* |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
pass | pass | pass | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XP30+ XQ30+, satisfied=true) was not met. |
pass |
inline-function-10[+]
X inline-function-10: function($a) { "lala", $a }, $a |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
pass | pass | pass | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XP30+ XQ30+, satisfied=true) was not met. |
pass |
inline-function-11[+]
X inline-function-11: let $a := "monkey" return function($a) { "lala", $a }("gibbon") |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
pass | pass | pass | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XP30+ XQ30+, satisfied=true) was not met. |
pass |
inline-function-12[+]
X inline-function-12: $a, function($a) { "lala", $a } |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
pass | pass | pass | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XP30+ XQ30+, satisfied=true) was not met. |
pass |
inline-function-11a[+]
X inline-function-11a: function($a) { let $a := "monkey" return ("lala", $a) }("gibbon") |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
pass | pass | pass | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XP30+ XQ30+, satisfied=true) was not met. |
pass |
inline-function-12a[+]
X inline-function-12a: function($a, $a) { "lala", $a }("gibbon", "monkey") |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
pass | pass | pass | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XP30+ XQ30+, satisfied=true) was not met. |
pass |
inline-function-13[+]
X inline-function-13: function($local:foo, $local:bar, $local:foo) { "lala", $local:foo, $local:bar }("gibbon", "monkey", "ape") |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
n/a
notXP30 |
pass | n/a | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XQ30+, satisfied=true) was not met. |
pass |
inline-function-14[+]
X inline-function-14: function($local:foo, $local:bar, $fn:foo) { "lala", $local:foo, $local:bar }("gibbon", "monkey", "ape") |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
n/a
notXP30 |
pass | n/a | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XQ30+, satisfied=true) was not met. |
pass |
inline-function-15[+]
X inline-function-15: function($Q{http://local/}foo, $Q{http://local/}bar, $Q{http://local/}foo) { "lala", $Q{http://local/}foo, $Q{http://local/}bar }("gibbon", "monkey", "ape") |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
pass | pass | pass | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XP30+ XQ30+, satisfied=true) was not met. |
pass |
inline-function-16[+]
X inline-function-16: function($Q{http://local/}foo, $Q{http://local/}bar, $fn:foo) { "lala", $Q{http://local/}foo, $Q{http://local/}bar }("gibbon", "monkey", "ape") |
pass | pass | pass | n/a
notXP20 |
n/a
notXQ10 |
pass | pass | pass | pass | pass | n/a | n/a | n/a | n/a
Dependency (type=spec, value=XP30+ XQ30+, satisfied=true) was not met. |
pass |