When debugging complex XQuery expressions, we frequently encounter errors such as these
[XPTY0004] Invalid cast from empty-sequence to string: ()
when an XPath expression evaluates to an empty sequence. When using BaseX's XQJ implementation, the line and column number fields of the corresponding XQQueryException are both 0. This lack of pinpointed information makes debugging the Xquery expression time consuming. It would be tremendously helpful if the exception contained more information about the source of the empty sequence that's causing the XPTY0004 error.
Also, if I weren't to use BaseX's XQJ implementation, would I be receiving more helpful error messages?
- Godmar
basex-talk@mailman.uni-konstanz.de