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