Thanks Geert! Will give it a shot. -Ankur On Feb 11, 2012, at 12:59 AM, Geert Josten wrote:
> Hi Ankur, > > The endpoints config is written in your XQuery. No reason why not build it > dynamically. For instance: > > declare variable $root-dir := '/config/' > declare variable $endpoints:ENDPOINTS as element(rest:options) := > <options xmlns="http://marklogic.com/appservices/rest"> > <request uri="^/?$" endpoint="{$root-dir}index.xqy" > user-params="allow"> > <http method="GET"/> > </request> > > <request uri="^/explore/?$" endpoint="{$root-dir}explore.xqy" > user-params="allow"> > <param name="page" as="integer" required="true" default="1"/> > <http method="GET"/> > </request> > > .... > </options> > > Kind regards, > Geert > >> -----Oorspronkelijk bericht----- >> Van: [email protected] [mailto:general- >> [email protected]] Namens Ankur Patwa >> Verzonden: vrijdag 10 februari 2012 18:45 >> Aan: MarkLogic Developer Discussion >> Onderwerp: [MarkLogic Dev General] Relative paths with REST library >> >> Hello all, >> We are using the REST Endpoint Library for routing the requests. >> I was curious if it is possible to perform relative routes .i.e > directory-level >> routing so that we can host some static files without having to define > an explicit >> path for each file. >> >> Thanks in advance! >> >> Best, >> Ankur >> >> NOTICE OF CONFIDENTIALITY: This electronic message, including > attachments, >> is for the sole use of the named recipient and may contain confidential > or >> privileged information protected by State of Tennessee and Federal > regulations. >> Any unauthorized review, use, disclosure, copying or distribution is > strictly >> prohibited. If you are not the intended recipient or have received this >> communication in error please contact the sender or email >> [email protected] and destroy all copies of the original message. > Thank >> you. >> _______________________________________________ >> General mailing list >> [email protected] >> http://developer.marklogic.com/mailman/listinfo/general > _______________________________________________ > General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general NOTICE OF CONFIDENTIALITY: This electronic message, including attachments, is for the sole use of the named recipient and may contain confidential or privileged information protected by State of Tennessee and Federal regulations. Any unauthorized review, use, disclosure, copying or distribution is strictly prohibited. If you are not the intended recipient or have received this communication in error please contact the sender or email [email protected] and destroy all copies of the original message. Thank you. _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
