Redland RDF Application Framework - Tcl Interface

Installing the Redland Tcl interface

This is built if --with-tcl is given to the configure line, or --with-tcl=tclsh8.3 to use a particular Tcl version/program.

The Tcl shared library locations are discoverable but where the matching tcl.h includes live is something that is hard to do entirely automatically. Use configure option --with-tcl-include=/usr/local/include/tcl8.3 to specify it, if the default is not correct.

The standard 'make' at the top level will then build the Tcl API. You can also compile the Tcl interface by hand as follows:

  cd tcl
  make

  # optional, but it may require a top-level 'make install
  # first depending on the operating system and how it
  # handles shared libraries
  make check

To install it system wide do this as root (or maybe via sudo make install). NOTE: This is untested:

  root# make install

The Tcl interface has been tested with Tcl 8.4, 8.3 and 8.0.5. The TCL interface is alpha quality - the test and examples work.

Redland Tcl API Introduction

The Tcl API is an object-based API with the class names and method names flattened into Tcl procedure names like this: librdf_class_method - the same names as in the underlying C API. The object references become Tcl variables.

Testing the Redland Tcl interface

The example program provided parses an RDF/XML source file into a model. It should be run with two arguments - the URI of the content (as file:/path/to/content) and the parser name (say, raptor):

   tcl example.tcl file:../perl/dc.rdf raptor

Other RDF Tcl APIs and applications


Copyright 2001-2004 Dave Beckett, Institute for Learning and Research Technology, University of Bristol