[email protected]
[Top] [All Lists]

[Qexo-general] Running queries against user-specified XML files

Subject: [Qexo-general] Running queries against user-specified XML files
From: David O'Callaghan
Date: Thu, 22 Mar 2007 14:52:51 +0000
Hi,

Is it possible to use Qexo to run a query in an xql file against a
user-specified XML file? All the xquery examples I have found contain
hard-coded references to the document, like 'let $doc :=
doc("somedoc.xml")'. I would like to either be able to pass an XML
document on standard input to Qexo, or pass a file name as a command
line argument which can be used within the query.

For example,
  $ qexo -f myquery.xql < myfile.xml
  <result>...</result>
or
  $ qexo -f myquery.xql -- myfile.xml
  <result>...</result>

And in the xql file, something like:
  let $doc := doc(stdin())
or
  let $doc := doc(args(1))

Is this kind of thing possible?

Kind regards,

David




_______________________________________________
Qexo-general mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/qexo-general

<Prev in Thread] Current Thread [Next in Thread>