Menu

Custom Linkbases

Help
2012-12-21
2013-05-02
  • Miguel Coca

    Miguel Coca - 2012-12-21

    Hello,

    I've been working with xbrlapi for a couple weeks now, trying to find my way around the spanish IPP taxonomies.

    First, let me thank you for the API. It makes navigating XBRL simply hard, instead of devilishly complex.

    I've found a couple situations where I would like to add my own linkbases to an existing instance/taxonomy. For example, I would like to provide my own labels, or to extend calculations to include more items. I would like to do this without having to modify the original files.

    Is this possible with xbrlapi as is? If not, which would be the best way to get that result?

    Thanks in advance

     
  • Geoffrey Shuetrim

    Hi,

    Adding your own linkbases is relatively simple.  Just add the URLs of the additional linkbase resources to the set of linkbases that you load into the data store prior to XBRL processing.  They will be treated as starting points for DTS discovery and so will be included in the final DTS.

    Regards

    Geoff Shuetrim

     
  • Miguel Coca

    Miguel Coca - 2012-12-22

    Thanks, it sounds much easier than I thought.

    But I have tried some experiments and I can't quite make it work. I created a simple linkbase with a single label, and a program that lists all available labels for a concept in the store.

    If I just load both the new linkbase and the instance using your load utility, my label doesn't show up in the list.

    If I modify the load program to call stashURI for my linkbase before doing anything else, it kind of works. My label shows up, but the default one from the taxonomy linkbase doesn't (and the ones for other concepts do).

    Any idea what I am doing wrong? I suspect I'm missing some of the finer points XLink and/or the DTS, since It's my first time working with it. But any help would be appreciated.

     
  • Miguel Coca

    Miguel Coca - 2012-12-29

    If I just load both the new linkbase and the instance using your load utility, my label doesn't show up in the list.

    If I modify the load program to call stashURI for my linkbase before doing anything else, it kind of works. My label shows up, but the default one from the taxonomy linkbase doesn't

    This was just an embarrassingly stupid bug in my code, please disregard. It works fine just by adding my linkbase to the load utility command line arguments along with the instances.

    Currently, everything I wanted seems to work. I'm running into some issues with UTF-8 encoded labels, but that's probably my bad again.

    Thanks for the great API.

     

Log in to post a comment.