Hi,
I’ve just pushed a few big patches for the citeproc-hs effort. Now
there’s a cls file parser, which means we can start looking at the
actual evaluation of real styles.
While the parser is complete - it should generate a complete
representation of the style (there may be quite a few bugs,
though… - the formatting is far from being complete, obviously.
I’ve also overhauled the test script, which can be now compiled into a
binary that support a few options: you can test a csl file, alone or
together with a locale file (if the csl file doesn’t contain a
’terms’, you will not see terms and label expanded), and you can dump
the internal style representation.
To give it a try:
cd test
ghc --make -i…/src test.hs
and then run:
./test -h
A few example: to process the hasrvard.xml with locales-it-IT.xml run:
./test -l locales-it-IT.xml harvard.xml
if you want to dump the internal representation:
./test -d -l locales-it-IT.xml harvard.xml
In the next few days I’ll start working at the formatting engine.
Cheers,
Andrea
PS: a few words about the parser: it is not meant to be used for
debugging citation styles, since it won’t report errors (it will
silently fail on bad files). It’s been implemented with the pickler
combinator library of the Haskell XML Toolkit, which is a required
dependency, now. The dump of the internal representation of the style
requires the package “haskell-src” which should come by default in a
standard GHC installation.