From: Adam R. <ad...@ex...> - 2011-05-09 08:18:29
|
> Is that intended limitation? > > This limits the possible use of this feature a lot, as if only hardcoded > function names can be used, there is not much value in this feature? > Indeed it is a known limitation! The problem is that eXist discards some information during compile time as an optimisation. What you are attempting to do here is resolve a forward reference to a function which could be in any module. There was some work done to try and address this limitation for other purposes, where we now keep a map of forward references in the XQueryContext. I guess it could be possible to use this functionality to resolve this issue, unfortunately I dont have much time to work on this myself at the moment, but if anyone is interested I can point them at the right places in the codebase. If you look at the upcoming Higher Order Functions stuff in W3C XQuery 3.0 specification, you will also see that its impossible to do such dynamic options in there. I did voice some concern unofficially but some vendors were worried about optimisation. I may try and draft a proposal to address this though... > > Should I be using util:eval() instead? You could, but you probably shouldnt! I usually pronounce util:eval() as 'util:evil()' ;-) > > > Regards > > -- Remi > > > > > > ------------------------------------------------------------------------------ > WhatsUp Gold - Download Free Network Management Software > The most intuitive, comprehensive, and cost-effective network > management toolset available today. Delivers lowest initial > acquisition cost and overall TCO of any competing solution. > http://p.sf.net/sfu/whatsupgold-sd > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open > > -- Adam Retter eXist Developer { United Kingdom } ad...@ex... irc://irc.freenode.net/existdb |