Anyway, regarding your issue:for $doc in collection('test/dir')return base-uri($doc)
might do the trick.for $doc in collection('test/dir')return replace(base-uri($doc),'file:/path/foo/bar/','')
I tried many ways how to specify target - without and with slash and backslash - no change.Is there any way to manage that?Jan VlčinskýPS: Be sure this is not a problem if it is not possible. it would be only a bit nicer.