Welcome to the home of HyQuery, the XQuery XLink implementation

Home | Documentation | Downloads | Contact
 
Documentation
A documentation is being prepared. Meanwhile, read the comments provided in the hyQuery module.
Limitations / Requirements
The hyQuery module uses dynamic XQueries. These are not part of the XQuery recommendation. At the moment, the module uses util:eval(), a function of the eXist XML database. If your favored database has another function for dynamic queries, the module can easily be adapted to it by replacing the call to util:eval() in hyQuery's resolveHRef() function. If you can't use dynamic queries, you can use third-party functions like dynamic-path() (http://www.xqueryfunctions.com/xq/functx_dynamic-path.html), but this one only supports simple XPaths.
Using hyQuery with the eXist XML database
eXist is a quite good native XML database. It has been used during the development of the hyQuery module, so using eXist is the easiest way for trying out hyQuery. A link to the eXist site is provided under "Downloads". After installing eXist, copy the hyQuery module to exist/lib/user/ in your eXist installation directory. Then you can use it in your XQueries with the following declaration in the XQuery prologue:

import module namespace hq="http://www.ai-studium.de/hyquery" at "file:///C:/exist/lib/user/hyquery.xq";

Here is an example for a XQuery using the hyQuery function follow():

for $v in doc('/db/uni/vorlesungen.xml')/vorlesungen/vorlesung
return hq:follow($v/dozent)