Change id: map-merge
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) |
---|---|---|---|---|---|---|
fn-function-lookup-821[+]
X fn-function-lookup-821: Created on: 2016-09-09 Spec Dependencies: spec = XP31+ XQ31+ spec = XP30+ XQ30+ feature = higherOrderFunctions Test: exists(function-lookup(fn:QName('http://www.w3.org/2005/xpath-functions/map', 'merge'), 1)) |
no result | pass | pass | pass | pass | pass |
fn-function-lookup-822[+]
X fn-function-lookup-822: Created on: 2016-09-09 Spec Dependencies: spec = XP31+ XQ31+ spec = XP30+ XQ30+ feature = higherOrderFunctions Test: function-lookup(fn:QName('http://www.w3.org/2005/xpath-functions/map', 'merge'), 1)(()) |
no result | pass | pass | pass | pass | pass |
fn-function-lookup-823[+]
X fn-function-lookup-823: Created on: 2016-09-09 Spec Dependencies: spec = XP31+ XQ31+ spec = XP30+ XQ30+ feature = higherOrderFunctions Test: exists(function-lookup(fn:QName('http://www.w3.org/2005/xpath-functions/map', 'merge'), 2)) |
no result | pass | pass | pass | pass | pass |
fn-function-lookup-824[+]
X fn-function-lookup-824: Created on: 2016-09-09 Spec Dependencies: spec = XP31+ XQ31+ spec = XP30+ XQ30+ feature = higherOrderFunctions Test: function-lookup(fn:QName('http://www.w3.org/2005/xpath-functions/map', 'merge'), 2)((), map{"duplicates":"use-last"}) |
no result | pass | pass | pass | pass | pass |
map-merge-001[+]
X map-merge-001: Created on: 2011-03-23 Spec Dependencies: spec = XP31+ XQ31+ XT30+ Test: map:merge() |
pass | pass | pass | pass | pass | pass |
map-merge-002[+]
X map-merge-002: Created on: 2011-03-23 Spec Dependencies: spec = XP31+ XQ31+ XT30+ Test: map:merge(()) |
pass | pass | pass | pass | pass | pass |
map-merge-003-hof[+]
X map-merge-003-hof: Created on: 2011-03-23 Spec Dependencies: feature = higherOrderFunctions spec = XP31+ XQ31+ XT30+ Test: map:merge(map:entry("foo", 1 to 5)) |
fail | pass | pass | pass | pass | pass |
map-merge-003[+]
X map-merge-003: Created on: 2011-03-23 Spec Dependencies: spec = XP31+ XQ31+ XT30+ Test: map:merge(map:entry("foo", 1 to 5)) |
pass | pass | pass | pass | pass | pass |
map-merge-004[+]
X map-merge-004: Created on: 2011-03-23 Spec Dependencies: spec = XP31+ XQ31+ XT30+ Test: map:merge((map:entry("foo", 1 to 5), map:entry("bar", 6 to 10))) |
pass | pass | pass | pass | pass | pass |
map-merge-005[+]
X map-merge-005: Created on: 2011-03-23 Spec Dependencies: spec = XP31+ XQ31+ XT30+ Test: map:merge(for $i in 1 to 20 return map:entry($i, $i*$i)) |
pass | pass | pass | pass | pass | pass |
map-merge-006[+]
X map-merge-006: Created on: 2011-03-23 Spec Dependencies: spec = XP31+ XQ31+ XT30+ Test: map:merge((map:entry("foo", 3), map:entry("foo", 4)), map{"duplicates": "use-last"}) |
pass | pass | pass | pass | pass | pass |
map-merge-006b[+]
X map-merge-006b: Created on: 2016-07-26 Spec Dependencies: spec = XP31+ XQ31+ XT30+ Test: map:merge((map:entry("foo", 3), map:entry("foo", 4)), map{"duplicates": "use-first"}) |
no result | pass | pass | pass | pass | pass |
map-merge-006c[+]
X map-merge-006c: Created on: 2016-07-26 Spec Dependencies: spec = XP31+ XQ31+ XT30+ Test: map:merge((map:entry("foo", 3), map:entry("foo", 4)), map{"duplicates": "combine"}) |
no result | pass | pass | pass | pass | pass |
map-merge-006d[+]
X map-merge-006d: Created on: 2016-07-26 Spec Dependencies: spec = XP31+ XQ31+ XT30+ Test: map:merge((map:entry("foo", 3), map:entry("foo", 4)), map{"duplicates": "use-any"}) |
no result | pass | pass | pass | pass | pass |
map-merge-006e[+]
X map-merge-006e: Created on: 2016-07-26 Spec Dependencies: spec = XP31+ XQ31+ XT30+ Test: map:merge((map:entry("foo", 3), map:entry("foo", 4))) |
no result | pass | pass | pass | pass | pass |
map-merge-006f[+]
X map-merge-006f: Created on: 2016-07-26 Spec Dependencies: spec = XP31+ XQ31+ XT30+ Test: map:merge((map:entry("foo", 3), map:entry("foo", 4)), map{"duplicates": "reject"}) |
no result | pass | pass | pass | pass | pass |
map-merge-007[+]
X map-merge-007: Created on: 2011-03-23 Spec Dependencies: spec = XP31+ XQ31+ XT30+ Test: let $foo := map:entry("foo", 3), $bar := map:entry("foo", 4), $foobar := map:merge(($foo, $bar)) return ($foobar, $bar, $foo)[3] |
pass | pass | pass | pass | pass | pass |
map-merge-008[+]
X map-merge-008: Created on: 2011-03-23 Spec Dependencies: spec = XP31+ XQ31+ XT30+ Test: let $foo := map:merge(for $i in 1 to 20 return map:entry($i, $i*$i)), $bar := map:entry(8, 63), $foobar := map:merge(($foo, $bar)) return ($foobar, $bar, $foo)[3] |
pass | pass | pass | pass | pass | pass |
map-merge-009[+]
X map-merge-009: Created on: 2011-03-23 Spec Dependencies: spec = XP31+ XQ31+ XT30+ Test: let $foo := map:merge(for $i in 1 to 20 return map:entry($i, $i*$i)), $bar := map:entry(8, 63), $foobar := map:merge(($foo, $bar)) return ($foobar, $bar, $foo)[2] |
pass | pass | pass | pass | pass | pass |
map-merge-010[+]
X map-merge-010: Created on: 2011-03-23 Spec Dependencies: spec = XP31+ XQ31+ XT30+ Test: let $foo := map:merge(for $i in 1 to 20 return map:entry($i, $i*$i)), $bar := map:merge(()), $foobar := map:merge(($foo, $bar)) return $foobar |
pass | pass | pass | pass | pass | pass |
map-merge-011[+]
X map-merge-011: Created on: 2011-03-23 Spec Dependencies: spec = XP31+ XQ31+ XT30+ Test: map:merge((map:entry(3, "three"), map:entry(3.0e0, "threeD"), map:entry(xs:float('3.0'), "threeF")), map{"duplicates" : "use-last"}) |
pass | pass | pass | pass | pass | pass |
map-merge-012[+]
X map-merge-012: Created on: 2011-03-23 Spec Dependencies: spec = XP31+ XQ31+ XT30+ Test: map:merge(for $n in distinct-values(//*/node-name()) return map:entry($n, //*[node-name() eq $n])) |
pass | pass | pass | pass | pass | pass |
map-merge-013[+]
X map-merge-013: Created on: 2011-03-23 Spec Dependencies: spec = XP31+ XQ31+ XT30+ Test: map:merge(for $n in 1 to 20 return map:entry($n, map{$n :string($n), $n+1:string($n+1), $n+2:string($n+2)})) |
pass | pass | pass | pass | pass | pass |
map-merge-016[+]
X map-merge-016: Created on: 2011-03-27 Spec Dependencies: spec = XP31+ XQ31+ XT30+ Test: deep-equal(map{}, map:merge(())) |
pass | pass | pass | pass | pass | pass |
map-merge-017[+]
X map-merge-017: Created on: 2011-03-27 Spec Dependencies: spec = XP31+ XQ31+ XT30+ Test: deep-equal(map{"a":1}, map:entry("a", 1)) |
pass | pass | pass | pass | pass | pass |
map-merge-018[+]
X map-merge-018: Created on: 2011-03-27 Spec Dependencies: spec = XP31+ XQ31+ XT30+ Test: deep-equal(map{"a":1,"b":2,"c":(3,4,5)}, map{"c":(3,4,5),"a":1,"b":2}) |
pass | pass | pass | pass | pass | pass |
map-merge-019[+]
X map-merge-019: Created on: 2011-03-27 Spec Dependencies: spec = XP31+ XQ31+ XT30+ Test: deep-equal(map{"a":1}, map:merge(())) |
pass | pass | pass | pass | pass | pass |
map-merge-020[+]
X map-merge-020: Created on: 2011-03-27 Spec Dependencies: spec = XP31+ XQ31+ XT30+ Test: deep-equal(map:merge(for $i in 1 to 1000 return map:entry($i, $i+1)), map:merge(for $i in 2 to 1001 return map:entry($i, $i+1))) |
pass | pass | pass | pass | pass | pass |
map-merge-021[+]
X map-merge-021: Created on: 2011-03-27 Spec Dependencies: spec = XP31+ XQ31+ XT30+ Test: deep-equal(map:merge(for $i in 1 to 1000 return map:entry($i, $i+1)), map:merge(((for $i in 1 to 1000 return map:entry($i, $i+1)), map:entry(400, 402)), map{"duplicates":"use-last"})) |
pass | pass | pass | pass | pass | pass |
map-merge-022[+]
X map-merge-022: Created on: 2011-03-27 Spec Dependencies: spec = XP31+ XQ31+ XT30+ Test: deep-equal(map:merge(for $i in 1 to 1000 return map:entry($i, $i+1)), map:merge(for $i in 0 to 1000 return map:entry($i, $i+1))) |
pass | pass | pass | pass | pass | pass |
map-merge-023[+]
X map-merge-023: Created on: 2011-03-27 Spec Dependencies: spec = XP31+ XQ31+ XT30+ Test: deep-equal(map:merge(for $i in 1 to 1000 return map:entry($i, $i+1)), map:merge(for $i in 2 to 1000 return map:entry($i, $i+1))) |
pass | pass | pass | pass | pass | pass |
map-merge-024-hof[+]
X map-merge-024-hof: Created on: 2015-02-27 Spec Dependencies: feature = higherOrderFunctions spec = XP31+ XQ31+ XT30+ Test: map:merge(map:entry("foo", 1 to 5)) |
pass | pass | pass | pass | pass | pass |
map-merge-024[+]
X map-merge-024: Created on: 2015-02-27 Spec Dependencies: spec = XP31+ XQ31+ XT30+ Test: map:merge(map:entry("foo", 1 to 5)) |
pass | pass | pass | pass | 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-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-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-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 |
d1e41029[+]
X d1e41029: Created on: 2015-06-10 Spec Dependencies: spec = XQ31+ Test: deep-equal(map:merge(for $p in doc("catalog.xml")//product return map:entry(string($p/number), string($p/name))), map {"557":"Fleece Pullover", "563":"Floppy Sun Hat", "443":"Deluxe Travel Bag", "784":"Cotton Dress Shirt"}) |
pass | n/a
test-set dependencies not satisfied |
pass | n/a | pass | pass |
d1e66015[+]
X d1e66015: Created on: 2015-06-10 Spec Dependencies: spec = XQ31+ Test: declare variable $map1 := map {1:"first", 2:"second"}; declare variable $map2 := map {1:"ONE", "abc":"def"}; declare variable $map3 := map {"1":"first", "2":"second"}; deep-equal( map:merge( ($map1, $map2) ), map {1:"first", 2:"second", "abc":"def"} ) |
pass | n/a
test-set dependencies not satisfied |
pass | n/a | pass | pass |
d1e66026[+]
X d1e66026: Created on: 2015-06-10 Spec Dependencies: spec = XQ31+ Test: declare variable $map1 := map {1:"first", 2:"second"}; declare variable $map2 := map {1:"ONE", "abc":"def"}; declare variable $map3 := map {"1":"first", "2":"second"}; deep-equal( map:merge( ($map2, $map1) ), map {1:"ONE", 2:"second", "abc":"def"} ) |
pass | n/a
test-set dependencies not satisfied |
pass | n/a | pass | pass |
d1e66037[+]
X d1e66037: Created on: 2015-06-10 Spec Dependencies: spec = XQ31+ Test: declare variable $map1 := map {1:"first", 2:"second"}; declare variable $map2 := map {1:"ONE", "abc":"def"}; declare variable $map3 := map {"1":"first", "2":"second"}; deep-equal( map:merge( ($map1, $map3) ), map {1:"first", 2:"second", "1":"first", "2":"second"} ) |
pass | n/a
test-set dependencies not satisfied |
pass | n/a | pass | pass |
d1e66048[+]
X d1e66048: Created on: 2015-06-10 Spec Dependencies: spec = XQ31+ Test: declare variable $map1 := map {1:"first", 2:"second"}; declare variable $map2 := map {1:"ONE", "abc":"def"}; declare variable $map3 := map {"1":"first", "2":"second"}; deep-equal( map:merge( ($map1, $map2, $map3) ), map {1:"ONE", 2:"second", "abc":"def", "1":"first", "2":"second"} ) |
pass | n/a
test-set dependencies not satisfied |
pass | n/a | pass | pass |
d1e66059[+]
X d1e66059: Created on: 2015-06-10 Spec Dependencies: spec = XQ31+ Test: declare variable $map1 := map {1:"first", 2:"second"}; declare variable $map2 := map {1:"ONE", "abc":"def"}; declare variable $map3 := map {"1":"first", "2":"second"}; deep-equal( map:merge( ($map1, map{3:"third"}) ), map {1:"first", 2:"second", 3:"third"} ) |
pass | n/a
test-set dependencies not satisfied |
pass | n/a | pass | pass |
d1e66070[+]
X d1e66070: Created on: 2015-06-10 Spec Dependencies: spec = XQ31+ Test: declare variable $map1 := map {1:"first", 2:"second"}; declare variable $map2 := map {1:"ONE", "abc":"def"}; declare variable $map3 := map {"1":"first", "2":"second"}; deep-equal( map:merge( ($map1, map{2:"second-new"}) ), map {1:"first", 2:"second"} ) |
pass | n/a
test-set dependencies not satisfied |
pass | n/a | pass | pass |
d1e66081[+]
X d1e66081: Created on: 2015-06-10 Spec Dependencies: spec = XQ31+ Test: declare variable $map1 := map {1:"first", 2:"second"}; declare variable $map2 := map {1:"ONE", "abc":"def"}; declare variable $map3 := map {"1":"first", "2":"second"}; deep-equal( map:merge( ($map1, map:entry(2,"second-new")) ), map {1:"first", 2:"second"} ) |
pass | n/a
test-set dependencies not satisfied |
pass | n/a | pass | pass |
d1e66092[+]
X d1e66092: Created on: 2015-06-10 Spec Dependencies: spec = XQ31+ Test: declare variable $map1 := map {1:"first", 2:"second"}; declare variable $map2 := map {1:"ONE", "abc":"def"}; declare variable $map3 := map {"1":"first", "2":"second"}; deep-equal( map:merge( ($map1) ), map {1:"first", 2:"second"} ) |
pass | n/a
test-set dependencies not satisfied |
pass | n/a | pass | pass |
d1e66103[+]
X d1e66103: Created on: 2015-06-10 Spec Dependencies: spec = XQ31+ Test: declare variable $map1 := map {1:"first", 2:"second"}; declare variable $map2 := map {1:"ONE", "abc":"def"}; declare variable $map3 := map {"1":"first", "2":"second"}; deep-equal( map:merge( () ), map {} ) |
pass | n/a
test-set dependencies not satisfied |
pass | n/a | pass | pass |