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 <d...@calldei.com> wrote:
> Could you define what you mean by "output" ?
>
> ----------------------------------------
> David A. Lee
> d...@calldei.com
> http://www.xmlsh.org
>
>
> -----Original Message-----
> From: Ihe Onwuka [mailto:ihe.onw...@gmail.com]
> Sent: Monday, January 13, 2014 4:19 PM
> To: David Lee
> Cc: talk@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 <d...@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.
_______________________________________________
talk@x-query.com
http://x-query.com/mailman/listinfo/talk

Reply via email to