qexo-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qexo-general] re: XqlServlet and Communication between XQL scripts


From: Per Bothner
Subject: Re: [Qexo-general] re: XqlServlet and Communication between XQL scripts
Date: Wed, 29 Jan 2003 09:48:47 -0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021202

Per Bothner wrote:
Presumably URLs should be relative to the "web-app", but I'm not
sure whether they currently are.  I thought they were ...

Ivelin Ivanov wrote:
Just noticed that you actually use a special QEXO function to prepend the
absolute path to the relative:
 request-servlet-path(). This in effect reads the content of the file, but
will not evaluate it if it is an XQL script, because it will not go through
the servlet engine.

I had thought perhaps the servlet engine would change the "current
directory" for different web applications?  I guess not, since then
it would have to modify the user.dir system property, which is a
global property.

I though about this some.  I think we need semantics more-or-less
like you propose - I'm assuming that means the relative URIs are
resolved relative to the web application root?

However, there are problems with the implementation.  For one,
it makes Document depend on servlets.  For another, I think
we need something more general.  Specifically that the "current
directory" should be part of the per-thread state.  In Kawa
that means hanging it off the current CallContext.  If the
CallContext does not have current directory set, then we need to
fall back to the global user.dir.  There are some complications
dealing with thread inheritance, and it might make sense to
also have an optional per-Interpreter current directory.  But
perhaps those refinements can wait.

I also think I should implement the fn:base-uri(node) function.
I've though about how to represent this information in a TreeList,
and as soon as I have a breather I'll implement it.  Then we can
implement the two-operand 'document', which will also help with
this problem, especially if we also add a 'current-base-uri'
(or whatever) function.
--
        --Per Bothner
address@hidden   http://www.bothner.com/per/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]