From: Joe W. <jo...@gm...> - 2022-11-04 18:09:54
|
Hi Bernie, Your RESTXQ-annotated functions need to go into an XQuery library module, and your eXist instance has to have the RESTXQ trigger enabled on the collection where you store the library module (but it's enabled by default in /db/system/config/db/collection.xconf - the source being at https://github.com/eXist-db/exist/blob/develop/exist-distribution/src/main/config/collection.xconf.init - so you only need to take action if you've disabled this or your library module is in a collection hierarchy with its own collection.xconf). The best reference for RESTXQ and eXist is Erik Siegel and Adam Retter's 2015 O'Reilly book on eXist-db, pp. 215-227 ( https://www.amazon.com/dp/1449337104). If you don't have that you might find Adam's presentation at https://www.adamretter.org.uk/presentations/restxq_mugl_20120308.pdf useful. The best online RESTXQ reference - https://docs.basex.org/wiki/RESTXQ - isn't eXist-specific and in fact may contain some BaseX-specific information that doesn't apply to eXist's implementation. See also the links at the bottom of that page: https://docs.basex.org/wiki/RESTXQ#References. Joe On Fri, Nov 4, 2022 at 1:45 PM Harris, Bernard T. (GSFC-5870) via Exist-open <exi...@li...> wrote: > Is there any more documentation on exist-db’s implementation of RESTXQ? > Specifically, where do I put my xquery code in the db or os file system so > RestXqServlet will find it? Does it need a .xql extension? Thanks. > > > > Bernie > > > > *From: *Joe Wicentowski <jo...@gm...> > *Date: *Friday, November 4, 2022 at 10:48 AM > *To: *"Harris, Bernard T. (GSFC-5870)" <ber...@na...> > *Cc: *"exi...@li..." <exi...@li... > > > *Subject: *[EXTERNAL] Re: [Exist-open] How to enable > requests:get-path-info()? > > > > Hi Bernie, > > > > If you're interested in configuring this within eXist, as opposed to at > the proxy level, there are two ways to expose custom URLs: > > > > 1. URL Rewriting: https://exist-db.org/exist/apps/doc/urlrewrite > <https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fexist-db.org%2Fexist%2Fapps%2Fdoc%2Furlrewrite&data=05%7C01%7Cbernard.t.harris%40nasa.gov%7Cfeb5698eaf6b4fe9f57708dabe737ee7%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C638031701102419684%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=bp3doj8HnzRtwGg1raj1KHcRYAklqrNujNldGss7kDw%3D&reserved=0> > > 2. RESTXQ: https://exist-db.org/exist/apps/doc/xquery#restxq > <https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fexist-db.org%2Fexist%2Fapps%2Fdoc%2Fxquery%23restxq&data=05%7C01%7Cbernard.t.harris%40nasa.gov%7Cfeb5698eaf6b4fe9f57708dabe737ee7%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C638031701102419684%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=NhDxMZt1%2F%2BSs8xVFlkYWpfk%2BAMF8y%2F%2BqdecPws4NQfE%3D&reserved=0> > > > > Joe > > > > On Fri, Nov 4, 2022 at 6:02 AM Harris, Bernard T. (GSFC-5870) via > Exist-open <exi...@li...> wrote: > > I want to have something like /some/path/myfile.xq/extra/path and have > get-path-info() return /extra/path when myfile.xq is executed like the > documentation says. But using such a path returns 404 (not found). My > guess is that this is because of the pattern in > > > > <forward pattern=".*\.(xq|xql|xqy|xquery)$" servlet="XQueryServlet"/> > > > > In controller-config.xml. But I haven’t found anything that works. Is > this the problem? Can someone with more experience configuring exist-db > tell me how to get get-path-info() functioning for this case? Thanks. > > > > Bernie > > > > > > > > > > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open > <https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fexist-open&data=05%7C01%7Cbernard.t.harris%40nasa.gov%7Cfeb5698eaf6b4fe9f57708dabe737ee7%7C7005d45845be48ae8140d43da96dd17b%7C0%7C0%7C638031701102419684%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=vR2QOl1yYAg7o%2B0FrLAeHEUuo5jPwE2X4moMM3zWv1A%3D&reserved=0> > > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open > |