# 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.

--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
      make check # optional

To install it system wide (this is optional) do this as root:

      root# make install

The Tcl interface has been tested with Tcl 8.3 and 8.0.5. (8.4 does not seem to work with the interface made from SWIG 1.3.19). The TCL interface is isalpha 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

NOTE: ONLY `file:` URIs work at present.

## Other RDF Tcl APIs and applications

- Tools written in Extended Object Tcl (XOTcl):

  - xoRDF developed by Gustaf Neumann (University of Vienna, Austria) and Uwe Zdun (University of Essen, Germany) as part of the ActiWeb framework (X11-style open source license). xoRDF uses either the XML parser written in Tcl from TclXML (free for non-commercial use) or expat.

    There is an online demonstration of the parser available. Another sample xoRDF application was developed for the ongoing UNIVERSAL project (funded by EU IST) targeting a "brokerage platform for learning resources", which processes RDF based metadata of learning resources and presents it in a a user friedly way (source).

  - XWMF - An eXtensible Web Modeling Framework project and RDF-handle tool for processing and querying RDF data models by Alexander Block and Reinhold Klapsing, University of Essen, Germany. Has an RDF parser which is based on a predecessor of xoRDF. License is mixed LGPL, Open Source and restricted non-commercial use only (xml.tcl).
- GraMToR (Deutsch) - A graphical editor for interactive construction of RDF data models, written in Tcl (LGPL license) by Alexander Block and Reinhold Klapsing, University of Essen, Germany.

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