Change id: array-curly-constructor
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) |
---|---|---|---|---|---|---|
boolean-013[+]
X boolean-013: Created on: 2015-06-15 Spec Dependencies: spec = XP31+ XQ31+ Test: boolean(array{}) |
pass | pass | pass | pass | pass | pass |
CurlyArray-002[+]
X CurlyArray-002: Created on: 2014-10-28 Spec Dependencies: spec = XP31+ XQ31+ Test: array{} |
no result | pass | pass | pass | pass | pass |
CurlyArray-004[+]
X CurlyArray-004: Created on: 2014-10-28 Spec Dependencies: spec = XP31+ XQ31+ Test: array:size(array{(), ('A', 'B', 'C'), 'D'}) |
no result | pass | pass | pass | pass | pass |
CurlyArray-006[+]
X CurlyArray-006: Created on: 2014-10-28 Spec Dependencies: spec = XQ31+ Test: declare function local:fun() {1 to 5}; array:size(array{local:fun()}) |
no result | n/a
notXP31 |
pass | n/a | pass | pass |
CurlyArray-008[+]
X CurlyArray-008: Created on: 2014-10-28 Spec Dependencies: spec = XQ31+ feature = higherOrderFunctions Test: declare function local:fun() {1 to 5}; array{local:fun()}(1) |
no result | n/a
notXP31 |
pass | n/a | pass | pass |
CurlyArray-010[+]
X CurlyArray-010: Created on: 2014-10-28 Spec Dependencies: spec = XQ31+ Test: declare function local:fun() {1 to 5}; array{local:fun()}?1 |
no result | n/a
notXP31 |
pass | n/a | pass | pass |
UseCaseJSON-010[+]
X UseCaseJSON-010: Created on: 2014-12-23 Spec Dependencies: spec = XQ31+ feature = higherOrderFunctions Test: <html> <body> <table> <tr> { (: Column headings :) <th> </th>, for $th in json-doc("table.json")("col labels")?* return <th>{ $th }</th> } </tr> { (: Data for each row :) for $r at $i in json-doc("table.json")("data")?* return <tr> { <th>{ json-doc("table.json")("row labels")[$i] }</th>, for $c in $r?* return <td>{ $c }</td> } </tr> } </table> </body> </html> |
pass | n/a
notXP31 |
pass | n/a | pass | pass |
UseCaseJSON-012[+]
X UseCaseJSON-012: Created on: 2014-12-23 Spec Dependencies: spec = XQ31+ feature = higherOrderFunctions Test: let $users := [map { "userid" : "W0342", "firstname" : "Walter", "lastname" : "Denisovich" }, map { "userid" : "M0535", "firstname" : "Mick", "lastname" : "Goulish" }]?* let $holdings := [map { "userid" : "W0342", "ticker" : "DIS", "shares" : 153212312 }, map { "userid" : "M0535", "ticker" : "DIS", "shares" : 10 }, map { "userid" : "M0535", "ticker" : "AIG", "shares" : 23412 }]?* return array { for $u in $users order by $u("userid") return map { "userid" : $u("userid"), "first" : $u("firstname"), "last" : $u("lastname"), "holdings" : array { for $h in $holdings where $h("userid") = $u("userid") order by $h("ticker") return map { "ticker" : $h("ticker"), "share" : $h("shares") } } } } |
pass | n/a
notXP31 |
pass | n/a | pass | pass |
UseCaseNLP-006b[+]
X UseCaseNLP-006b: Created on: 2014-12-30 Spec Dependencies: spec = XQ31+ feature = higherOrderFunctions Test: 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(json-doc('speech-representation.json')?*, $f) |
pass | n/a
notXP31 |
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-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 |
d1e41628[+]
X d1e41628: Created on: 2015-06-10 Spec Dependencies: spec = XQ31+ Test: array { "a", "b", "c" } |
pass | n/a
test-set dependencies not satisfied |
pass | n/a | pass | pass |
d1e41659[+]
X d1e41659: Created on: 2015-06-10 Spec Dependencies: spec = XQ31+ Test: array {["a", "b", "c"], "d" } |
pass | n/a
test-set dependencies not satisfied |
pass | n/a | pass | pass |