Quip Keyword problems: "ITEM"

Hello out there.

I am using Quip in the latest version (2.2.1.1).

I am having trouble with my xml file. It seems to me that the problem occurs because of some tags with the name “ITEM” in the xml file. When I change the tag-name to e.g. “ITE”, my query works.

Can somebody confirm this?

My XML-Document:

<?xml version="1.0" encoding="UTF-8"?>
<BOOKLIST>
<BOOKS>
Our books are actually ITEMs.
        <ITEM CAT="S">
                <TITLE>Number, the Language of Science</TITLE>
                <AUTHOR>Danzig</AUTHOR>
                <PRICE>5</PRICE>
                <QUANTITY>3</QUANTITY>
        </ITEM>
        <ITEM CAT="U" TAX="12.5">
                <TITLE>Design Patterns</TITLE>
                <AUTHOR>Erich Gamma</AUTHOR>
                <PUBLISHER>Addison Wesley</PUBLISHER>
                <PRICE>60.99</PRICE>
                <QUANTITY>2</QUANTITY>
        </ITEM>
</BOOKS>
</BOOKLIST>
 </pre> <BR><BR>My XQuery:<BR> <pre class="ip-ubbcode-code-pre">
<bib>
{ for $b in document("books.xml")//ITEM
  return <book> {$b/title} </book> }
</bib>
</pre> (Replace "ITEM" with some other string e.g. "ITE" to make it work).<BR><BR>Another question:<BR>I am using the command line interface and want to use the option -input . Can I leave out the <pre class="ip-ubbcode-code-pre">document("books.xml")

then? This does not seem to work here.

Thanks for your help.

I forgot to insert the error message when I change from “ITE” to “ITEM” in the query (no other changes, with “ITE” it works!):

<quip:ExecutionError xmlns:quip="http://namespaces.softwareag.com/tamino/quip/">
  <quip:queryFile>books.xquery
  </quip:queryFile>
  <quip:message><![CDATA[Error (3,34): return clause missing
    actual token found: //
]]></quip:message>

Hi Sebastian,

try :ITEM instead of ITEM in the query, since ITEM is interpreted as a keyword. This is a bug since XQuery requires the keywords to be all in
lower-case characters. In QuiP the colon might still be used for that purpose but with the actual draft, this is deprecated.

Regards,
Juliane.