One approach to working with XBRL is to break the problem into two pieces: (a) creating easier to use infosets and then (b) working with those infosets. An example of this can be seen in trying to render information from an XBRL based digital business report.
This working database application (Microsoft Access 2003 format) shows how this can work. It is also a call to any programmers who might want to tackle the rendering problem. At the risk of being laughed at, I make this code (remember, I am a CPA, not a developer) available. That function has two specific issues which I have not tackled due to my limited programming skills:
- It does not leverage the information model when it formats the information.
- It works with only one [Axis] in columns or rows.
Solve those two issues, I believe that an automated rendering using only information provided in the XBRL instance and XBRL taxonomy and the characteristics of these information model metapatterns which is very usable by business people can be created.
Basically, that database works against infosets generated by an XBRL processor. The functions you run set up the application to run against these pre-generated infosets for any of the metapatterns, business use cases, or comprehensive example. Here are the infosets of one of the business use cases:
- Relations infoset (human readable)
- Fact tables infoset (human readable)
- Report elements infoset (human readable)
The ultimate goal or target is to be able to render the information of a business report such as a financial statement, improving upon my best attempt here. (This is what a printed version of this might look like. That is the comprehensive example which is all the metapatterns and business use cases combined.)
Again, I am not trying to attack the "interactive" features of a model-based digital business report, or the "jumping around, navigation features within a report"; only get a usable, static HTML rendering. I have seen the characteristics that I am looking for within existing combined set of rendering tools. However, no one tool supports all that is needed. For example, the SEC interactive data application renders a few of the metapatterns well (roll up, roll forward, and a few others); but it does not do all of them. The Firefox XBRL Viewer Add on is wonderfully interactive and supports jumping around in the report; but it does not understand the information model patterns and does not leverage them. Other rendering tools do other things well.
My rendering code has only about 300 lines. I figure that the two things which need to be dealt with might double, maybe quadruple what I already have. OK, so 1200 lines of code. This seems like a pretty basic tree structure problem.
Have a look, even try to modify the rendering code to make it work against all my test cases. If you come up with something I would really like to see it.
These are targets (i.e. correct examples):
- Hierarchy: http://www.xbrlsite.com/DigitalFinancialReporting/Metapatterns/2011-07-15/01-Hierarchy/All_Renderings.html
- Roll up: http://www.xbrlsite.com/DigitalFinancialReporting/Metapatterns/2011-07-15/02-RollUp/All_Renderings.html
- Roll Forward: http://www.xbrlsite.com/DigitalFinancialReporting/Metapatterns/2011-07-15/03-RollForward/All_Renderings.html
- Compound Fact: http://www.xbrlsite.com/DigitalFinancialReporting/Metapatterns/2011-07-15/04-CompoundFact/Index.html
- Adjustment: http://www.xbrlsite.com/DigitalFinancialReporting/Metapatterns/2011-07-15/05-Adjustment/All_Renderings.html
- Variance: http://www.xbrlsite.com/DigitalFinancialReporting/Metapatterns/2011-07-15/06-Variance/All_Renderings.html
- Complex Computation: http://www.xbrlsite.com/DigitalFinancialReporting/Metapatterns/2011-07-15/07-ComplexComputation/All_Renderings.html
- Text Block: http://www.xbrlsite.com/DigitalFinancialReporting/Metapatterns/2011-07-15/08-TextBlock/All_Renderings.html
- Grid: http://www.xbrlsite.com/DigitalFinancialReporting/Metapatterns/2011-07-15/09-Grid/All_Renderings.html