Free Open-Source Software

XBRLAPI rendering sample application

Author: Steve Yang (steve2yang at

Contributor: Geoff Shuetrim (geoff at

What is it?

This is a sample Java application demonstrating the usage of XBRLAPI and its various modules. The Rendering Sample Application loads instance document using XBRLAPI and renders the document according to XBRL Inline Specification 0.64.

The purpose of this module is to give developers step by step instructions to discover a taxonomy set and use the XBRLAPI to store the instance documents and traverse through the various presentation networks to build rendering solutions. This sample application also demonstrates how to build XBRL Inline documents using XBRL API.

The example uses the open source Freemarker template system to simplify the documentation of the desired rendering of the information in the XBRL instance being processed.

The rendered output that can be produced from this Freemarker template defining the report rendering and this target XBRL instance with a presentation linkbase included as an additional URL starting point for DTS discovery. Note that the example rendering only shows the rendered output from a single presentation network. Running the example in full creates a significantly larger report rendering.

Where is it?

The home page for the XBRL API project can be found on the XBRLAPI project web site ( There you also find information on how to download the latest release as well as all the other information you might need regarding this project.

You can browse the source code in SVN.

Additional requirements

Commandline Arguments:

Java Virtual Machine (JVM) Arguments:

  -Dlog4j.configuration=<location of>
  -Djava.library.path=<Berkeley DB XML 2.5.16/lib>
  -classpath=<java class paths>

Program execution involves:


Where URLS is the space-separated optional URLs of additional starting points for DTS discovery and the mandatory options are:

* MS Windows issue: Rendering example can have trouble loading Freemarker templates if they are located in the root directory of a MS Windows drive. Thus, a template location of C:\template.ftl will fail while a location C:\templates\template.ftl will work.

You can view an example Freemarker template in the source repository.

An example follows:

java -Dlog4j.configuration=/home/geoff/log4j.xml -Djava.library.path=/usr/lib/BerkeleyDBXML-2.5.16/lib 
 -database /home/geoff/Data/bdbxml 
 -container renderDatabase 
 -cache /home/geoff/Data/cache 
 -template /home/geoff/template.ftl
 -output /home/geoff/output.html

Licensing and legal issues

XBRLAPI examples are released under the lesser GPL license.

Get Java XBRL API implementation at Fast, secure and Free Open Source software downloads