|
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) |
|
---|---|---|---|---|---|---|---|
app-UseCaseR31 | 22/25 | 0/0 | 25/25 | 0/0 | 25/25 | 25/0 | 0/6 |
UseCaseR31-001[+]
X UseCaseR31-001: Created on: 2014-04-24 Spec Dependencies: spec = XQ30+ Test: for $e in /employees/employee, $d in $e/department group by $d return <department name="{$d}"> { let $max := max($e/salary) return $e[salary=$max] } </department> |
pass | n/a
test-set dependencies not satisfied |
pass | n/a | pass | pass | |
UseCaseR31-002[+]
X UseCaseR31-002: Created on: 2014-04-24 Spec Dependencies: spec = XQ31+ spec = XQ30+ Test: for $e in /employees/employee, $d in $e/department group by $d return map { "department" : $d, "highest paid employee" : let $max := max($e/salary) return $e[salary=$max]/name/text()} |
pass | n/a
test-set dependencies not satisfied |
pass | n/a | pass | pass | |
UseCaseR31-003[+]
X UseCaseR31-003: Created on: 2014-04-24 Spec Dependencies: spec = XQ30+ Test: <out> { for $employee in /employees/employee let $salary := $employee/salary group by $department := $employee/department let $max-salary := max($salary) let $highest-earners := $employee[salary = $max-salary] return <department name="{$department}">{ $highest-earners }</department>, for $employee in /employees/employee let $salary := $employee/salary group by $job-type := $employee/employeeType let $totals := count($employee) return <total-by-job-type type="{$job-type}">{ $totals }</total-by-job-type> }</out> |
pass | n/a
test-set dependencies not satisfied |
pass | n/a | pass | pass | |
UseCaseR31-004[+]
X UseCaseR31-004: Created on: 2014-04-24 Spec Dependencies: spec = XQ31+ spec = XQ30+ Test: declare namespace map="http://www.w3.org/2005/xpath-functions/map"; for $employee in /employees/employee let $salary := $employee/salary group by $department := $employee/department let $max-salary := max($salary) let $highest-earners := $employee[salary = $max-salary] return map{ "first" : map { "department" : $department, "highest earners" : $highest-earners/name/text() } , "job type count" : map:merge( for $employee in /employees/employee let $salary := $employee/salary group by $job-type := $employee/employeeType let $totals := count($employee) return map { $job-type : $totals } )} |
pass | n/a
test-set dependencies not satisfied |
pass | n/a | pass | pass | |
UseCaseR31-009[+]
X UseCaseR31-009: Created on: 2014-04-24 Spec Dependencies: feature = higherOrderFunctions spec = XQ31+ spec = XQ30+ Test: declare namespace map="http://www.w3.org/2005/xpath-functions/map"; declare variable $book:= (<book> <isbn>0470192747</isbn> <publisher>Wiley</publisher> <title>XSLT 2.0 and XPath 2.0 Programmer's Reference</title> </book>); declare variable $author := (<author> <name>Michael H. Kay</name> <isbn>0470192747</isbn> <isbn>...</isbn> </author>); declare variable $index := map:merge($book ! map{isbn : .}); <table>{ for $a in $author return <tr> <td>{ $a/name/string() }</td> <td>{ string-join($a/isbn ! $index(.)/title/string(), ", ") }</td> </tr> }</table> |
fail | n/a
test-set dependencies not satisfied |
pass | n/a | pass | pass | |
UseCaseR31-012[+]
X UseCaseR31-012: Created on: 2014-04-24 Spec Dependencies: feature = higherOrderFunctions spec = XQ31+ spec = XQ30+ Test: declare function local:play( $secret-number as xs:integer, $guessed-number as xs:integer, $translator as function(xs:string) as xs:string) { switch (true()) case $guessed-number eq $secret-number return $translator("You won!") case $guessed-number lt $secret-number return $translator("The secret number is greater.") default (: $guessed-number gt $secret-number :) return $translator("The secret number is lower.") }; local:play(76, 86, function($x) { $x }), (: Keep English :) local:play(76, 86, map { "You won!" : "Du hast gewonnen!", "The secret number is greater." : "Die geheime Zahl ist groesser.", "The secret number is lower." : "Die geheime Zahl ist kleiner." } ) |
pass | n/a
test-set dependencies not satisfied |
pass | n/a | pass | pass | |
UseCaseR31-013[+]
X UseCaseR31-013: Created on: 2014-04-24 Spec Dependencies: feature = higherOrderFunctions spec = XQ31+ spec = XQ30+ Test: declare variable $s :=[['A', 'DT'], ['bride', 'NN'], [',', ','], ['you', 'PRP'], ['know', 'VBP'], [',', ','], ['must', 'MD'], ['appear', 'VB'], ['like', 'IN'], ['a', 'DT'], ['bride', 'NN'], [',', ','], ['but', 'CC'], ['my', 'PRP$'], ['natural', 'JJ'], ['taste', 'NN'], ['is', 'VBZ'], ['all', 'DT'], ['for', 'IN'], ['simplicity', 'NN'], [';', ':'], ['a', 'DT'], ['simple', 'JJ'], ['style', 'NN'], ['of', 'IN'], ['dress', 'NN'], ['is', 'VBZ'], ['so', 'RB'], ['infinitely', 'RB'], ['preferable', 'JJ'], ['to', 'TO'], ['finery', 'VB'], ['.', '.'] ]; <s> { for $w in $s?* return <w pos="{ $w(2) }">{ $w(1) }</w> } </s> |
pass | n/a
test-set dependencies not satisfied |
pass | n/a | pass | pass | |
UseCaseR31-014[+]
X UseCaseR31-014: Created on: 2014-04-24 Spec Dependencies: feature = higherOrderFunctions spec = XQ31+ spec = XQ30+ Test: declare variable $s :=[['A', 'DT'], ['bride', 'NN'], [',', ','], ['you', 'PRP'], ['know', 'VBP'], [',', ','], ['must', 'MD'], ['appear', 'VB'], ['like', 'IN'], ['a', 'DT'], ['bride', 'NN'], [',', ','], ['but', 'CC'], ['my', 'PRP$'], ['natural', 'JJ'], ['taste', 'NN'], ['is', 'VBZ'], ['all', 'DT'], ['for', 'IN'], ['simplicity', 'NN'], [';', ':'], ['a', 'DT'], ['simple', 'JJ'], ['style', 'NN'], ['of', 'IN'], ['dress', 'NN'], ['is', 'VBZ'], ['so', 'RB'], ['infinitely', 'RB'], ['preferable', 'JJ'], ['to', 'TO'], ['finery', 'VB'], ['.', '.'] ]; declare variable $index := map { "pos" : 2, "lemma" : 1 }; <s> { for $w in $s?* return <w pos="{ $w($index("pos")) }">{ $w($index("lemma")) }</w> } </s> |
pass | n/a
test-set dependencies not satisfied |
pass | n/a | pass | pass | |
UseCaseR31-015[+]
X UseCaseR31-015: Created on: 2014-04-24 Spec Dependencies: feature = higherOrderFunctions spec = XQ31+ spec = XQ30+ Test: declare variable $s :=[['A', 'DT'], ['bride', 'NN'], [',', ','], ['you', 'PRP'], ['know', 'VBP'], [',', ','], ['must', 'MD'], ['appear', 'VB'], ['like', 'IN'], ['a', 'DT'], ['bride', 'NN'], [',', ','], ['but', 'CC'], ['my', 'PRP$'], ['natural', 'JJ'], ['taste', 'NN'], ['is', 'VBZ'], ['all', 'DT'], ['for', 'IN'], ['simplicity', 'NN'], [';', ':'], ['a', 'DT'], ['simple', 'JJ'], ['style', 'NN'], ['of', 'IN'], ['dress', 'NN'], ['is', 'VBZ'], ['so', 'RB'], ['infinitely', 'RB'], ['preferable', 'JJ'], ['to', 'TO'], ['finery', 'VB'], ['.', '.'] ]; declare variable $index := map { "pos" : 2, "lemma" : 1 }; for $word in $s?* let $pos := $word(2) let $lexeme := $word(1) where $pos = ("JJ", "NN", "RB", "VB") group by $pos order by $pos return <pos name="{$pos}"> { for $l in distinct-values($lexeme) return <lexeme>{ $l }</lexeme> } </pos> |
pass | n/a
test-set dependencies not satisfied |
pass | n/a | pass | pass | |
UseCaseR31-016[+]
X UseCaseR31-016: Created on: 2014-04-24 Spec Dependencies: feature = higherOrderFunctions spec = XQ31+ spec = XQ30+ Test: declare variable $s :=[['A', 'DT'], ['bride', 'NN'], [',', ','], ['you', 'PRP'], ['know', 'VBP'], [',', ','], ['must', 'MD'], ['appear', 'VB'], ['like', 'IN'], ['a', 'DT'], ['bride', 'NN'], [',', ','], ['but', 'CC'], ['my', 'PRP$'], ['natural', 'JJ'], ['taste', 'NN'], ['is', 'VBZ'], ['all', 'DT'], ['for', 'IN'], ['simplicity', 'NN'], [';', ':'], ['a', 'DT'], ['simple', 'JJ'], ['style', 'NN'], ['of', 'IN'], ['dress', 'NN'], ['is', 'VBZ'], ['so', 'RB'], ['infinitely', 'RB'], ['preferable', 'JJ'], ['to', 'TO'], ['finery', 'VB'], ['.', '.'] ]; declare function local:words-only($s) { for $w in $s where not($w(2) = (".", ",", ";", ":")) return $w(1) }; for sliding window $w in local:words-only($s?*) start at $i when true() only end at $j when $j - $i eq 2 return array { $w } |
pass | n/a
test-set dependencies not satisfied |
pass | n/a | pass | pass | |
UseCaseR31-017[+]
X UseCaseR31-017: Created on: 2014-04-24 Spec Dependencies: feature = higherOrderFunctions spec = XQ31+ spec = XQ30+ Test: declare variable $s :=[['A', 'DT'], ['bride', 'NN'], [',', ','], ['you', 'PRP'], ['know', 'VBP'], [',', ','], ['must', 'MD'], ['appear', 'VB'], ['like', 'IN'], ['a', 'DT'], ['bride', 'NN'], [',', ','], ['but', 'CC'], ['my', 'PRP$'], ['natural', 'JJ'], ['taste', 'NN'], ['is', 'VBZ'], ['all', 'DT'], ['for', 'IN'], ['simplicity', 'NN'], [';', ':'], ['a', 'DT'], ['simple', 'JJ'], ['style', 'NN'], ['of', 'IN'], ['dress', 'NN'], ['is', 'VBZ'], ['so', 'RB'], ['infinitely', 'RB'], ['preferable', 'JJ'], ['to', 'TO'], ['finery', 'VB'], ['.', '.'] ]; declare function local:filter($s as item()*, $p as function(item()) as xs:boolean) { array { $s[$p(.)] }, array { $s[not($p(.))] } }; let $f := function($a) { starts-with($a(2), "VB") } return local:filter($s?*, $f) |
pass | n/a
test-set dependencies not satisfied |
pass | n/a | pass | pass | |
UseCaseR31-018[+]
X UseCaseR31-018: Created on: 2014-04-24 Spec Dependencies: feature = higherOrderFunctions spec = XQ31+ spec = XQ30+ Test: declare variable $s :=[['A', 'DT'], ['bride', 'NN'], [',', ','], ['you', 'PRP'], ['know', 'VBP'], [',', ','], ['must', 'MD'], ['appear', 'VB'], ['like', 'IN'], ['a', 'DT'], ['bride', 'NN'], [',', ','], ['but', 'CC'], ['my', 'PRP$'], ['natural', 'JJ'], ['taste', 'NN'], ['is', 'VBZ'], ['all', 'DT'], ['for', 'IN'], ['simplicity', 'NN'], [';', ':'], ['a', 'DT'], ['simple', 'JJ'], ['style', 'NN'], ['of', 'IN'], ['dress', 'NN'], ['is', 'VBZ'], ['so', 'RB'], ['infinitely', 'RB'], ['preferable', 'JJ'], ['to', 'TO'], ['finery', 'VB'], ['.', '.'] ]; declare function local:filter($s as item()*, $p as function(item()) as xs:boolean) { map { true() : array { $s[$p(.)] }, false() : array { $s[not($p(.))] } } }; let $f := function($a) { starts-with($a(2), "VB") } return local:filter($s?*, $f) |
pass | n/a
test-set dependencies not satisfied |
pass | n/a | pass | pass | |
UseCaseR31-019[+]
X UseCaseR31-019: Created on: 2014-04-24 Spec Dependencies: spec = XQ30+ Test: declare variable $span := <root><span class="ocr_word" title="bbox 1388 430 1461 474">the</span> <span class="ocr_word" title="bbox 1514 433 1635 476">other</span> <span class="ocr_word" title="bbox 133 498 317 554">pcssible</span> <span class="ocr_word" title="bbox 354 498 590 541">derivation</span> <span class="ocr_word" title="bbox 631 497 738 538">from</span> <span class="ocr_word" title="bbox 772 495 799 547" lang="grc" xml:lang="grc">?</span> <span class="ocr_word" title="bbox 835 495 1019 538" lang="grc" xml:lang="grc">???????</span> <span class="ocr_word" title="bbox 134 567 220 607">dies</span> <span class="ocr_word" title="bbox 257 566 462 607">erastinus</span></root>; declare function local:extract-text($spans) { for $s in $spans//span return string($s) }; local:extract-text($span) |
pass | n/a
test-set dependencies not satisfied |
pass | n/a | pass | pass | |
UseCaseR31-022[+]
X UseCaseR31-022: Created on: 2014-04-24 Spec Dependencies: spec = XQ31+ spec = XQ30+ Test: json-doc("http://www.w3.org/qt3/app/UseCaseR31/mildred-json")?phone?*[?type = 'mobile']?number |
pass | n/a
test-set dependencies not satisfied |
pass | n/a | pass | pass | |
UseCaseR31-023[+]
X UseCaseR31-023: Created on: 2014-04-24 Spec Dependencies: feature = higherOrderFunctions spec = XQ31+ spec = XQ30+ Test: declare namespace map = "http://www.w3.org/2005/xpath-functions/map"; declare namespace array = "http://www.w3.org/2005/xpath-functions/array"; let $input := json-doc('http://www.w3.org/qt3/app/UseCaseR31/employees-json') for $k in map:keys($input) return <department name="{ $k }"> { let $array := $input($k) for $i in 1 to array:size($array) let $emp := $array($i) return <employee> <firstName>{ $emp('firstName') }</firstName> <lastName>{ $emp('lastName') }</lastName> <age>{ $emp('age') }</age> </employee> } </department> |
pass | n/a
test-set dependencies not satisfied |
pass | n/a | pass | pass | |
UseCaseR31-025[+]
X UseCaseR31-025: Created on: 2014-04-24 Spec Dependencies: feature = higherOrderFunctions spec = XQ31+ spec = XQ30+ Test: declare namespace map="http://www.w3.org/2005/xpath-functions/map"; declare function local:deep-put($input as item()*, $key as xs:string, $value as item()*) as item()* { let $mf := function($k, $v) { if ($k eq $key) then map{$k : $value} else map{$k : local:deep-put($v, $key, $value)} } for $i in $input return if ($i instance of map(*)) then map:merge(map:for-each($i, $mf)) else if ($i instance of array(*)) then array{ local:deep-put($i?*, $key, $value) } else $i }; local:deep-put(json-doc("http://www.w3.org/qt3/app/UseCaseR31/bookinfo-json"), "first", "John") |
pass | n/a
test-set dependencies not satisfied |
pass | n/a | pass | pass | |
UseCaseR31-026[+]
X UseCaseR31-026: Created on: 2014-04-24 Spec Dependencies: feature = higherOrderFunctions spec = XQ31+ spec = XQ30+ Test: for $sarah in collection($users-collection-uri), $friend in collection($users-collection-uri) where $sarah('name') = "Sarah" and $friend('name') = $sarah('friends')?* return $friend('name') |
fail | n/a
test-set dependencies not satisfied |
pass | n/a | pass | pass | |
UseCaseR31-027[+]
X UseCaseR31-027: Created on: 2014-04-24 Spec Dependencies: feature = higherOrderFunctions spec = XQ31+ spec = XQ30+ Test: Q{http://www.w3.org/2005/xpath-functions/map}merge( for $sales in collection($sales-collection-uri) let $pname := $sales('product') group by $pname return map { $pname : sum(for $s in $sales return $s('quantity')) }) |
fail | n/a
test-set dependencies not satisfied |
pass | n/a | pass | pass | |
UseCaseR31-028[+]
X UseCaseR31-028: Created on: 2014-04-24 Spec Dependencies: spec = XQ31+ spec = XQ30+ Test: declare namespace map="http://www.w3.org/2005/xpath-functions/map"; declare variable $storesVar := array { unparsed-text-lines("UseCaseR31/stores.json") ! parse-json(.) }; declare variable $productsVar := array { unparsed-text-lines("UseCaseR31/products.json") ! parse-json(.) }; declare variable $salesVar := array { unparsed-text-lines("UseCaseR31/sales.json") ! parse-json(.) }; array { for $store in $storesVar ? * let $state := $store?state group by $state order by $state return map { $state : array { for $product in $productsVar ? * let $category := $product?category group by $category order by $category return map { $category : map:merge(( for $sales in $salesVar ? * where $sales?("store number") = $store?("store number") and $sales?product = $product?name let $pname := $sales?product group by $pname return map { $pname : sum(for $s in $sales return $s?quantity)} )) } } } } |
pass | n/a
test-set dependencies not satisfied |
pass | n/a | pass | pass | |
UseCaseR31-029[+]
X UseCaseR31-029: Created on: 2014-04-24 Spec Dependencies: feature = higherOrderFunctions spec = XQ31+ spec = XQ30+ Test: declare namespace map="http://www.w3.org/2005/xpath-functions/map"; let $sats := json-doc("http://www.w3.org/qt3/app/UseCaseR31/satellites-json")("satellites") return map { "visible" : array { map:keys($sats)[$sats(.)("visible")] }, "invisible" : array { map:keys($sats)[not($sats(.)("visible"))] } } |
pass | n/a
test-set dependencies not satisfied |
pass | n/a | pass | pass | |
UseCaseR31-030[+]
X UseCaseR31-030: Created on: 2014-04-24 Spec Dependencies: spec = XQ31+ spec = XQ30+ Test: array { for $page in doc("UseCaseR31/Wikipedia-Origami.xml")//page return map { "title": string($page/title), "id" : string($page/id), "last updated" : string($page/revision[1]/timestamp), "authors" : array { for $a in $page/revision/contributor/username return string($a) } } } |
pass | n/a
test-set dependencies not satisfied |
pass | n/a | pass | pass | |
UseCaseR31-031[+]
X UseCaseR31-031: Created on: 2014-04-24 Spec Dependencies: spec = XQ31+ spec = XQ30+ Test: <html><body><table> <tr> (: Column headings :) { <th> </th>, for $th in json-doc('http://www.w3.org/qt3/app/UseCaseR31/table-json')?col-labels?* return <th>{ $th }</th> } </tr> { (: Data for each row :) for $r at $i in json-doc('http://www.w3.org/qt3/app/UseCaseR31/table-json')?data?* return <tr> { <th>{ json-doc('http://www.w3.org/qt3/app/UseCaseR31/table-json')?row-labels[$i] }</th>, for $c in $r?* return <td>{ $c }</td> } </tr> } </table> </body> </html> |
pass | n/a
test-set dependencies not satisfied |
pass | n/a | pass | pass | |
UseCaseR31-032[+]
X UseCaseR31-032: Created on: 2014-04-24 Spec Dependencies: spec = XQ31+ spec = XQ30+ Test: <table>{ for tumbling window $w in json-doc("http://www.w3.org/qt3/app/UseCaseR31/colors-json")?colors?* start at $x when fn:true() end at $y when $y - $x = 2 return <tr>{ for $i in $w?color return <td>{ $i }</td> }</tr> }</table> |
pass | n/a
test-set dependencies not satisfied |
pass | n/a | pass | pass | |
UseCaseR31-033[+]
X UseCaseR31-033: Created on: 2014-04-24 Spec Dependencies: feature = higherOrderFunctions spec = XQ31+ spec = XQ30+ Test: declare namespace map="http://www.w3.org/2005/xpath-functions/map"; let $dbj := json-doc("http://www.w3.org/qt3/app/UseCaseR31/users2-json")[ .("name") = "Deadbeat Jim" ] return map:put($dbj, "status", "credit card declined") |
pass | n/a
test-set dependencies not satisfied |
pass | n/a | pass | pass | |
UseCaseR31-034-err[+]
X UseCaseR31-034-err: Created on: 2015-09-17 Spec Dependencies: feature = higherOrderFunctions spec = XQ31+ spec = XQ30+ Test: let $mf := function($k as node(), $v) { map{$k('book') : $v} } return $mf(json-doc("http://www.w3.org/qt3/app/UseCaseR31/bookinfo-json"), "first") |
pass | n/a
test-set dependencies not satisfied |
pass | n/a | pass | pass |