Ours & Hippy — le blogOurs & Hippyourshippy@huoc.orgtag:blog.huoc.org,2009:atom2009-09-07T17:14:48+02:00tag:blog.huoc.org,2009:posts/28
xmltools: after the GSoC
2009-09-07T17:14:48+02:002009-09-07T17:14:48+02:00Nhat Minh Lê (rz0)
<p>Since the end of the Summer of Code, I have been busy doing various
miscellaneous tasks around my xmltools, so that it be ready for
inclusion into the NetBSD tree some time in the future. This is
a short summary of what has happened (just so people know that my
project’s not dead, I’ve not vanished, or something along these
lines); please take a look at the code repo for details:
</p><dl><dt>ATF test suites</dt><dd><p>I’ve finally decided to convert my bunch of shell scripts to ATF
tests. These are <em>basic tests</em> which check the various constructs of
the pattern language. There are 46 tests, three of which are
optional (they are made against rather big data sets that I do not
distribute with the sources). These include a test suite centered
around property list matching. If you have relevant test cases and
would like to see them included, please send them over.
</p></dd><dt>Library API</dt><dd><p>Some people had been asking me if there would be a library, well,
yes, and I’ve libified all the existing code in anticipation of
that, and also because I wanted to eventually commit somthing clean
to the NetBSD tree. All routines have been made to support proper
error reporting, and expose clean interfaces. The library is divided
into four main sub-namespaces:<sup>α</sup>
</p><ul><li><code>hhxml_chunk_*</code> : XML in-memory tree manipulations.
</li><li><code>hhxml_stream_*</code> : XML streams and (push-style) parsers. The
streams have a hybrid design: they can be used to read nodes one
at a time in a pure stream fashion or to generate partial
in-memory trees. See <code>misc/atomheadlines.c</code> in the source
distribution for an example.
</li><li><code>hhxml_path_*</code> : patterns and matching. This one is incomplete and
the old <code>match.c</code> will need to be converted to fit into the new
API.
</li><li><code>hhxml_pprint_*</code> : XML pretty printer. The implementation is also
mostly incomplete at this time: it only supports printing to
stdout, well, because the command-line tools don’t require any
more than that.
</li></ul><p>The various parts of the API will be completed as I go about writing
the tools themselves, but I wanted to have clean well-defined
interfaces to build onto.
</p><div class="Notes"><p>α: By the way, "hhxml" stands for "(the) very short XML
(library)".
</p></div></dd><dt>Non-visible changes to the pattern matching engine and plans</dt><dd><p>Well, I’ll write more on this one when I get the time, but I’ve been
looking into other implementations and theories, especially <a class="extern" href="http://spex.sourceforge.net/">SPEX</a>,
which boasts algorithms with good complexities (better than what is
currently implemented in my tools). I have plans for improvements to
the engine which I believe, if I’m not wrong, would bring us similar
performance, but that will have to wait, since it is not critically
important, at the moment, in my opinion.
</p></dd></dl><p>That’s all for today!
</p>