> Just thinking out loudly .... what about resolving a function by a custom > annotation too?
To me, this sounds like a general feature request for XQuery 3.1: a function-annotations() function could be introduced, which returns all annotations of a function. You are welcome to motivate such extensions in the W3 Bugzilla issue tracker [1] ! Christian [1] https://www.w3.org/Bugs/Public/buglist.cgi?component=XQuery%203.1&product=XPath%20%2F%20XQuery%20%2F%20XSLT&resolution=--- > This could enable to abstract away from function names (and signatures) and > possibly change behaviour of an implementation by just moving an annotation > from one function to another ... > I think jaxws does something similar .... > M. > > > On 24/02/2014 19:09, Imsieke, Gerrit, le-tex wrote: >> >> Great idea! >> >> And it seems as if a user will able to submit the module URI and a >> function name via RESTXQ and use this function even in an updating >> expression. >> >> Maybe a variant of inspect:functions() could also accept a string (my use >> case: an application/xquery document that is submitted in a multipart RESTXQ >> POST request), parse it for function declarations and return them as >> function items. >> >> You'd have one signature with an xs:anyURI argument and one with an >> xs:string argument. Or name the two functions differently and let both >> accept strings. >> >> Gerrit >> >> >> On 24.02.2014 18:32, Christian Grün wrote: >>> >>> Hi Jean-Philippe, >>> >>> we are still hesitant to implement a function that dynamically adds >>> all imported functions to the static query context. Such an extension >>> wouldn't allow us anymore to statically determine which of the >>> functions that are used in the XQuery expression do actually exist, >>> and which may be imported at runtime by an import-module call. >>> >>> However, we could add a function that returns a sequence of all >>> functions declared in a specific module, and which could be browser >>> for a specific function. I have added this idea (inspired by our team >>> member Leo) and an example how to use it to GitHub [1]. >>> >>> Do you (and others) think that this solution would be a viable >>> alternative to the util:import-module function from eXist? >>> Christian >>> >>> [1] https://github.com/BaseXdb/basex/issues/872 >>> >>> >>> >>> On Mon, Feb 24, 2014 at 4:55 PM, Christian Grün >>> <[email protected]> wrote: >>>> >>>> Hi Jean-Philippe, >>>> >>>>> when the evaluated >>>>> expression yields function items. How should we understand this second >>>>> limitation? Because modules precisely define functions... >>>> >>>> >>>> This means that the result of a query may not be a function, as e.g. >>>> in the following two examples: >>>> >>>> xquery:eval("true#0"), >>>> xquery:eval("function() { 1 }") >>>> >>>> Hope this helps, >>>> Christian >>> >>> _______________________________________________ >>> BaseX-Talk mailing list >>> [email protected] >>> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >>> >> > > _______________________________________________ > BaseX-Talk mailing list > [email protected] > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk _______________________________________________ BaseX-Talk mailing list [email protected] https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk

