"),
"]}")
From: general-boun...@developer.marklogic.com
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Joe Bryan
Sent: Tuesday, November 17, 2015 10:42 AM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] $counter < i -- I might be overthinki
t;http://www.marklogic.com/>
From: general-boun...@developer.marklogic.com
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Christopher Hamlin
Sent: Tuesday, November 17, 2015 12:37 PM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] $counter < i -- I might be overthinking
thi
gt;
Reply-To: MarkLogic Developer Discussion
mailto:general@developer.marklogic.com>>
Date: Tuesday, November 17, 2015 at 1:39 PM
To: MarkLogic Developer Discussion
mailto:general@developer.marklogic.com>>
Subject: Re: [MarkLogic Dev General] $counter < i -- I might be overthinking
-boun...@developer.marklogic.com>>
on behalf of Kari Cowan mailto:kco...@alm.com>>
Reply-To: MarkLogic Developer Discussion
mailto:general@developer.marklogic.com>>
Date: Tuesday, November 17, 2015 at 1:18 PM
To: MarkLogic Developer Discussion
mailto:general@developer.marklog
ot;)),
"]}")
From: general-boun...@developer.marklogic.com
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Christopher Hamlin
Sent: Tuesday, November 17, 2015 9:37 AM
To: MarkLogic Developer Discussion
Subject: Re: [MarkLogic Dev General] $counter < i -- I might be overthinki
json:transform-to-json is returning a document node. fn:concat takes a
bunch of things and casts them to xs:string. fn:string-join takes strings
specifically.
So two possibilities:
1. You need to change the docs to strings before doing string-join.
2. Make sure the strings are in a sequence,
oc($events/doc-uri), $config ), "else count: ",
$count, "else counter: ", $counter),
"]}")
From: general-boun...@developer.marklogic.com
[mailto:general-boun...@developer.marklogic.com] On Behalf Of Christopher Hamlin
Sent: Tuesday, November 17, 2015 5:59 AM
To: MarkLo
Can fn:string-join help? Join with ',', and glue on whatever you like
before or after?
On Mon, Nov 16, 2015 at 11:30 PM, Kari Cowan wrote:
> Is there any built-in component I can reference that would indicate in the
> loop below where $counter is less than the last item in the loop?
>
>
>
> Thi
r Discussion
mailto:general@developer.marklogic.com>>
Date: Tuesday, November 17, 2015 at 7:46 AM
To: MarkLogic Developer Discussion
mailto:general@developer.marklogic.com>>
Subject: Re: [MarkLogic Dev General] $counter < i -- I might be overthinking
this
Cowan,
There is a function
Cowan,
There is a function fn:last() which returns an integer value that
represents the number of items in the current context. Please refer
https://docs.marklogic.com/fn:last. See if that works for you.
Another approach could be, you can get the count of your results and add
the condition like $
Is there any built-in component I can reference that would indicate in the loop
below where $counter is less than the last item in the loop?
This would print the json for the return only when $counter=1, is simple way to
know when $counter < LastItem?
let $outputJSON:=("{"events":[",
let $confi
11 matches
Mail list logo