qexo-general
[Top][All Lists]
Advanced

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

Re: [Qexo-general] New XQuery article (modules support)


From: Per Bothner
Subject: Re: [Qexo-general] New XQuery article (modules support)
Date: Tue, 30 Dec 2003 13:48:25 -0800
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.5) Gecko/20031007

Jun Yu wrote:

It is very nice Qexo 1.7.90 can support modules. But I still not clear how
to use it. Perhaps I did not explain clearly what I need.  The function
"#include" I need means: In one Xql file can "include" another Xql
filename.

I don't see what your problems has to do with "#include".  The XQuery
specification defines "library modules" that (in Qexo) can be separately
compiled.  I mentioned modules because they serve the purpose of
separating definitions into a separate file, like #include does.

Because I want to store configuration information such as Path information
in an XML file.

Well, there is the standard web.xml file.  If you want to do something
different, you can of course, but you may have to do some experimentation.

Then define an Xql file or function to get the path
information.

Place library constants and functions in a "library module".

Finally all other Xql files can "include" this file to get
the Path information.

Other files can import a library module.


But I check the article "Generating XML and HTML using XQuery" again.
You used request-servlet-path() to get the reuqest URL, that is
"http://.../~jyu/dbis/";, right ?

No, it only gets the servlet path (the request's getServletPath),
which is only part of the URI. See http://www.gnu.org/software/qexo/servlet.html

And servlet-context-realpath() to get the root directory of the
application, that is "/home/jyu/.../jakarta-tomcat-4.1.27/webapps/dbis/",
right ?

I believe so.

It seems that you put your XML files into the root directory of the
application.
But if I do, it does not work. I have to put all my XML files into
"/home/jyu/public_html/dbis/".  "/public_html" is the default directory to
store HTML files in Suse Linux.

But that is only for Apache.  For Tomcat it depends on how you configure
your web application.

It's been a while since I really played with this, and I'm concentrating
on module issues, so I can't give off-the-top-of-my-head answers about
servlets right now.
--
        --Per Bothner
address@hidden   http://per.bothner.com/






reply via email to

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