|
Implementations | |||||||
Tests | BaseX 8.5 beta XQ31 (QT3 vCVS) |
Saxon-EE 9.7.0.11 XP31 (QT3 v0.6) |
Saxon-EE 9.7.0.11 XQ31 (QT3 v0.6) |
XmlPrime 4.0.0.16079 XP31 (QT3 vCVS) |
XmlPrime 4.0.0.26293 XQ31 (QT3 vCVS) |
XmlPrime 4.0.0.27704 XQX31 (QT3 vCVS) |
|
---|---|---|---|---|---|---|---|
misc-HigherOrderFunctions | 125/129 | 48/48 | 127/127 | 48/48 | 129/129 | 129/0 | 0/6 |
hof-001[+]
X hof-001: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:f($x as xs:integer) as xs:integer { $x + 1 }; let $f := local:f#1 return $f(2) |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-002[+]
X hof-002: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:f() as xs:integer { 42 }; declare function local:f($x as xs:integer) as xs:integer { $x + 1 }; let $f := local:f#0 return $f() |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-003[+]
X hof-003: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: import module namespace m="http://example.com/hof-003"; let $f := m:f#1 return $f(17) |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-004[+]
X hof-004: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: let $f := fn:round#1 return $f(1.2345) |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-005[+]
X hof-005: Created on: 2009-03-01 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: let $f := concat#8 return $f('a','b','c','d','e','f','g','h') |
pass | pass | pass | pass | pass | pass | |
hof-006[+]
X hof-006: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare default function namespace "http://example.com/hof-006"; declare function g($x as xs:integer) as xs:integer { $x + 1 }; let $f := g#1 return $f(21) |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-007[+]
X hof-007: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare default function namespace "http://www.w3.org/2001/XMLSchema"; let $f := date#1 return $f('2008-01-31') |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-008[+]
X hof-008: Created on: 2009-03-01 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: let $f := xs:date#1 return $f('2008-01-31') |
pass | pass | pass | pass | pass | pass | |
hof-009[+]
X hof-009: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = schemaImport feature = higherOrderFunctions Test: import schema namespace a = "http://www.w3.org/XQueryTest/userDefinedTypes"; let $f := a:hatsize#1 return ($f(8) instance of a:hatsize) |
no result | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-010[+]
X hof-010: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:f($x as xs:integer) as xs:integer { $x + 1 }; let $f as function(*) := local:f#1 return $f(2) |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-011[+]
X hof-011: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:f($x as xs:integer) as xs:integer { $x + 3 }; let $f as function(xs:integer) as xs:integer := local:f#1 return $f(2) |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-012[+]
X hof-012: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:f($x as xs:integer, $y as xs:long) as xs:integer { $x + $y }; let $f as function(xs:integer, xs:long) as xs:integer := local:f#2 return $f(2, xs:long(5)) |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-013[+]
X hof-013: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:f($x as xs:integer) as xs:integer { $x + 3 }; declare function local:g($x as xs:integer) as xs:integer { $x + 4 }; declare function local:h($x as xs:integer) as xs:integer { $x + 5 }; let $f as (function(xs:integer) as xs:integer)* := (local:f#1, local:g#1, local:h#1) return $f[3](2)[1] |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-014[+]
X hof-014: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:case($x as xs:boolean) as function(*) { if ($x) then fn:upper-case#1 else fn:lower-case#1 }; local:case(true())("Mike"), local:case(false())("Mike") |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-015[+]
X hof-015: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:case($x as xs:boolean) as function(xs:string?) as xs:string { if ($x) then fn:upper-case#1 else fn:lower-case#1 }; local:case(true())("Mike"), local:case(false())("Mike") |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-016[+]
X hof-016: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:case($x as function(*), $y as xs:string) as xs:string { $x($y) }; local:case(upper-case#1, "Mike"), local:case(lower-case#1, "Mike") |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-017[+]
X hof-017: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:case($x as function(xs:string?) as xs:string, $y as xs:string) as xs:string { $x($y) }; local:case(upper-case#1, "Mike"), local:case(lower-case#1, "Mike") |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-018[+]
X hof-018: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:scramble($x as function(xs:string) as xs:string, $y as xs:string) as xs:string { $x($y) }; declare function local:rot13($x as xs:string) as xs:string { translate($x, "abcdefghijklmnopqrstuvwxyz", "nopqrstuvwxyzabcdefghijklm") }; local:scramble(local:rot13#1, "mike") |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-019[+]
X hof-019: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:scramble($x as function(*), $y as xs:string) as xs:string { $x($y) }; declare function local:rot13($x as xs:string) as xs:string { translate($x, "abcdefghijklmnopqrstuvwxyz", "nopqrstuvwxyzabcdefghijklm") }; local:scramble(local:rot13#1, "mike") |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-020[+]
X hof-020: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:scramble($x as function(*), $y as xs:string) as xs:string { $x($y) }; local:scramble(function($x){translate($x, "abcdefghijklmnopqrstuvwxyz", "nopqrstuvwxyzabcdefghijklm")}, "john") |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-021[+]
X hof-021: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:scramble($x as function(xs:string) as xs:string, $y as xs:string) as xs:string { $x($y) }; local:scramble(function($x){translate($x, "abcdefghijklmnopqrstuvwxyz", "nopqrstuvwxyzabcdefghijklm")}, "john") |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-022[+]
X hof-022: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:scramble($x as function(xs:string) as xs:string, $y as xs:string) as xs:string { $x($y) }; let $n := function-name(local:scramble#2) return (local-name-from-QName($n), namespace-uri-from-QName($n), function-arity(local:scramble#2)) |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-023[+]
X hof-023: Created on: 2009-03-01 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: let $f := fn:function-name#1, $n := function-name($f) return (local-name-from-QName($n), namespace-uri-from-QName($n), function-arity($f)) |
pass | pass | pass | pass | pass | pass | |
hof-024[+]
X hof-024: Created on: 2009-03-01 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: let $f := xs:dateTime#1, $n := function-name($f) return (local-name-from-QName($n), namespace-uri-from-QName($n), function-arity($f)) |
pass | pass | pass | pass | pass | pass | |
hof-025[+]
X hof-025: Created on: 2009-03-01 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: let $f := concat#123456, $n := function-name($f) return (local-name-from-QName($n), namespace-uri-from-QName($n), function-arity($f)) |
pass | pass | pass | pass | pass | pass | |
hof-026[+]
X hof-026: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: 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 | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-027[+]
X hof-027: Created on: 2009-03-01 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: let $f := fn:contains(?, "e") return for $s in ("Mike", "John", "Dave", "Mary", "Jane") return $f($s) |
pass | pass | pass | pass | pass | pass | |
hof-028[+]
X hof-028: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:splitter() as (function(xs:string) as xs:string*) { function($x as xs:string) { tokenize($x, '\s') } }; string-join(local:splitter()("A nice cup of tea"), '|') |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-029[+]
X hof-029: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:splitter() as (function(xs:string) as xs:string+)? { function($x as xs:string) { for $i in tokenize($x, '\s') return upper-case($i)} }; string-join(local:splitter()("A nice cup of tea"), '|') |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-030[+]
X hof-030: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: 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 | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-031[+]
X hof-031: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: 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 | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-032[+]
X hof-032: Created on: 2009-03-01 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: (if (current-date() gt xs:date('2000-12-31')) then upper-case#1 else lower-case#1)("Mike") |
pass | pass | pass | pass | pass | pass | |
hof-033[+]
X hof-033: Created on: 2009-03-01 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: local-name-from-QName(function-name((upper-case#1, lower-case#1)[.("Mike") = "MIKE"])) |
pass | pass | pass | pass | pass | pass | |
hof-034[+]
X hof-034: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: local-name-from-QName(function-name((upper-case#1, lower-case#1)[ordered{.}("Mike") = "MIKE"])) |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-035[+]
X hof-035: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: local-name-from-QName(function-name((upper-case#1, lower-case#1)[ordered{.}("Mike") = "MIKE"])) |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-036[+]
X hof-036: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: (<a b="3"/>/(string(@b), upper-case#1, 17))[. instance of xs:anyAtomicType] |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-037[+]
X hof-037: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:f($x as xs:long, $y as xs:NCName) as element(e) { <e x="{$x}" y="{$y}"/> }; local:f#2 instance of function(*), local:f#2 instance of function(xs:long, xs:NCName) as element(e), local:f#2 instance of function(xs:anyAtomicType?, xs:anyAtomicType?) as element(e), local:f#2 instance of function(item()*, item()*) as element(e) |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-038[+]
X hof-038: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:f($x as xs:long?, $y as xs:NCName?) as element(e) { <e x="{$x}" y="{$y}"/> }; local:f#2 instance of function(xs:int?, xs:NCName?) as element(e), local:f#2 instance of function(xs:long?) as element(e), local:f#2 instance of function(xs:long?, xs:NCName?, item()*) as element(e), local:f#2 instance of function(xs:long, xs:anyAtomicType?) as element(e), local:f#2 instance of function(item()+, item()+) as element(e) |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-039[+]
X hof-039: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = typedData feature = higherOrderFunctions Test: declare function local:f($x as xs:long, $y as xs:NCName) as element(e)? { <e x="{$x}" y="{$y}"/> }; local:f#2 instance of function(xs:long, xs:NCName) as element()?, local:f#2 instance of function(xs:long, xs:NCName) as element()*, local:f#2 instance of function(xs:long, xs:NCName) as element(e)*, local:f#2 instance of function(xs:long, xs:NCName) as element(e, xs:anyType?)*, local:f#2 instance of function(xs:long, xs:NCName) as element(*, xs:anyType?)?, local:f#2 instance of function(xs:long, xs:NCName) as element(*, xs:untyped)? |
no result | n/a
notXP31 |
n/a
Dependency not satisfied |
n/a | pass | pass | |
hof-040[+]
X hof-040: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: 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 | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-041[+]
X hof-041: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:ops() as (function(xs:string) as xs:string)* { (upper-case#1, lower-case#1, function($x){translate($x, 'e', 'i')}, substring-before(?, ' ')) }; string-join(for $f in local:ops() return $f('Michael Kay'), '~') |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-042[+]
X hof-042: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:lower-case($x as xs:string) as xs:string { concat("'", fn:lower-case($x), "'") }; declare function local:ops() as (function(xs:string) as xs:string)* { (upper-case#1, local:lower-case#1, function($x){translate($x, 'e', 'i')}, substring-before(?, ' ')) }; string-join(for $f in local:ops() return $f(<a name="Michael Kay"/>/@name), '~') |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-043[+]
X hof-043: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:round($x as xs:double) as xs:double { fn:floor($x) }; declare function local:ops() as (function(xs:double) as xs:double)* { (abs#1, local:round#1, function($x){$x+1}, round-half-to-even(?, 2)) }; string-join(for $f in local:ops() return string($f(xs:untypedAtomic('123.456'))), '~') |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-044[+]
X hof-044: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:round($x as xs:double) as xs:double { fn:floor($x) }; declare function local:ops() as (function(xs:double) as xs:double)* { (abs#1, local:round#1, function($x as xs:double){$x+1}, round-half-to-even(?, 2)) }; string-join(for $f in local:ops() return string(round-half-to-even($f(xs:decimal('123.456')), 4)), '~') |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-045[+]
X hof-045: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:round($x as xs:double, $algorithm as (function(xs:double) as xs:double)) as xs:double { $algorithm($x) }; declare variable $roundToCeiling := local:round(?, ceiling#1); $roundToCeiling(12.4) |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-046[+]
X hof-046: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: 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 | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-047[+]
X hof-047: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: 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 | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-048[+]
X hof-048: Created on: 2010-08-14 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:do() as xs:integer { (local:f#1)(5) }; declare function local:f($x as xs:integer) as xs:integer { $x + 1 }; local:do() |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-049[+]
X hof-049: Created on: 2011-01-12 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:tf($i as xs:integer) as function () as xs:boolean { if ($i) then true#0 else false#0 }; <out>{(local:tf(0)(), local:tf(1)())}</out> |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-050[+]
X hof-050: Created on: 2011-06-20 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: let $f := fn:substring-before#2(?, '-') return <out>{$f('the-end-of-the-world')}</out> |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-051[+]
X hof-051: Created on: 2011-06-20 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: 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 | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-052[+]
X hof-052: Created on: 2011-06-20 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: let $f := fn:concat#3(?, '*', ?) let $g := $f('[', ?) return <out>{$g(']')}</out> |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-053[+]
X hof-053: Created on: 2013-02-26 Spec Dependencies: spec = XQ30+ feature = typedData feature = higherOrderFunctions Test: declare function local:f($x as xs:long, $y as xs:NCName) as element(e, xs:anyAtomicType) { <e x="{$x}" y="{$y}"/> }; local:f#2 instance of function(xs:long, xs:NCName) as element(), local:f#2 instance of function(xs:long, xs:NCName) as element()+, local:f#2 instance of function(xs:long, xs:NCName) as element()?, local:f#2 instance of function(xs:long, xs:NCName) as element()*, local:f#2 instance of function(xs:long, xs:NCName) as element(e)*, local:f#2 instance of function(xs:long, xs:NCName) as element(e, xs:anyType?)*, local:f#2 instance of function(xs:long, xs:NCName) as element(*, xs:anyType?)?, local:f#2 instance of function(xs:long, xs:NCName) as element(e, xs:anyType)*, local:f#2 instance of function(xs:long, xs:NCName) as element(*, xs:anyType)?, local:f#2 instance of function(xs:long, xs:NCName) as element(*, xs:untyped)? |
no result | n/a
notXP31 |
n/a
Dependency not satisfied |
n/a | pass | pass | |
hof-901[+]
X hof-901: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:f($x as xs:integer) as xs:integer { $x + 1 }; let $f := local:g#1 return $f(2) |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-902[+]
X hof-902: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:f($x as xs:integer) as xs:integer { $x + 1 }; let $f := local:f#3 return $f(2) |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-903[+]
X hof-903: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:f($x as xs:integer) as xs:integer { $x + 1 }; let $f := xs:date#2 return $f('2008-03-01') |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-904[+]
X hof-904: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:f($x as xs:integer) as xs:integer { $x + 1 }; let $f := concat#1 return $f('2008-03-01') |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-905[+]
X hof-905: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:f($x as xs:integer) as xs:integer { $x + 1 }; string(local:f#1) |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-906[+]
X hof-906: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:f($x as xs:integer) as xs:integer { $x + 1 }; exists(data(local:f#1)) |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-907[+]
X hof-907: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:f($x as xs:integer) as xs:integer { $x + 1 }; deep-equal((1,2,3,4,local:f#1), (1,2,3,4,local:f#1)) |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-908[+]
X hof-908: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:f($x as xs:integer) as xs:integer { $x + 1 }; local:f#1 eq 3 |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-909[+]
X hof-909: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:f($x as xs:integer) as xs:integer { $x + 1 }; number(local:f#1) |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-910[+]
X hof-910: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:f($x as xs:integer) as xs:integer { $x + 1 }; let $f as function(xs:integer) := local:f#1 return $f(3) |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-911[+]
X hof-911: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: <a b="3"/>/(@b, upper-case#1) |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-912[+]
X hof-912: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: 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 | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-913[+]
X hof-913: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: 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 | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-914[+]
X hof-914: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: 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 | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-915[+]
X hof-915: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: let $ops := substring-before('abc', ' ', (), ?) return $ops('Michael Kay') |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-916[+]
X hof-916: Created on: 2009-03-01 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: let $ops := substring-before(?, ?) return $ops('Michael Kay') |
pass | pass | pass | pass | pass | pass | |
hof-917[+]
X hof-917: Created on: 2009-03-01 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: let $ops := substring-before(?, 2) return $ops('Michael Kay') |
pass | pass | pass | pass | pass | pass | |
hof-918[+]
X hof-918: Created on: 2009-03-01 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:round($x as xs:double, $algorithm as (function(xs:double) as xs:double)) as xs:double { $algorithm($x) }; declare variable $roundToCeiling := local:round(?, upper-case#1); $roundToCeiling(12.4) |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
hof-919[+]
X hof-919: Created on: 2012-01-03 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:round($x as xs:double) as xs:double { fn:floor($x) }; declare function local:ops() as (function(xs:double) as xs:double)* { (abs#1, local:round#1, function($x as xs:float){$x+1}, round-half-to-even(?, 2)) }; string-join(for $f in local:ops() return string(round-half-to-even($f(xs:decimal('123.456')), 4)), '~') |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
function-item-1[+]
X function-item-1: Created on: 2011-07-28 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: concat#64 instance of function(*) |
pass | pass | pass | pass | pass | pass | |
function-item-2[+]
X function-item-2: Created on: 2011-07-28 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: string-join#1(("a", "b", "c", "d", "e", "f", "g", "h", "i", "j")) |
pass | pass | pass | pass | pass | pass | |
function-item-3[+]
X function-item-3: Created on: 2011-07-28 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: string-join#1 is string-join#1 |
pass | pass | pass | pass | pass | pass | |
function-item-4[+]
X function-item-4: Created on: 2011-07-28 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: string-join#1 eq string-join#1 |
pass | pass | pass | pass | pass | pass | |
function-item-5[+]
X function-item-5: Created on: 2011-07-28 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: element a { avg#1 } |
pass | n/a
notXP31 |
wrongError
Expected error:XQTY0105, got err:FOTY0013 |
n/a | pass | pass | |
function-item-6[+]
X function-item-6: Created on: 2011-07-28 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: attribute a { avg#1 } |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
function-item-7[+]
X function-item-7: Created on: 2011-07-28 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: (let $a := 92, $b := true() return function($c) { $a, $b, $c })("lala") |
pass | pass | pass | pass | pass | pass | |
function-item-8[+]
X function-item-8: Created on: 2011-07-28 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: function-name(function-name#1) |
pass | pass | pass | pass | pass | pass | |
function-item-9[+]
X function-item-9: Created on: 2011-07-28 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: function-name(let $a := 92, $b := true() return function($c) { $a, $b, $c }) |
pass | pass | pass | pass | pass | pass | |
function-item-10[+]
X function-item-10: Created on: 2011-07-28 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: (let $a := 92, $b := true() return function($c) { $a, $b, $c }) instance of function(item()*) as item()* |
pass | pass | pass | pass | pass | pass | |
function-item-11[+]
X function-item-11: Created on: 2011-07-28 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: (let $a := 92, $b := true() return function($c) { $a, $b, $c })((xs:QName("foo"), 5.0e3)) |
pass | pass | pass | pass | pass | pass | |
function-item-12[+]
X function-item-12: Created on: 2011-07-28 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: function($a as item()) as item() { $a } instance of function(*) |
pass | pass | pass | pass | pass | pass | |
function-item-13[+]
X function-item-13: Created on: 2011-07-28 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: function($a as item()) as xs:integer { $a } instance of function(item()) as item() |
pass | pass | pass | pass | pass | pass | |
function-item-14[+]
X function-item-14: Created on: 2011-07-28 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: function($a as item()) as item() { $a } instance of function(xs:string) as item() |
pass | pass | pass | pass | pass | pass | |
function-item-15[+]
X function-item-15: Created on: 2011-07-28 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: function($a as item()) as item() { $a } instance of function() as item() |
pass | pass | pass | pass | pass | pass | |
function-item-16[+]
X function-item-16: Created on: 2011-07-28 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: function($a as item()) as xs:integer { $a } instance of function(item(), item()) as item() |
pass | pass | pass | pass | pass | pass | |
function-item-17[+]
X function-item-17: Created on: 2011-07-28 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: function($a as xs:string) as item() { $a } instance of function(item()) as item() |
pass | pass | pass | pass | pass | pass | |
inline-function-1[+]
X inline-function-1: Created on: 2011-07-28 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: function() { 5 } instance of function(*) |
pass | pass | pass | pass | pass | pass | |
inline-function-2[+]
X inline-function-2: Created on: 2011-07-28 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: function-name(function() { 5 }) |
pass | pass | pass | pass | pass | pass | |
inline-function-3[+]
X inline-function-3: Created on: 2011-07-28 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: function() as xs:integer { 5 }() |
pass | pass | pass | pass | pass | pass | |
inline-function-4[+]
X inline-function-4: Created on: 2011-07-28 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: function($a as xs:integer) as xs:integer { $a + 5 }(3) |
pass | pass | pass | pass | pass | pass | |
inline-function-5[+]
X inline-function-5: Created on: 2011-07-28 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: function($a as xs:integer, $b as xs:double) as xs:double { $a * $b + 5 }(3, 2) |
pass | pass | pass | pass | pass | pass | |
inline-function-6[+]
X inline-function-6: Created on: 2011-07-28 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: function($a, $b as xs:double) as xs:double { $a * $b + 5 } instance of function(item()*, xs:double) as xs:double |
pass | pass | pass | pass | pass | pass | |
inline-function-7[+]
X inline-function-7: Created on: 2011-07-28 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: function($a as node()+, $b) as xs:double { $a * $b + 5 } instance of function(node(), item()*) as xs:double |
pass | pass | pass | pass | pass | pass | |
inline-function-8[+]
X inline-function-8: Created on: 2011-07-28 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: function($a as node()+) { $a + 5 } instance of function(node()) as item()* |
pass | pass | pass | pass | pass | pass | |
inline-function-9[+]
X inline-function-9: Created on: 2011-07-28 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: function() { true() } instance of function() as item()* |
pass | pass | pass | pass | pass | pass | |
inline-function-10[+]
X inline-function-10: Created on: 2011-07-28 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: function($a) { "lala", $a }, $a |
pass | pass | pass | pass | pass | pass | |
inline-function-11[+]
X inline-function-11: Created on: 2011-07-28 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: let $a := "monkey" return function($a) { "lala", $a }("gibbon") |
pass | pass | pass | pass | pass | pass | |
inline-function-12[+]
X inline-function-12: Created on: 2011-07-28 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: $a, function($a) { "lala", $a } |
pass | pass | pass | pass | pass | pass | |
inline-function-11a[+]
X inline-function-11a: Created on: 2011-07-28 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: function($a) { let $a := "monkey" return ("lala", $a) }("gibbon") |
pass | pass | pass | pass | pass | pass | |
inline-function-12a[+]
X inline-function-12a: Created on: 2011-07-28 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: function($a, $a) { "lala", $a }("gibbon", "monkey") |
pass | pass | pass | pass | pass | pass | |
inline-function-13[+]
X inline-function-13: Created on: 2011-07-28 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: function($local:foo, $local:bar, $local:foo) { "lala", $local:foo, $local:bar }("gibbon", "monkey", "ape") |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
inline-function-14[+]
X inline-function-14: Created on: 2011-07-28 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: function($local:foo, $local:bar, $fn:foo) { "lala", $local:foo, $local:bar }("gibbon", "monkey", "ape") |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
inline-function-15[+]
X inline-function-15: Created on: 2013-04-05 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: 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 | pass | pass | pass | |
inline-function-16[+]
X inline-function-16: Created on: 2013-04-05 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: 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 | pass | pass | pass | |
xqhof1[+]
X xqhof1: Created on: 2011-07-28 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare namespace map = "http://snelson.org.uk/functions/map"; declare function map:key($pair as function() as item()+) as item() { $pair()[1] }; declare function map:value($pair as function() as item()+) as item()* { subsequence($pair(), 2) }; declare function map:contains($map as (function() as item()+)*, $key as item()) as xs:boolean { map:process($map, $key, function($a) { true() }, false(), function($a) { () }) }; declare function map:get($map as (function() as item()+)*, $key as item()) as item()* { map:process($map, $key, map:value#1, (), function($a) { () }) }; declare function map:process( $map as (function() as item()+)*, $key as item(), $found as function(function() as item()+) as item()*, $notfound as item()*, $unused as function((function() as item()+)*) as item()* ) as item()* { if(empty($map)) then $notfound else let $length := count($map) let $middle := $length idiv 2 + 1 let $pair := $map[$middle] let $pair_key := $pair()[1] return if($pair_key eq $key) then ( $unused(subsequence($map, 1, $middle - 1)), $found($pair), $unused(subsequence($map, $middle + 1)) ) else if($pair_key gt $key) then ( map:process(subsequence($map, 1, $middle - 1), $key, $found, $notfound, $unused), $unused(subsequence($map, $middle)) ) else ( $unused(subsequence($map, 1, $middle)), map:process(subsequence($map, $middle + 1), $key, $found, $notfound, $unused) ) }; declare function map:pair($key as item(), $value as item()*) as function() as item()+ { function() { $key, $value } }; declare function map:put( $map as (function() as item()+)*, $key as item(), $value as item()* ) as (function() as item()+)+ { let $pair := map:pair($key, $value) return map:process($map, $key, function($a) { $pair }, $pair, function($a) { $a }) }; string-join(let $map := map:put(map:put(map:put(map:put(map:put(map:put((), "a", "aardvark"), "z", "zebra"), "e", ("elephant", "eagle")), "o", "osterich"), "t", "terrapin"), "a", "antelope") return ( map:get($map, "o"), for $m in $map return concat("key: ", map:key($m), ", value: (", string-join(map:value($m), ", "), ")")) , " ") |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
xqhof2[+]
X xqhof2: Created on: 2011-07-28 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: import module namespace func = "http://snelson.org.uk/functions/functional"; let $f := func:curry(concat#5) return $f("foo")(" bar")(" baz")(" what's")(" next?") |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
xqhof3[+]
X xqhof3: Created on: 2011-07-28 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: import module namespace func = "http://snelson.org.uk/functions/functional"; declare function local:fib2_aux($result as xs:integer, $next as xs:integer, $n) as xs:integer* { if($n eq 0) then () else ( $result, local:fib2_aux($next, $next + $result, $n - 1)) }; declare function local:fib2($n) as xs:integer* { local:fib2_aux(0, 1, $n) }; declare function local:map-pairs($f,$a,$b) { for-each-pair($a,$b,$f) }; string-join( for $a in subsequence( let $interleave := func:curry(local:map-pairs#3)(function($a, $b) { $a, $b }) let $enumerate := $interleave(0 to 49) return $enumerate(local:fib2(50)) , 1, 100) return string($a) , " ") |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
xqhof4[+]
X xqhof4: Created on: 2011-07-28 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:hof($s, $f as function(*)) { $f($s[1], $s[2]) }; local:hof(('1', '2'), concat#2) |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
xqhof5[+]
X xqhof5: Created on: 2011-07-28 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: let $a := string-join(?, "") return $a(("foo", "bar", "baz")) |
pass | pass | pass | pass | pass | pass | |
xqhof6[+]
X xqhof6: Created on: 2011-07-28 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare function local:curry($f as function(item()*, item()*) as item()*) as function(item()*) as function(item()*) as item()* { function($a) { $f($a, ?) } }; local:curry(substring-after#2)("foobar")("foo") |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
xqhof7[+]
X xqhof7: Created on: 2011-07-28 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: concat#3("one", "two") |
pass | pass | pass | pass | pass | pass | |
xqhof8[+]
X xqhof8: Created on: 2011-07-28 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: concat#4("one", ?, "three") |
pass | pass | pass | pass | pass | pass | |
xqhof9[+]
X xqhof9: Created on: 2011-07-28 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: concat#2("one", ?, "three") |
pass | pass | pass | pass | pass | pass | |
xqhof10[+]
X xqhof10: Created on: 2011-07-28 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: for $f in (concat("one ", ?, " three"), substring-before("one two three", ?), matches(?, "t.*o"), xs:NCName(?)) return $f("two") |
pass | pass | pass | pass | pass | pass | |
xqhof11[+]
X xqhof11: Created on: 2011-07-28 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: ()("two") |
pass | pass | pass | pass | pass | pass | |
xqhof12[+]
X xqhof12: Created on: 2011-07-28 Spec Dependencies: spec = XP30+ XQ30+ feature = higherOrderFunctions Test: (concat("one ", ?, " three"), substring-before("one two three", ?), matches(?, "t.*o"), xs:NCName(?))("two") |
pass | pass | pass | pass | pass | pass | |
xqhof13[+]
X xqhof13: Created on: 2011-07-28 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: let $f := function($a) { node-name(.), $a } return <a/>/$f(5) |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
xqhof14[+]
X xqhof14: Created on: 2011-07-28 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: let $f := name#0 return <a/>/$f() |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
xqhof15[+]
X xqhof15: Created on: 2012-05-23 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: let $f := <b/>/name#0 return <a/>/$f() |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
xqhof16[+]
X xqhof16: Created on: 2012-05-23 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare base-uri "main"; import module namespace lib = "lib"; lib:getfun()(), fn:static-base-uri#0(), fn:static-base-uri() |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
xqhof17[+]
X xqhof17: Created on: 2012-05-23 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: import module namespace lib = "lib"; <main/>/lib:getfun2()(), <main/>/name#0(), <main/>/name() |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
xqhof18[+]
X xqhof18: Created on: 2012-05-23 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: declare base-uri "main"; import module namespace lib = "lib"; lib:getfun3()(xs:QName("fn:static-base-uri"),0)(), function-lookup#2(xs:QName("fn:static-base-uri"),0)(), function-lookup(xs:QName("fn:static-base-uri"),0)() |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
xqhof19[+]
X xqhof19: Created on: 2012-05-23 Spec Dependencies: spec = XQ30+ feature = higherOrderFunctions Test: import module namespace lib = "lib"; <main/>/lib:getfun3()(xs:QName("fn:name"),0)(), <main/>/function-lookup#2(xs:QName("fn:name"),0)(), <main/>/function-lookup(xs:QName("fn:name"),0)() |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
xqhof20[+]
X xqhof20: Created on: 2015-07-16 Spec Dependencies: spec = XQ31+ feature = higherOrderFunctions Test: let $m := map { "Tuesday" : true(), "Wednesday" : true(), "Thursday" : false(), "Friday" : true(), "Monday" : true(), "Sunday" : false(), "Saturday" : false() } let $days := ("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday") return fn:filter($days,$m) |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
xqhof21[+]
X xqhof21: Created on: 2015-07-16 Spec Dependencies: spec = XQ31+ feature = higherOrderFunctions Test: let $m := map { "Tuesday" : true(), "Wednesday" : true(), "Friday" : true(), "Monday" : true(), "Sunday" : false(), "Saturday" : false() } let $days := ("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday") return fn:filter($days,$m) |
pass | n/a
notXP31 |
pass | n/a | pass | pass | |
xqhof22[+]
X xqhof22: Created on: 2016-08-09 Spec Dependencies: spec = XQ31+ feature = higherOrderFunctions Test: let $m := array { true(), true(), false(), true(), true(), false(), false() } let $indices := (1 to 7) return fn:filter($indices,$m) |
no result | n/a
notXP31 |
pass | n/a | pass | pass |