From efcc9b5d39d38c7bd4e59cb73c139e9a22d96a0a Mon Sep 17 00:00:00 2001 From: "Nathan P. Gibson" Date: Thu, 25 Jun 2020 19:51:12 +0200 Subject: [PATCH] temporarily turning off limit parameter produces an error when the total number of items is less than the limit --- get-zotero-data.xql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/get-zotero-data.xql b/get-zotero-data.xql index 581b575..70dd880 100644 --- a/get-zotero-data.xql +++ b/get-zotero-data.xql @@ -145,7 +145,7 @@ declare function local:get-zotero-data($url){ declare function local:get-zotero(){ let $start := if(request:get-parameter('start', '') != '') then concat('&start=',request:get-parameter('start', '')) else '&start=0' let $limit := if(request:get-parameter('limit', '') != '') then concat('&limit=',request:get-parameter('limit', '')) else '&limit=100' - let $url := if(request:get-parameter('next', '') != '') then request:get-parameter('next', '') else concat($zotero-api,'/groups/',$groupid,'/items?format=',$format,if($format='json') then '&include=bib,data,coins,citation&style=chicago-fullnote-bibliography' else(),$start, $limit) + let $url := if(request:get-parameter('next', '') != '') then request:get-parameter('next', '') else concat($zotero-api,'/groups/',$groupid,'/items?format=',$format,if($format='json') then '&include=bib,data,coins,citation&style=chicago-fullnote-bibliography' else(),$start (:, $limit:)) let $items := local:get-zotero-data($url) let $items-info := $items[1] let $total := $items-info/http:header[@name='total-results']/@value