Sorry if this is not the appropriate forum, but I couldn’t find a better place to report bugs in QuiP.
Quip 2.2.1.1 dislikes elements.
The query:
let $d := document(“quip-bug.xml”),
$from := $d/Flight/From/text(),
$to := $d/Flight/To/text()
return
{$from}
{$to}
on document (quip-bug.xml):
<?xml version="1.0"?>
LAX
IAD
fails with error:
<?xml version="1.0" encoding="UTF-8" ?>
<quip:ExecutionError xmlns:quip=“http://namespaces.softwareag.com/tamino/quip/”>
quip:queryFile/tmp/Query47860.tmp
</quip:queryFile>
quip:message<![CDATA[Error (3,21): return clause missing
actual token found: /
]]></quip:message>
</quip:ExecutionError>
If you remove the selection of the element from the query, it works fine. If you change “To” to any other name, it works.
I tested both on Linux (RH 7.3) and Windows 2000, with QuiP giving an error in both cases.
Thanks for reporting this.
The XQuery grammar has been slowly moving towards a position of having no reserved words, but there can still be some problems using language keywords as element names.
If you want to use a keyword in an XPath expression, try “escaping” it by prefixing it with an empty axis, i.e., just a colon:
$to := $d/Flight/:To/text()