[xquery-talk] simple map at the moment is not so simple

Ihe Onwuka ihe.onwuka at gmail.com
Tue Mar 4 08:32:14 PST 2014


Away from my machine at the mo but I can tell you it isn't. I'm sure
I've fallen for that one before.

On Tue, Mar 4, 2014 at 3:28 PM, Michael Kay <mike at saxonica.com> wrote:
> Show us the failing expression. I suspect the expression on the RHS of "!" should be in parens.
>
> Michael Kay
> Saxonica
>
> On 4 Mar 2014, at 15:13, Ihe Onwuka <ihe.onwuka at gmail.com> wrote:
>
>> I have something like
>>
>> distinct-values(somepath/@x) !
>>  http:send-request(<http:request href="'http://www.me.com/' || . "
>> method ="get"/>
>>
>> which works fine
>>
>> I now want to find out the @x's for which the http request fails which
>> entails checking the status attribute of the first sequential item
>> returned from the send-request (thats not the problem I already know
>> how to do that).
>>
>> Now i thought you could flowr the right hand side of the map operator
>> which would allow me to variablize the output of the http request and
>> interrogate that. However as soon as it sees the $ in let $ following
>> the ! operator it objects (well eXist does anyway).
>>
>> I'm using or trying to use ! because the iteration of it's right hand
>> side is not over nodes. Not clear on exactly what can and can't follow
>> !.
>>
>> So to summarize I want to output the LHS (@x) of the simple map
>> expression where the http request in the RHS has not worked (i.e
>> http:send-request()[1]/@status ne 200).
>> _______________________________________________
>> talk at x-query.com
>> http://x-query.com/mailman/listinfo/talk
>


More information about the talk mailing list