<div dir="ltr">Dear oxygen-user list,<div><br></div><div>I've constructed an XQuery script for eXist-db that uses the function request:get-parameter(). It works as expected in eXide. I have established a data source connection between <oXygen/> (XML Editor 21.1, build 2019120214, running on MacOS Mojave) and eXist-db (5.0.0) running on localhost, and I can open, edit, and save XQuery scripts from inside eXist-db within <oXygen/>, from which I conclude that the connection is live. Since <oXygen/> apparently cannot use the eXist-db data source connection for debugging, instead of using the <oXygen/> XQuery debugger perspective to run the script I configured a transformation scenario where I specify the localhost eXist-db connection as the Transformer. When I run this script, I get the following error message from <oXygen/>:</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>err:XPDY0002 Variable $request is not bound to an Java object</div></blockquote><div><br></div><div>The function is used in a line that reads:</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>declare variable $story_id as xs:string := request:get-parameter('story', 'x');</div></blockquote><div><br></div><div>I thought at first that the error might be because the "request:" namespace prefix was not declared and bound (eXist-db declares it implicitly), so I added an explicit namespace declaration for it:</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>declare namespace request="<a href="http://exist-db.org/xquery/request">http://exist-db.org/xquery/request</a>";</div></blockquote><div><br></div><div>The error remains. The entire XQuery script is below; it retrieves information from a TEI document, based on a user-supplied resource name, if the document exists and returns an error message otherwise.</div><div><br></div><div>Can someone please help me identify what I have apparently misunderstood about running XQuery scripts in an <oXygen/> transformation scenario using eXist-db as the XQuery transformer?</div><div><br></div><div>Sincerely,</div><div><br></div><div>David</div><div><a href="mailto:djbpitt@gmail.com">djbpitt@gmail.com</a></div><div>__</div><div><br></div><div>xquery version "3.1";<br>declare default element namespace "<a href="http://www.tei-c.org/ns/1.0">http://www.tei-c.org/ns/1.0</a>";<br>declare namespace request="<a href="http://exist-db.org/xquery/request">http://exist-db.org/xquery/request</a>";<br>declare variable $stories as document-node()+ := collection('/db/apps/neh_06_reading_tei/xml');<br>declare variable $story_id as xs:string := request:get-parameter('story', 'x');<br>declare variable $story_filename as xs:string: = concat($story_id, '.xml');<br>declare variable $story as document-node()? := $stories[ends-with(base-uri(), $story_filename)];<br>        <br>if ($story) then<br>    <TEI>{<br>        $story//(titleStmt/title | text)<br>    }</TEI><br>else<br>    <error xmlns="">{concat('No such story:', $story_id)}</error><br></div><div><br></div></div>