Hi Bridger,
Sorry for letting you wait.
is there a way to selectively process based on the path `top-level/dir-a`?
This should work (as long as you have a static path pattern):
db:open('test-db', 'top-level/dir-a') collection('test-db/top-level/dir-a')
for $doc in fn:collection('test-db') return switch(db:path($doc)) case fn:matches(.,'dir-a') return <something/> detault case <something-else/>
but db:path returns a sequence.
Are you sure? This would be a bug then (the function is expected to always return a single string). Do you have a little example?
Cheers, Christian