On 06/29/2011 11:30 AM, Dmitriy Shabanov wrote:
if you running script from db importing relative paths should be resolved correct, do you have problem or didn't try?

I tried three things:
1. run script from db using the REST interface: works
2. run script from the admin client: requires xmldb:exist:/// in the import path
3. run script from the scheduler (off the db): requires xmldb:exist:/// in the import path

-Efraim


On Tue, Jun 28, 2011 at 3:07 AM, Efraim Feinstein <efraim.feinstein@gmail.com> wrote:
On 06/27/2011 10:51 AM, Dmitriy Shabanov wrote:
eXist version?

Updated trunk (it was at the beginning of the thread, but didn't get copied). The answer my question was in SourceFactory.java



On Mon, Jun 27, 2011 at 6:57 PM, Efraim Feinstein <efraim.feinstein@gmail.com> wrote:
On 06/27/2011 08:28 AM, Efraim Feinstein wrote:
> On 06/27/2011 02:42 AM, Adam Retter wrote:
>> have you tried?
>>
>> ... at "xmldb:exist:///db/PATH";
>
> It works, but the current behavior is inconsistent. If the query is
> run through REST, /PATH and /db/PATH both work. Is an absolute path
> required?

To answer my own question, it looks like the current answer is "yes."
eXist assumes all imports come from the filesystem unless there's an
explicit xmldb uri and the REST servlet automatically adds it from the
context(?), but running from the scheduler or the admin client doesn't.

A query written directly in the admin client has no context, but I would
have expected the scheduler or a query util:eval-ed to behave
differently if either query were loaded from the db. On the other hand,
maybe that's what "inherits the caller's context" means in the
util:eval() documentation?


--
Dmitriy Shabanov


-- 
---
Efraim Feinstein
Lead Developer
Open Siddur Project
http://opensiddur.net
http://wiki.jewishliturgy.org