Get XQilla at SourceForge.net. Fast, secure and Free Open Source software downloads

XQilla : CommandLine

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: Login/Register

XQilla Command Line Tool


The "xqilla" command line tool can be used to run XQuery and XPath 2 expressions. It is also a good example of how to use the Simple API.

Usage: xqilla [options] <XQuery file>...

-h                : Show this display
-p                : Parse in XPath 2 mode (default is XQuery mode)
-P                : Parse in XPath 1.0 compatibility mode (default is XQuery mode)
-s                : Parse XSLT 2.0
-f                : Parse using W3C Full-Text extensions
-u                : Parse using W3C Update extensions
-e                : Parse using XQilla specific extensions
-d                : Run the query in interactive debugging mode
-x                : Use the Xerces-C data model (default is the FastXDM)
-i <file>         : Load XML document and bind it as the context item
-b <baseURI>      : Set the base URI for the context
-v <name> <value> : Bind the name value pair as an external variable
-o <file>         : Write the result to the specified file
-n <number>       : Run the queries a number of times
-q                : Quiet mode - no output
-t                : Output an XML representation of the AST



CategoryDocumentation
 Comments [Hide comments/form]
You need to add some command line examples, and a few test.xqy files. I created 2 test xquery files ( each one liners --> <i><hello_world/></i> AND <i>1 to 10</i> ) -- both through an error of "Caught unknown exception".

What am I doing wrong? I've copied the xqilla.exe, xqilla22.dll and xerces-c_3_0.dll to new directory, opened a command prompt and tried to execute the tests. If I just type in xqilla, I get the help, but I can't execute these one line xqueries. HELP!!!
-- localhost.localdomain (2009-01-15 21:38:15)
P.S. I am using a Win32 build performed with Visual Studio 2008.
-- localhost.localdomain (2009-01-15 21:40:58)
This works:

D:\Documents and Settings\Administrator\My Documents\projects\dev\XQilla-2.1.3\build\windows\VC8\Win32\Debug>xqilla -b c:\temp\ -i reports1.xml c:\temp\xquery.txt
-- localhost.localdomain (2009-01-16 17:05:23)
I've got a query with a document parameter, but the command line:
xqilla -b e:/xml my.xqy -v doc1 1.xml

does not work. I get

E:\GD\data\feed\current\Spokane.Tomlinson\0-cmd/xml/my.xqy:1:1: error: The value for the global variable doc1 does not match the declared type:
Sequence does not match type document-node(element(*, xs:untyped)) - found item of type {http://www.w3.org/2001/XMLSchema}untypedAtomic [err:XPTY0004]
declare variable $doc1 as document-node(element(*,xs:untyped)) external;
^

How do you pass a document in as a parameter? I actually will have two documents as parameters, so the -i will not work for me. I've tried several variations, including:
1) changing \ to / in the base (BTW, which one is appropriate for directories???)
2) file://1.xml, file:///1.xml, "file:///1.xml", doc("file:///1.xml")

Help!!!
-- localhost.localdomain (2009-01-24 23:01:24)
Hi All,

The xqilla-user mailing list is a better place to ask questions. The above question was answered there a while ago.
-- JohnSnelson (2009-02-12 10:28:36)
Mailing list search is available here:

http://sourceforge.net/search/?group_id=152021&type_of_search=mlists

If you don't find the answer, please join the mailing list and ask a question. By all means add an FAQ item if you get a chance - this website is a wiki, and help is greatly appreciated.
-- JohnSnelson (2009-05-12 13:16:22)
Powered by Wikka Wakka Wiki 1.1.6.0
Page was generated in 0.0400 seconds