Determining whether a function exists
Howdy -- I'm trying to determine whether sql:execute-prepared exists, to have a module that functions in both BaseX 7.3 and 7.5. However -- exists(function-lookup(xs:QName("sql:execute-prepared"), 2)) returns false even in BaseX 7.5, even though function-name(function-lookup(xs:QName("sql:execute-prepared"), 2)) properly returns "sql:execute-prepared". Am I going to have to use a try block to detect this case?
You're right -- it does always give true. However, exists(function-lookup(xs:QName("sql:i-do-not-exist"), 2)) also returns true 100% of the time. On Mon, Jan 14, 2013 at 6:03 PM, Christian Grün <christian.gruen@gmail.com>wrote:
Hi Charles,
exists(function-lookup(xs:QName("sql:execute-prepared"), 2))
interesting one; this always gives me true, no matter how desperately I try; do you have some more hints how to make this happen? Are you sure you tried it with 7.5?
Christian
However, exists(function-lookup(xs:QName("sql:i-do-not-exist"), 2)) also returns true 100% of the time.
True 100%; fixed in the latest snapshot [1]. Christian [1] http://files.basex.org/releases/latest/
participants (2)
-
Charles Duffy -
Christian Grün