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.