|
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) |
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fn-fold-left* | 20/20 | 20/20 | 0/0 | 0/0 | 17/17 | 20/20 | 20/20 | 17/17 | 20/20 | 20/20 | 0/0 | 0/0 | 0/0 | 0/0 | 19/20 | 2/15 |
fold-left-001[+]
X fold-left-001: fold-left(1 to 5, 0, function($a, $b) { $a + $b }) |
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 | |
fold-left-002[+]
X fold-left-002: fold-left((2,3,5,7), 1, function($a, $b) { $a * $b }) |
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 | |
fold-left-003[+]
X fold-left-003: fold-left((true(), false(), false()), false(), function($a, $b) { $a or $b }) |
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 | |
fold-left-004[+]
X fold-left-004: fold-left((true(), false(), false()), false(), function($a, $b) { $a and $b }) |
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 | |
fold-left-005[+]
X fold-left-005: fold-left(1 to 5, (), function($a, $b) {($b, $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 | |
fold-left-006[+]
X fold-left-006: fold-left(1 to 5, "", fn:concat(?, ".", ?)) |
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 | |
fold-left-007[+]
X fold-left-007: fold-left(1 to 5, "$zero", fn:concat("$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 | |
fold-left-008[+]
X fold-left-008: let $hours := function ($emp as element(employee)) as xs:integer { sum($emp/hours/xs:integer(.)) }, $highest := function ($f as function(item()) as xs:anyAtomicType, $seq as item()*) { fold-left($seq, (), function($highestSoFar as item()*, $this as item()*) as item()* { if (empty($highestSoFar)) then $this else let $thisValue := $f($this), $highestValue := $f($highestSoFar[1]) return if ($thisValue gt $highestValue) then $this else if ($thisValue eq $highestValue) then ($highestSoFar, $this) else $highestSoFar }) } return $highest($hours, /works/employee) |
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 | |
fold-left-009[+]
X fold-left-009: declare function local:distinct-nodes-stable($seq as node()*) { fold-left( $seq, (), function($foundSoFar as node()*, $this as node()) as node()* { if ($foundSoFar intersect $this) then $foundSoFar else ($foundSoFar, $this) }) }; let $nodes := (<a/>, <b/>, <c/>, <d/>, <e/>, <f/>) let $perm := ($nodes[1], $nodes[2], $nodes[4], $nodes[1], $nodes[2], $nodes[3], $nodes[2], $nodes[1]) return local:distinct-nodes-stable($perm)/local-name() |
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=XP30+ XQ30+, satisfied=true) was not met. Dependency (type=spec, value=XQ30+, satisfied=true) was not met. |
fail | |
fold-left-010[+]
X fold-left-010: fold-left(1 to 5, 1, function($a, $b, $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 | |
fold-left-011[+]
X fold-left-011: fold-left(1 to 5, 1, function($a, $b) as element(foo) { $a + $b }) |
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 | |
fold-left-012[+]
X fold-left-012: fold-left(1 to 5, "", function($a, $b) { $a + $b }) |
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 | |
fold-left-013[+]
X fold-left-013: fold-left(1 to 5, 1, function($a, $b as element(foo)) { $a + $b }) |
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 | |
fold-left-014[+]
X fold-left-014: fold-left(1 to 5, 1, function($a as element(bar), $b) { $a + $b }) |
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 | |
fold-left-015[+]
X fold-left-015: fold-left(1 to 2, 1, function($a, $b){ ($a, $b) }) |
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 | |
fold-left-016[+]
X fold-left-016: let $html := <html> <body> <div id="main"> <p class="para">Hello World!</p> </div> <p class="para">Goodbye!</p> </body> </html> let $css-selectors := <selectors> <id>main</id> <class>para</class> </selectors>/* let $interpreter := function($ctx, $selector){ typeswitch($selector) case $a as element(id) return $ctx//*[@id = $a/text()] case $a as element(class) return $ctx//*[@class = $a/text()] default return () } let $result := fold-left($css-selectors, $html, $interpreter) return $result/text() |
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=XP30+ XQ30+, satisfied=true) was not met. Dependency (type=spec, value=XQ30+, satisfied=true) was not met. |
pass | |
fold-left-017[+]
X fold-left-017: fold-left(1 to 13, 0, concat("(", ?, "+", ?, ")")) |
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 | |
fold-left-018[+]
X fold-left-018: let $text := "Peter Piper picked a peck of pickled peppers A peck of pickled peppers Peter Piper picked" let $tokens := tokenize($text, '\s') let $counter := function($result, $word){ let $word-count := $result[@value = $word] return if(empty($word-count)) then ($result, <word value="{$word}" count="1" />) else ( $result except $word-count, <word value="{$word-count/@value}" count="{number($word-count/@count) + 1}" /> ) } let $words := fold-left($tokens, (), $counter) return ( number($words[@value="Peter"]/@count), number($words[@value="Piper"]/@count), number($words[@value="pickled"]/@count) ) |
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=XP30+ XQ30+, satisfied=true) was not met. Dependency (type=spec, value=XQ30+, satisfied=true) was not met. |
pass | |
fold-left-019[+]
X fold-left-019: fold-left((13, 14, 9, 6), (), function($a, $b){ if(empty($a)) then $b else ($a + $b) div 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 | |
fold-left-020[+]
X fold-left-020: fold-left(1 to 1000000, 0, function($a, $b){ $a + 1}) |
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 |