[xquery-talk] Multiple output via a stream of filters

Ihe Onwuka ihe.onwuka at gmail.com
Mon Jan 13 16:41:13 PST 2014


take the simplest case..... a straight copy of the node provided the
predicate passes.

On Tue, Jan 14, 2014 at 12:38 AM, David Lee <dlee at calldei.com> wrote:
> Could you define what you mean by "output" ?
>
> ----------------------------------------
> David A. Lee
> dlee at calldei.com
> http://www.xmlsh.org
>
>
> -----Original Message-----
> From: Ihe Onwuka [mailto:ihe.onwuka at gmail.com]
> Sent: Monday, January 13, 2014 4:19 PM
> To: David Lee
> Cc: talk at x-query.com
> Subject: Re: [xquery-talk] Multiple output via a stream of filters
>
> On Mon, Jan 13, 2014 at 11:54 PM, David Lee <dlee at calldei.com> wrote:
>> If your running in exist then pure XQuery is probably as good or better then anything else.
>> Could you expand on your problem ?
>>
>
> I have a collection. Suppose I have 10 different outputs I want and the decision as to which output a node is routed to (not necessarily mutual exclusive though) can be encapsulated in a predicate (hence amenable to a filter HOF).
>
> I only want to iterate over the collection once but I wish to apply the 10 predicates to each node in the sequence so as to determine which of the 10 outputs (again not necessarily mutually exclusive) the node will feature in.
>
> The algorithm is straightforward using structural recursion (or tail recursion if tail call elimination is an issue). Asking whether there is an idiomatic XQuery solution that is different  from this.


More information about the talk mailing list