Libxml-clisp

Libxml-clisp is an interface from CLISP to libxml2. The following paragraphs briefly describe the interface. Libxml-clisp is under development, and provides only rather basic facilities at the moment.

Aim

Libxml-clisp seeks to provide an interface from CLISP to the XML processors in libxml2, using the CLISP foreign function interface (FFI). It is hoped that once complete, it will provide a reasonably high-level interface to libxml2, freeing the CLISP user from dealing with low-level problems that arise when using C libraries, such as manually managing memory and other resources.

Availability

Libxml-clisp is hosted at Savannah, and is distributed under the FreeBSD license. The license details are in the file COPYING, which can be found in the top directory of the distribution. Libxml-clisp releases are signed with the author's GnuPG key.

The most recent released version of libxml-clisp is 0.1.0, and is available as a tarball (with GnuPG signature) at the project download site.

The current code is available in a Mercurial repository at Savannah, and can be viewed in the Web interface to the repository. The code can be downloaded using the following Mercurial command:

hg clone http://hg.savannah.nongnu.org/hgweb/libxml-clisp/

Installation

Libxml-clisp comes with an ASDF system definition file, libxml-clisp.asd, which can be found in the top directory of the distribution. As usual, the user has to create a symbolic link to that file from one of the directories in asdf:*central-registry*. After a CLISP session has been started, and after ASDF has been loaded, the libxml-clisp system can be as loaded as follows:

[1]> (asdf:oos 'asdf:load-op 'libxml-clisp)
; loading system definition from /home/raghu/.asdf/libxml-clisp.asd...
0 errors, 0 warnings
NIL

Usage

All public symbols relating to libxml-clisp are exported from the package NET.RETROTEXTS.LIBXML-CLISP, which has the nickname LIBXML-CLISP. Those symbols can be used with use-package or defpackage, for instance, as follows:

[2]> (defpackage "FOO" (:use "COMMON-LISP" "NET.RETROTEXTS.LIBXML-CLISP"))
#<PACKAGE FOO>
[3]> (in-package "FOO")
#<PACKAGE FOO>
FOO[4]>

There are some illustrations of the usage of libxml-clisp in the directory examples in the top level of the distribution.

Documentation

Libxml-clisp is in an early stage of development, and does not have any documentation at the moment. There is some information in the code itself, in the form of documentation strings and comments.

Project summary page

The project summary page at Savannah is an alternative source of information on libxml-clisp.

Feedback

Comments and suggestions regarding libxml-clisp are welcome, and may be sent to the author at <raghu at retrotexts dot net>. Comments and bug reports can also be sent using the links on the project summary page. There is currently no mailing list for libxml-clisp.

Libxml2

Libxml2 is a powerful XML toolkit, developed as a part of the GNOME project. It is written in C, and is widely portable. The library implements many standards related to XML, such as XML Namespaces, XPath, XInclude, XML Catalogs, and Relax NG. It can process documents encoded in a variety of character encodings.

CLISP

CLISP is a well-known implementation of the ANSI Common Lisp standard. It also provides several extensions to the standard. These include support for Unicode, and a dynamic FFI, which enables the user to call functions implemented in C, and to manipulate memory structures defined and created by C functions.

Acknowledgments

It is a pleasure to thank the authors of CLISP and libxml2, for providing outstanding environments and tools. Thanks are due to Savannah for generously hosting this project.