Hi Mattijs,
thanks for your mail. I removed a check for empty sequences in our code base that looked obsolete to me [1]. Feel free to check out the latest snapshot [2] and give us some feedback if the problem persists.
Christian
[1] https://github.com/BaseXdb/basex/commit/f98e6200bef66409f3a70a94b0352cc383eb... [2] http://files.basex.org/releases/latest/
___________________________
On Sun, Jun 17, 2012 at 1:50 PM, Mattijs Ugen m.ugen@student.utwente.nl wrote:
Dear all,
Calling methods from a QueryModule works nicely, yet I can't seem to get a particular method signature to work from XQuery. The function in question should be passed a string and the result of a path expression, yielding attribute values as strings. For example:
ns:method($value, $context/ancestor-or-self::*/@some-attr/string())
Intuitively, I figure the signature for this method in the QueryModule should be:
public String method(Str previous, Value additionals) { ...
However, trying to use this method with BaseX won't work. The query editor accepts the syntax, but states "PXML:combine method: no empty sequence allowed".
Changing the signature to Seq, ItemSeq or even Empty changes nothing; it keeps telling me (I think) the expression *could* yield an empty sequence and the method does not support it (even tho Empty is a valid value for Value, is it not?).
How would I define my method so that BaseX will accept it?
Kind regards,
Mattijs Ugen _______________________________________________ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk