1

I have started exploring Arelle for XBRL parsing. I am calling Arelle's webservice Api through java to get the various views/outputs it can generate like facts, factTable, pre etc.

In the final output that I want I need all fields from facts file and few details from the pre file. I have written my Java code to do this, but I am stuck because I have no idea how to navigate from facts to pre. How can I combine these outputs? How are these views related, on what attributes ?

Cherry
  • 31,309
  • 66
  • 224
  • 364

1 Answers1

1

Facts are related to presentation by means of the concept name (QName from an XML perspective, SQName from an Open Information Model perspective), like us-gaap:Assets.

The facts endpoint is a flat list of facts each having a concept name, while the pre endpoint organizes concepts, identified by their names, in a hierarchy.

The following drawing illustrates this mapping using csv as output. In JSON, for both facts and pre, the concept names are in a name field. In XML, they are in a name attribute. With Java, this requires parsing XML or JSON to build the appropriate objects and take it from there.

(This example was taken from this SEC filing)

Mapping presentation to fact list

Ghislain Fourny
  • 6,971
  • 1
  • 30
  • 37