Hi Everybody

@Leo, there might be a bug in the BaseX INLINER (I am currently profiling your module https://github.com/LeoWoerteler/xq-modules/). 

To reproduce it :
- use the 3 files attached.
- Edit baseX config file .baseX, set the following Local options :
# Local Options
INLINELIMIT = 5
- launch the XQUERY file MapProfiler.xquery. With these settings, the profile function works finely.

Then
- Edit baseX config file .baseX, set the following Local options :
# Local Options
INLINELIMIT = 6

With these settings, I am raising a  [XPTY0004] Single item expected error.

Cheers,

Jean-Marc