Free Open-Source Software

XBRLAPI rendering sample application

Author: Steve Yang (steve2yang at yahoo.com)

Contributor: Geoff Shuetrim (geoff at galexy.net)

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 (http://www.xbrlapi.org/). 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.

Requirements

You can download the required XBRLAPI JARs from Sourceforge. You can get suggestions on necessary installation and configuration steps from http://www.xbrlapi.org/.

You can get the other jar files from the XBRLAPI SVN repository.

Commandline Arguments:

Java Virtual Machine (JVM) Arguments:

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

Setting up the classpath can be nightmare in Java. If you are using the Sun Java 1.6 binaries, then it is worth taking a look at the Sun classpath instructions. If those are not giving you joy, then take a look at two blogs (dirkeiler and Mark Reinhold’s Blog). These discuss issues with getting the -classpath parameter working with wildcards.

Program execution involves:

  java <JVM ARGUMENTS> org.xbrlapi.data.bdbxml.examples.render.Run <OPTIONS> <URLS>

Where the URLs are the URLs of additional starting points for DTS discovery and the mandatory options are:

* MS Windows issue: for reasons that remain unknown, the 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.

Licensing and legal issues

XBRLAPI examples are released under the lesser GPL license.

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