Tripliser

Tripliser is a Java library and command-line tool for creating triple graphs from XML. It is particularly suitable for data exhibiting any of the following characteristics:

Other non-RDF source data may be supported in future such as CSV and SQL databases.

It is designed as an alternative to XSLT conversion, providing the following advantages:

As an introductory explanation of how tripliser works, here is a practical example.

Quick start

requires Java 1.6
wget https://github.com/downloads/daverog/tripliser/tripliser-1.0-jar-with-dependencies.jar
wget https://github.com/daverog/tripliser/raw/master/src/main/sh/triplise
chmod u=r+x triplise
./triplise [input] [mapping]

To run a quick example, using the code shown in the example, run the following:

wget -O universe-mapping.xml https://github.com/daverog/tripliser/raw/master/src/test/resources/examples/mappings/universe.xml
wget https://github.com/daverog/tripliser/raw/master/src/test/resources/examples/source/universe.xml
./triplise universe.xml universe-mapping.xml
cat universe.xml.rdf

Example

Premise

You have an XML file containing data, which you wish to express in RDF:

Source XML file (universe.xml)

Solution

The following mapping file is created to convert the data. (Do not worry about every detail, as this example is used elsewhere in the documentation where each part is explained).

Mapping file (universe-mapping.xml)

The following command is run:

triplise universe.xml universe-mapping.xml

This produces the following RDF file:

RDF output (universe.xml.rdf)

That's all there is to it.

In Java

To do the same as above, but in Java, you'll need to run the following code:

Credits

Tripliser was designed and developed by David Rogers with assistance from Rija Menage.

d dot p dot rogers at gmail dot com

Copyright (C) 2010, 2011 by David Rogers