Charles,

I think the simplest way to show you how index.xql displays the page is to show you the listing of index.xql since it is very short:
-----------------------------------------------------------------------
declare namespace dc="http://purl.org/dc/elements/1.1/";;
declare namespace mets = "http://www.loc.gov/METS/";;
declare namespace xlink = "http://www.w3.org/1999/xlink";;
declare namespace dcterms = "http://purl.org/dc/terms/";;
declare namespace xslt="http://exist-db.org/xquery/transform";;
declare namespace util="http://exist-db.org/xquery/util";;

let $xsl := doc('/db/stylesheets/index.xsl')
let $dcNS := "declare namespace dc='http://purl.org/dc/elements/1.1/'; "
let $metsNS := "declare namespace mets = 'http://www.loc.gov/METS/'; "
let $dctermsNS := "declare namespace dcterms = 'http://purl.org/dc/terms/'; "
let $namespaces := concat($dcNS, $metsNS, $dctermsNS)

let $q1 := "for $collections in collection('/db/mets/collections')/mets:mets order by $collections//dc:date descending return <div>{$collections//dc:identifier, $collections//dc:title, $collections//mets:[EMAIL PROTECTED] = 'featured']}</div>"
let $query := concat($namespaces, $q1)

let $queryResult := <featured>{util:eval($query)}</featured>
let $featured :=
<featured>
       {
          $queryResult/child::*[position() le 4]
       }
</featured>

return xslt:stream-transform($featured, $xsl, () )
------------------------------------------------------------------------------
When I say, "the page itself works fine," I mean, if I type the address as "http://<server name>/exist/index.xql", that works fine.

Kor

Caldarale, Charles R wrote:
From: Kor Kiley [mailto:[EMAIL PROTECTED] Subject: Re: Switching default index page from xml to xql

The default eXist welcome page is index.xml. The media librarian working on the project has created an index.xql which she would like to be the welcome page. The page itself works fine but we don't know how to make it execute,
by default, instead of an index.xml or index.jsp, etc.

What mechanism is used to render XQL into something visible?  Is there a
servlet that has to be run inside Tomcat (analogous to the JSP servlet
which turns .jsp files into servlets and runs them to generate html), or
is there some application on the client end that receives XQL and does
something with it?  If it's the former, you'll need servlet mapping in
your web.xml to direct the request to the proper handler; if the latter,
you'll need to add mime mapping to your web.xml to let the client know
what to do with the data stream.

When you say "the page itself works fine" what do you mean?  What are
you doing to exercise it?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
Kor Kiley
UVM Libraries Systems
Bailey/Howe Library
University of Vermont
(802)656-8290


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to