<div dir="ltr"><div dir="ltr">Thank you, Joe! Roy's work-around does what I need.</div><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Date: Sun, 29 Dec 2019 17:35:37 -0500<br>
From: Joe Wicentowski <<a href="mailto:joewiz@gmail.com" target="_blank">joewiz@gmail.com</a>><br>
To: <a href="mailto:oxygen-user@oxygenxml.com" target="_blank">oxygen-user@oxygenxml.com</a><br>
Subject: Re: [oXygen-user] eXist-db in <oXygen/>?<br>
Message-ID:<br>
        <<a href="mailto:CAHwerk3DS0W5ZLU36v6dUQinCXJYrhUCVuc4%2BAJhtecD946VNQ@mail.gmail.com" target="_blank">CAHwerk3DS0W5ZLU36v6dUQinCXJYrhUCVuc4+AJhtecD946VNQ@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hi David,<br>
<br>
Let me quote from Adam Retter's response to a similar question on<br>
exist-open[^1]:<br>
<br>
> The issue you have is that the Request object only makes sense when your<br>
XQuery is run by eXist-db's webserver, this is because the "request" is the<br>
incoming HTTP request. When running via oxygen there is no HTTP request.<br>
<br>
The same factor affects other utilities that talk to eXist via XML-RPC,<br>
such as the Java Admin Client.  makes sense, because the oXygen data source<br>
connection that is responsible for executing eXist queries uses the XML-RPC<br>
protocol.  See the attached screenshot.<br>
<br>
In the same thread, Roy Walter suggested a workaround: using the<br>
3-parameter variant of the request:get-parameter function, in which the 3rd<br>
parameter instructs the function whether to fail on error or not.[^2]  If<br>
you change your use of the function to:<br>
<br>
```<br>
request:get-parameter('story', 'x', false());<br>
```<br>
<br>
... then the function will return "x" when it otherwise would raise an<br>
error.<br>
<br>
Best,<br>
Joe<br>
<br>
[^1]: <a href="https://markmail.org/message/afds3uvbbouees7a" rel="noreferrer" target="_blank">https://markmail.org/message/afds3uvbbouees7a</a><br>
[^2]: <a href="https://markmail.org/message/offwjsqd46fcofqc" rel="noreferrer" target="_blank">https://markmail.org/message/offwjsqd46fcofqc</a>\<br></blockquote><div> <br></div></div></div>