[xquery-talk] recurrency

Michalmas michalmas at gmail.com
Tue Mar 10 23:48:57 PST 2009


Of course, i meant recursion. Sorry :-)

The thing is that later in XML there can be referance to that fields:
<somewhere-it-is-used>
   <what-the-name--of-var-is>
        <ref>name1</ref>
        <ref>name3 'sdsdsd'</ref>
   <what-the-name--of-var-is>
<somewhere-it-is-used>

So, as you see, the full path doesn't need to go through all nodes. Also,
there can be part to cut as string, but just ignore that now (i forgot to
remove replace function from previous example).

And for that i need to replace several calls with longer parameter list with
one in recursive mode. My tries ended in failure as i couldn't store the
current state (script nature of XQuery).

Thanks,
Michal

On Tue, Mar 10, 2009 at 11:26 PM, David Carlisle <davidc at nag.co.uk> wrote:

>
> > The replace is only to clean the data. In  real examples, it can be
> called
> > like: name1/name2 'asdas'/name3 'saadsf'.
>
>
> but you haven't said what output you want,
>
> > The mail thing is that recurrency.
>
> not sure what you mean by recurrency in this context, do you mean
> recursion? Your posted code doesn't use recursive functions, probably it
> should use a single recursive function rather than multiple functions
> with longer and longer argument lists, but I can't guess what they are
> intended to do, so I can't suggest a replacement without more information.
>
> Is the input your posted xml and a string of the form "name1/name2"  ?
> if so, what is the desired output.
>
> Please respond on list so others have a chance to answer.
>
> David
>
> ________________________________________________________________________
> The Numerical Algorithms Group Ltd is a company registered in England
> and Wales with company number 1249803. The registered office is:
> Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.
>
> This e-mail has been scanned for all viruses by Star. The service is
> powered by MessageLabs.
> ________________________________________________________________________
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://x-query.com/pipermail/talk/attachments/20090310/9b6dc964/attachment.htm


More information about the talk mailing list