Skip to content

Commit 99a384a

Browse files
committed
Fix map constructor syntax
See eXist-db/exist#2887.
1 parent 0d44dc4 commit 99a384a

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

examples/contacts/contacts.xql

+10-10
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,19 @@ declare variable $contacts:HTTP-SERVER-FAIL as xs:integer := 500; (: server side
4545
(: map client side exception to http code :)
4646
declare variable $contacts:CLIENT-EXCEPTION-MAP := map
4747
{
48-
'ResourceNotFound' := $contacts:HTTP-NOT-FOUND,
49-
'ExternalResourceNotFound' := $contacts:HTTP-NOT-FOUND,
50-
'InvalidJson' := $contacts:HTTP-CLIENT-FAIL,
51-
'InvalidModel' := $contacts:HTTP-CLIENT-FAIL,
52-
'MissingProperty' := $contacts:HTTP-CLIENT-FAIL,
53-
'*' := $contacts:HTTP-CLIENT-FAIL
48+
'ResourceNotFound': $contacts:HTTP-NOT-FOUND,
49+
'ExternalResourceNotFound': $contacts:HTTP-NOT-FOUND,
50+
'InvalidJson': $contacts:HTTP-CLIENT-FAIL,
51+
'InvalidModel': $contacts:HTTP-CLIENT-FAIL,
52+
'MissingProperty': $contacts:HTTP-CLIENT-FAIL,
53+
'*': $contacts:HTTP-CLIENT-FAIL
5454
};
5555

5656
(: map server side exception to http code :)
5757
declare variable $contacts:SERVER-EXCEPTION-MAP := map
5858
{
59-
'DatabaseFail' := $contacts:HTTP-SERVER-FAIL,
60-
'*' := $contacts:HTTP-SERVER-FAIL
59+
'DatabaseFail': $contacts:HTTP-SERVER-FAIL,
60+
'*': $contacts:HTTP-SERVER-FAIL
6161
};
6262

6363

@@ -132,8 +132,8 @@ declare %private function contacts:skip-take-range($skip as xs:integer, $take as
132132
{
133133
map
134134
{
135-
'from' := $skip + 1,
136-
'to' := $skip + $take
135+
'from': $skip + 1,
136+
'to': $skip + $take
137137
}
138138
};
139139

examples/templating/examples.xql

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function ex:hello-world($node as node(), $model as map(*), $language as xs:strin
4949
declare
5050
%templates:wrap
5151
function ex:addresses($node as node(), $model as map(*)) as map(*) {
52-
map { "addresses" := collection($config:app-root || "/data/addresses")/address }
52+
map { "addresses": collection($config:app-root || "/data/addresses")/address }
5353
};
5454

5555
declare

examples/templating/restxq-demo.xql

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function demo:page() {
2121
let $content := doc("restxq-page.html")
2222
let $config := map {
2323
(: The following function will be called to look up template parameters :)
24-
$templates:CONFIG_PARAM_RESOLVER := function($param as xs:string) as xs:string* {
24+
$templates:CONFIG_PARAM_RESOLVER : function($param as xs:string) as xs:string* {
2525
req:parameter($param)
2626
}
2727
}

examples/web/guess-templates.xql

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ declare function guess:init($node as node(), $model as map(*)) as map(*){
1818
else
1919
guess:random(100)
2020
return
21-
map { "random" := $rand }
21+
map { "random": $rand }
2222
};
2323

2424
(:~

modules/view.xql

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ declare option output:method "xhtml";
2020
declare option output:media-type "text/html";
2121

2222
let $config := map {
23-
$templates:CONFIG_APP_ROOT := $config:app-root
23+
$templates:CONFIG_APP_ROOT : $config:app-root
2424
}
2525
let $lookup := function($functionName as xs:string, $arity as xs:int) {
2626
try {

0 commit comments

Comments
 (0)