next up previous contents
Next: Information Mode Up: Command-Line Arguments Previous: Standard Evaluation Mode   Contents

Extended Evaluation Mode

The extended evaluation mode provides the GCX engine with extended I(nput)/ O(utput) stream options. This means that it is possible that the (input) query and also the (input) XML document comes from different sources. These options also allow to redirect the evaluation result and/or the debug output.

The usage of the extended evaluation mode is

gcx [EXT EVAL MODE]

with

[EXT EVAL MODE] ::= [STREAM SPEC]+ [OPTION]?

With [STREAM SPEC] either

--iqstream [INPUT TYPE] [PARAM]?: input stream type of query
--ixstream [INPUT TYPE] [PARAM]?: input stream type of xml
--oestream [OUTPUT TYPE] [PARAM]?: output stream type of query result
--odstream [OUTPUT TYPE] [PARAM]?: output stream type of debug output

where [INPUT TYPE] is either

file: file input (DEFAULT)
-> when used with --iqstream provide parameter --query <query_file>
-> when used with --ixstream provide parameter --xml <xml_file> (required only if the query does not contain an fn:doc() specification)
null: no input (support only for --ixstream for debugging purposes)
stdin: standard input (either for query or for xml document)

and where [OUTPUT TYPE] is either

file: file output
-> when used with --oestream provide parameter --eout <eval_output_file>
-> when used with --odstream provide parameter --dout <debug_output_file>
null: no output
stdout: standard output (DEFAULT)

Note: If you want to enter/paste the XML document directly into the shell or into the command prompt window you need to signal end-of-file (EOF) of the XML document by typing 2 x Strg + D (if using Linux/Mac OS) or Strg + Z (if using Windows).

In summary, the arguments --iqstream (input query stream), --ixstream (input XML stream), --oestream (output evaluation stream) and --odstream (output debug stream) specify by their option the type of stream you want to use. The additional - if needed - arguments --query (query input stream information), --xml (XML input stream information), --eout (evaluation output stream information) and --dout (debug output stream information) specify by their option further stream information, such as the file where output is written to or the file from which input comes. The optional [OPTION] part is described in Section Debug Options. The following examples show some possible usage.

> gcx --query query.xq --xml doc.xml
-> query input from file query.xq and xml input from file doc.xml
-> query result output to stdout
> gcx -iqstream stdin --xml doc.xml --odstream file --dout debug.out --debug
-> query input from stdin and xml input from file doc.xml
-> debug output to file debug.out and query result output to stdout
> gcx --query query.xq --xml doc.xml --oestream file --eout result.xml --odstream null --debug
-> query input from file query.xq and xml input from file doc.xml
-> discard debug output and query result output to file result.xml


next up previous contents
Next: Information Mode Up: Command-Line Arguments Previous: Standard Evaluation Mode   Contents