qexo-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: David O'Callaghan
Subject: [Qexo-general] Running queries against user-specified XML files
Date: Thu, 22 Mar 2007 14:52:51 +0000
User-agent: Thunderbird 1.5.0.10 (X11/20070306)

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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]