Renders input RDF as a SVG showing configurable views of its structures (as a full graph, classes or properties hierarchy, ontology,...)
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


The RDF to SVG service RDF2SVG generates a SVG graphical representation of the input RDF following the workflow:

RDF -rules-> Graph Visualization RDF Model -xslt-> .DOT File -Graphviz-> SVG

The input RDF goes through a set of Jena rules that select the parts of the RDF structure to show and models them also using RDF. Currently there are 4 set of rules that:

  • Represent the whole graph structure generated by RDF triples.
  • Represent just the hierarchical structure of the classes defined in the input RDF.
  • Represent the hierarchy of parts in the input RDF.
  • (Beta) Represent the OWL constructs in the input RDF defining an ontology.

As a result of the reasoning based on the selected set of rules, an output RDF modelling the graph structure to visualize is generated. This RDF is then processed by an XSL transformation that models the same structure using the Graphviz .DOT format.

The .DOT file is then sent to Graphviz, which layouts the graph visualization and renders it as an SVG, the final output of the RDF to SVG web service.


To build the deployment WAR file using the source code and Maven:

mvn clean package

A prebuilt WAR file is available from:

RDF2SVG requires that Graphviz is installed in the machine it is deployed in. Graphviz can be downloaded from Once installed, configure RDF2SVG so it can find it. In the rdf2svg/WEB-INF/web.xml file, once the WAR file is decompressed, edit the dotPath parameter to point to the appropriate executable (for instance /usr/local/bin/dot or C:\Programs\GraphViz\bin\dot.exe).


When deployed in a local servlet container like Tomcat, the RDF2SVG service will be available at something like: http://localhost:8080/rdf2svg/render

(The service is deployed at and it can be tested from

It can called using GET or POST. The former is recommended when the RDF to be transformed is available from a URL, the latter when direct input is provided.

The parameters of the service are:

Examples using GET and the RDF2SVG service deployed at