Merge branch 'handle-stdout'
[SXSI/xpathcomp.git] / INSTALL
1 Dependencies
2 ------------
3 libexpat-ocaml-dev
4 ocaml-findlib
5 ocaml-ulex
6 ocaml-nox
7 camlp4
8
9 and their dependencies as well as ocamlbuild which is part of the standard ocaml distribution.
10 The "src" directory should contain a copy of the XMLTree source dir (this can be a symbolic to
11 the XMLTree directory).
12
13 Build instructions
14 ------------------
15
16 Build the XMLTree library:
17
18 cd src/XMLTree; make clean all; cd -
19
20 Build the xpathcomp program:
21 ./configure
22 ./build
23
24 See ./build --help to customize the build process (build with debugging/profiling code, build ocaml
25 bytecode instead of native binary etc...).
26
27 This will produce a main.native executable (a symlink to the real binary which lies in the _build/src
28 directory).
29
30 Usage
31 -----
32 ./main.native [options] 'input_file' 'query' [output_file]
33
34 input_file can be either an xml file (and thus the name must have a .xml extension) or an indexed file
35 (with a .srx extension). Due to a bug in the parser, the query can only use the explicit syntax, that
36 is:
37
38 /descendant::a/child::b[ child::a and descendant::c or not(contains( ., "str")) ]/descendant::d
39
40 and no // or a/b/c. Text predicates must be of the form function( ., "string") where function can
41 be: contains, equals, starts-with, ends-with.
42
43 Available options are:
44
45   -c counting only (don't materialize the result set)
46   -f sample factor [default=64]
47   -i index empty texts [default=false]
48   -d disable text collection[default=false]
49   -s save the intermediate representation into file.srx
50   -b real bottom up run
51   -nj disable jumping
52   -index-type {default|swcsa|rlcsa} choose text index type
53   -v verbose mode
54   -help  Display this list of options
55   --help  Display this list of options