[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Qexo-general] re: XqlServlet and Communication between XQL s cripts
From: |
Tom Reilly |
Subject: |
RE: [Qexo-general] re: XqlServlet and Communication between XQL s cripts |
Date: |
Wed, 29 Jan 2003 14:13:08 -0500 |
+1 on CallContext having the ability to override the current
directory.
It might also be considered to get rid of the notion of a "current
directory" and have the CallContext API be something like:
URL getResource(String)
One example where this would be handy is a web application wrapped
in war where the URL may point to a jar entry.
> -----Original Message-----
> From: Per Bothner [mailto:address@hidden
> Sent: Wednesday, January 29, 2003 12:49 PM
> To: Ivelin Ivanov
> Cc: address@hidden
> Subject: Re: [Qexo-general] re: XqlServlet and Communication
> between XQL scripts
>
>
> 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/
>
>
>
> _______________________________________________
> Qexo-general mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/qexo-general
>
- RE: [Qexo-general] re: XqlServlet and Communication between XQL s cripts,
Tom Reilly <=