Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generating XBRL document programmatically: Use a template or a library?

Tags:

xml

xbrl

I am working on a financial application and one of the functionality is to generate XBRL (eXtensible Business Reporting Language) document. If you are familiar with XBRL instance documents, you might be aware that they typically refer to a large number of schemas. It is usually easier to generate these XBRL instances using (commecial) libraries.

Use case: Design a web form for the users to fill in the various fields.Generate a valid XBRL instance document using the user input.
Our platform: C# & .Net

My questions:

  • Have you used any of the (commercial) libraries? Which one would you recommend for generating 'yearly financial statements'? Altova MapForce seems to be dominant player.

  • A crude workaround to avoid using (commecial) libraries:

    • Select a valid instance document, clear all the data and store the XBRL (XML) file as a template.
    • Render the template to the user using XSLT. Collect user input and fill in the XBRL using standard XML libraries in .Net

Would you recommend this workaround? Why & why not?

Any input will be greatly appreciated :)

like image 331
Venkat Avatar asked Feb 17 '11 18:02

Venkat


1 Answers

Right now, I use a variation of the second approach. I have a template, that I parse and populate with data, thanks to a standard XML library (in my case C libxml).

The idea of having a template helps to produce valid XBRL, but I think XSLT is very complex, and usually limited, I prefer to use a real programming language (python in my case, but that could be C# .net)

On the commercial tools front:

  • I have never used Altova.
  • Invoke is very good at mapping data in instances, and is really fast.

A third approach is to generate a XBRL instance only programmatically, with a XML Library. XBRL is XML, after all.

like image 85
rds Avatar answered Nov 15 '22 10:11

rds