• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

XQuery using Zorba XQuery processor.

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

...Can any one tell me how to use execute a file containing XQueries.
I am getting fallowing error.

cboyapat>zorba -q -f /Users/cboyapat/Desktop/sim.xq

<?xml version="1.0" encoding="UTF-8"?>
Error in /Users/pfkeb/zorba/branches/0.9.5-rc1/src/runtime/fncontext/FnContextImpl.cpp:54. Query: <>, line 1, column 2: [XPDY0002] evaluation of an expression relies on some part of the dynamic context that has not been assigned a value: {context item}.


...In the above sim.xq contains fallowing Query

for $i in 1 to 3
return {$i}


...Can any one tell me how to use XQuery using Eclipse.I have downloaded XQDT plugin (Eclipse plugin for XQuery)
and Zorba XQuery processor.I am facing some problem while configuring eclipse to use XQuery.
...I tried to find information about this configuration in google but of no use.

...I appreciate any kind of help.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

XQDT does not need any kind of special configuration. Here, the problem seems to be simply, that your query is wrong: The curly braces are not allowed at this place. The curly braces are used when you want to use XQuery expressions inside XML. So your query would be written as:

for $i in 1 to 3
return $i

If you want a sequence of XML-elements as return value:

for $i in 1 to 3
return <result>{$i}</result>
reply
    Bookmark Topic Watch Topic
  • New Topic