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