From: Adam R. <ad...@ex...> - 2010-07-21 10:16:45
|
Yes I agree we should fix this, are you volunteering ;-) On 18 July 2010 10:35, James Fuller <jam...@ex...> wrote: > courtesy Norm Walsh via twitter > > paraphrasing: 'During eval of a fn, the context item, pos, size is > undefined, except where it is def by some expr inside the fn' > > section 3.1.5 Function Calls in XQuery spec defines the correct > behavior for this. > > so looks like we need to sort this out, we should probably also create > an xquery level unit test for this as well ... something I think we > should do whenever we apply a patch/bug/tweak that can be > characterized easily as expected result from xquery unit test. > > J > > > > > On 17 July 2010 14:21, Dmitriy Shabanov <sha...@gm...> wrote: >> On Sat, 2010-07-17 at 13:31 +0200, James Fuller wrote: >>> I can appreciate that both functions ( e.g. local:test() and name() ) >>> when given no argument use default context but can't find in xquery >>> related specs what the rules are for default context for a function >>> with no arguments. >> >> The function don't have context. You right, it should throw error. (BTW, >> I like the way it work now) >> >>> should this throw an [XPDY0002] evaluation of an expression relies on >>> some part of the dynamic context that has not been assigned a value: >>> {context item}. >> >> -- >> Cheers, >> >> Dmitriy Shabanov >> >> > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Exist-development mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-development > -- Adam Retter eXist Developer { United Kingdom } ad...@ex... irc://irc.freenode.net/existdb |