Open christian-schwaderer opened 9 years ago
Just ran into (apparently) the same issue, eXist 4.3.1, with absolute path:
xquery version "3.1"; let $do := xmldb:store-as-binary('/db/apps', 'hi.txt', 'hello world' ) return util:binary-doc('/db/apps/hi.txt')
This returns an empty sequence. The file is created, with text in it.
@mgraauw I see your path in util:binary-doc()
is absolute, not relative. A different issue, perhaps?
Not sure. I get 'empty sequence' on both relative and absolute paths with util:binary-doc, and 'true' on both paths with util:binary-doc-available. Seems to me something is amiss with util:binary-doc, maybe 2 issues, maybe just 1.
I have a test sub-collection with two files: "test.xml" and "test.html5" (the latter stored as binary). Retrieving those files via an XQuery file stored in the very same sub-collection leads to different results.
While
doc('test.xml')
works perfectly,util:binary-doc('test.html5')
fails. Same goes forutil:binary-doc-available('test.html5')
. (The absolute pathutil:binary-doc-available('/db/apps/test/binary/test.html5')
also works, of course.)