-<xlog server="chat.freenode.net" channel="#existdb" date="2008-02-18">
<join host="189.78.206.20" login="n=no" nick="laubstein" time="02:11:20.184Z"/>
<part host="189.78.206.20" login="n=no" nick="laubstein" reason="Client Quit" time="02:11:28.645Z"/>
<part host="24-177-122-198.dhcp.mdsn.wi.charter.com" login="i=ynadji" nick="djkthx" time="03:29:32.543Z"/>
<join host="77-57-46-63.dclient.hispeed.ch" login="n=root" nick="twu" time="04:52:08.163Z"/>
<part host="77-57-46-63.dclient.hispeed.ch" login="n=root" nick="twu" reason="Client Quit" time="04:52:42.57Z"/>
<join host="p5B20EA3F.dip.t-dialin.net" login="n=wolf" nick="wolf77" time="08:13:00.262Z"/>
<join host="81-208-83-237.fastres.net" login="n=[giulio]" nick="[giulio]" time="08:24:26.043Z"/>
<join host="62.232.6.162" login="n=XIRCProx" nick="perig" time="08:43:57.334Z"/>
<message nick="perig" time="08:48:02.717Z">hi</message>
<message nick="wolf77" time="08:48:21.883Z">Morning</message>
<message nick="perig" time="08:53:05.869Z">So, some pregress with in-memory nodes ?</message>
<message nick="perig" time="08:53:15.582Z">prOgress :-)</message>
<message nick="wolf77" time="08:54:05.17Z">I didn't work much on it yesterday, but the branch looks ok. Now we need some serious testers.</message>
<message nick="perig" time="08:57:36.477Z">Adam seems pretty concerned by in-memory nodes :-)</message>
<join host="62.232.6.162" login="n=XIRCProx" nick="chrisww" time="10:10:53.819Z"/>
<message nick="chrisww" time="10:11:10.932Z">[object Object]</message>
<message nick="chrisww" time="10:11:58.927Z">[object Object]</message>
<part host="62.232.6.162" login="n=XIRCProx" nick="chrisww" time="10:12:21.208Z"/>
<join host="216.138.230.22" login="n=Snak" nick="polvo" time="11:25:03.022Z"/>
<join host="host81-139-40-154.in-addr.btopenworld.com" login="n=cefn" nick="cefn" time="12:17:50.473Z"/>
<message nick="cefn" time="12:22:21.181Z">I'd like to know how to load files from the filesystem where the xquery documents are stored, or how to get meaningful errors. Can I force exist to report where it's looking for documents? I want to load the document from ../schema/user.rng relative to the location of the currently executing xquery file. The file is there, but my doc("../schema/user.rng") returns nothing and no errors.</message>
<message nick="cefn" time="12:25:39.861Z">what's the proper way to load a document from the webserver's filesystem (not xmldb), and get useful errors if they are missing?</message>
<message nick="cefn" time="12:32:49.123Z">My colleague previously bypassed the problem by putting the documents into xmldb, but these files are editable schemas, and best available directly in the build directory for validating GUI editors to load and save them. Can't believe it's not possible to load a file!</message>
<message nick="perig" time="12:53:34.866Z">it is :-)</message>
<join host="80.187.220.55" login="i=johndoe" nick="wolf77" time="13:13:03.524Z"/>
<part host="80.187.220.55" login="i=johndoe" nick="wolf77" reason="Remote closed the connection" time="13:44:53.167Z"/>
<part host="host81-139-40-154.in-addr.btopenworld.com" login="n=cefn" nick="cefn" reason="" time="14:35:16.784Z"/>
<join host="host81-139-40-154.in-addr.btopenworld.com" login="n=cefn" nick="cefn" time="14:48:07.931Z"/>
<message nick="cefn" time="14:54:51.189Z">hi perig, would be great to hear how to address xml files relative to xquery files in the filesystem, or get useful errors when trying to use doc("../schema/user.rng") </message>
<message nick="cefn" time="14:54:58.469Z">I was away for a while </message>
<message nick="cefn" time="14:56:30.754Z">i was looking into using webdav to mount the filesystems inside the database, but it's a nasty hack</message>
<message nick="perig" time="15:04:09.837Z">cefn : do you know our function library which offers some convenience XQuery functions to perform a lot of things, including file upload ?</message>
<message nick="cefn" time="15:05:20.573Z">I understand some aspects of filesystem networking in eXist, but in this case I'm merely aiming to access the filesystem inside the webapp directory directly. The files are already there, but I can't seem to address them using the doc(...) function.</message>
<message nick="cefn" time="15:06:11.823Z">I must be missing some kind of protocol prefix or something</message>
<message nick="perig" time="15:08:53.723Z">Simply bad URLs ?</message>
<message nick="cefn" time="15:10:26.409Z">Could you give me an example of a valid one for addressing files inside the webapp directory. I don't want them to be served by the webserver. This could be a security issue in principle.</message>
<message nick="cefn" time="15:10:43.732Z">So that means I don't want to use http://</message>
<message nick="cefn" time="15:10:50.612Z">file:// gives errors</message>
<message nick="cefn" time="15:11:09.397Z">and leaving it as a relative path ../schema/user.rng gives me nothing</message>
<message nick="perig" time="15:12:21.235Z">file:// is definitely what you want</message>
<message nick="cefn" time="15:12:43.906Z">but can't use relative paths?</message>
<message nick="perig" time="15:12:51.676Z">see the source code of, say, webapp/admin/setup.xqm</message>
<message nick="cefn" time="15:13:06.516Z">will look at that back soon</message>
<message nick="perig" time="15:13:28.406Z">not sure about relative paths</message>
<message nick="cefn" time="15:13:33.833Z">that's the problem</message>
<message nick="cefn" time="15:13:50.376Z">I don't want to create a snapshot of the server build inside the software itself</message>
<message nick="perig" time="15:14:26.144Z">I've understood :-)</message>
<message nick="cefn" time="15:15:35.729Z">setup:importLocal gives some good pointers using exist's home directory, though relative would be preferred</message>
<message nick="perig" time="15:17:34.24Z">As I've said, I not sure you can use relative paths : we definitely lack some efficient and easy to use resolvers in eXist.</message>
<message nick="cefn" time="15:17:56.961Z">I'll use the workaround with exist home. Bit messy but functional.</message>
<message nick="cefn" time="15:18:17.759Z">thanks for the pointer</message>
<message nick="perig" time="15:19:20.705Z">you're welcome</message>
<message nick="perig" time="15:22:08.683Z">it might also be possible to use resolve-uri() taking your XQuery's URI as the base URI</message>
<message nick="cefn" time="15:22:48.997Z">yes, I've used that with XSLT before, and didn't think about it for this case - good plan</message>
<message nick="perig" time="15:23:04.178Z">I think so :-)</message>
<message nick="cefn" time="15:25:34.562Z">any idea which URI would be imported when a function is called inside a module (the module's URI or the containing doc)?</message>
<message nick="cefn" time="15:25:47.63Z">sorry 'reported' not 'imported'</message>
<message nick="cefn" time="15:34:23.681Z">does base-uri report the URI of the doc being processed, and static-base-uri report the URI of the doc which imports it?</message>
<message nick="cefn" time="15:46:35.715Z">Apparently can't introspect the URI of the executing xquery document itself (searching eXist function names for 'doc' or 'uri' doesn't show up anything useful)</message>
<message nick="perig" time="16:27:39.041Z">the static context's base URI should make it though... </message>
<message nick="cefn" time="16:28:39.523Z">The static-base-uri inside an XQuery evaluation shows up as xmldb://existEmbedded/db or something like that. Seems to have nothing to do with the filesystem</message>
<message nick="perig" time="16:29:12.848Z">... which looks lika a bug then</message>
<message nick="cefn" time="16:29:21.55Z">where should I file it?</message>
<message nick="perig" time="16:29:38.773Z">In the bug tracker ?</message>
<message nick="cefn" time="16:29:49.418Z">will do</message>
<message nick="perig" time="16:30:15.353Z">However, this bug is more likely to be fixed if you provide a test case (that could ideally be patched on our test suite)</message>
<message nick="cefn" time="16:30:25.246Z">yup</message>
<message nick="perig" time="16:31:09.076Z">bugs without test cases can remain open... quite a long time</message>
<message nick="perig" time="16:31:50.422Z">have to go : see you</message>
<message nick="cefn" time="16:32:00.536Z">thanks for your help, perig</message>
<part host="62.232.6.162" login="n=XIRCProx" nick="perig" time="16:33:15.067Z"/>
<join host="abzh172.neoplus.adsl.tpnet.pl" login="n=Miranda" nick="receptor" time="16:38:37.415Z"/>
<join host="vil35-2-82-236-174-106.fbx.proxad.net" login="n=perig" nick="perig" time="17:12:34.572Z"/>
<part host="81-208-83-237.fastres.net" login="n=[giulio]" nick="[giulio]" reason="Read error: 104 (Connection reset by peer)" time="17:14:10.272Z"/>
<part host="abzh172.neoplus.adsl.tpnet.pl" login="n=Miranda" nick="receptor" reason="Read error: 110 (Connection timed out)" time="17:39:19.151Z"/>
<join host="napoleon.demon.nl" login="n=Wolfgang" nick="wolf77" time="17:40:25.301Z"/>
<message nick="wolf77" time="17:44:57.4Z">Hi again, this time from Amsterdam. Going to visit some eXist users tomorrow.</message>
<part host="napoleon.demon.nl" login="n=Wolfgang" nick="wolf77" reason="Read error: 104 (Connection reset by peer)" time="18:03:36Z"/>
<part host="host81-139-40-154.in-addr.btopenworld.com" login="n=cefn" nick="cefn" reason="" time="18:17:06.891Z"/>
<part host="vil35-2-82-236-174-106.fbx.proxad.net" login="n=perig" nick="perig" reason="Read error: 104 (Connection reset by peer)" time="21:21:58.084Z"/>
<join host="host81-152-244-98.range81-152.btcentralplus.com" login="n=cefn" nick="cefn" time="22:50:08.301Z"/>
<part host="host81-152-244-98.range81-152.btcentralplus.com" login="n=cefn" nick="cefn" reason="" time="23:34:22.276Z"/>
</xlog>