From: Dmitriy S. <sha...@gm...> - 2011-04-16 05:02:41
|
Yes, eXist's xquery engine resolve function on name & number of parameters, but do not put types in account. Well, it should be simple to improve ... do you have svn access? If you haven't I can make one and make this changers & you will test them (hope with others). On Sat, Apr 16, 2011 at 9:33 AM, Dave Finton <dav...@gm...> wrote: > I'd like to define a function (or two) where they can be called one of the > following ways: > > *dave-module:my-function ($my-string as xs:string) > dave-module:my-function ($my-integer as xs:integer)* > > The problem is that eXist (or perhaps it's the XQuery language in general) > doesn't like this, as it seems unless I define functions based on the > *number* of parameters as opposed to the *type*, I get an error. No matter > how I try, the interpreter seems to want one over the other. My question: Is > there a way to not have to do any obvious workarounds to get this to work? > Right now all I can do is to define the functions as follows, which does > work: > > *dave-module:my-function-s ($my-string as xs:string) > dave-module:my-function ($my-integer as xs:integer)* > > (note the "-s" at the end of the function name to denote the fact that it > is expecting a string) > > I'm using eXist 1.5 trunk (I forget the revision number off the top of my > head). My apologies if this is a neophyte question, but after a day of > rummaging through the documentation, I'm kind of at a loss. > -- > David Finton > > > ------------------------------------------------------------------------------ > Benefiting from Server Virtualization: Beyond Initial Workload > Consolidation -- Increasing the use of server virtualization is a top > priority.Virtualization can reduce costs, simplify management, and improve > application availability and disaster protection. Learn more about boosting > the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev > _______________________________________________ > Exist-development mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-development > > -- Dmitriy Shabanov |