I have spent literally hours trying to convert an XBRL-based digital financial report into RDF/OWL 2 DL with limited success. If you know how to do this, any help would be greatly appreciated.
This will walk you through the XBRL-based report, to the XML Infoset of the semantics of the information, to what I have been able to create thus far:
- Reference Implementation: I created what I call a reference implementation of an XBRL-based digital financial report. You can see the XBRL instance which is the entry point of the report. Load that document and the supporting taxonomy will be loaded. If you want to see a human readable rendering of that report, use this evidence package provided by XBRL Cloud.
- Fact Table Infoset: You DO NOT want to convert the XBRL syntax to RDF/OWL 2 DL. What you want to convert is the meaning of the information. The Fact Table Infoset is generated from the XBRL instance. THAT is what needs to be converted to RDF/OWL 2 DL. The hard part is converting the XBRL into the XML Infoset format.
- Model Structure Infoset: The Model Structure Infoset is likewise pre-converted from XBRL to an Infoset which represents the XBRL taxonomy structure. There are some pieces missing for a complete conversion, but this provides enough to create a useful conversion.
- OWL 2 DL Ontology: This is where I have gotten so far in terms of creating an ontology which is used to express the relations in the report.
- RDF for Fact Table: This is the RDF for the Fact Table Infoset information. Basically, this RDF and the Fact Table Infoset should be equivalent in terms of meaning.
- RDF for Model Structure: This is in the worst shape. This is the RDF for the Model Structure Infoset. I am trying something that I saw, it is probably not a good idea; and it may not even be allowed. I am trying to nest the rdf:Descriptions. I have seen that done by others, but again; not sure if this is legal or a good idea. Anyway, this is in pretty bad shape.
- Business rules: (EXTRA CREDIT)If you are REALLY agressive and want extra credit points; these are business rules for the XBRL instance which likewise need to be converted into RDF or OWL or SWRL or something. I am not even sure this is possible. Again, this is EXTRA CREDIT. The Fact Table Infoset is the first priority, then the Model Structure Infoset.
The goal is to convert an entire XBRL-based digital financial report into an RDF + OWL 2 DL + SAFE SWRL-based digital financial report. The reason is to see the pros and cons of each format.
What I am seeing thus far is that RDF is brutal to work with. There are a zillion different formats. There is no nesting within the RDF which (a) makes the information incredibly flexible (which is a good thing) but it makes the RDF harder to read in software if you are not very good at writing software (like me).
Something that I have learned already in this process is that many software developers don't really get RDF. This document, Why RDF is More than XML, walks you through some issues. Basically, XML tools don't work very well with RDF because RDF is looks flat. What is really going on is that RDF is flexible and makes querying easier. While I would agree that there are situations when you work with XML and you need the hierarchy if you are a human working with the XML. But, computers can work with RDF just fine. There might be somewhat of a compromise, a simplified syntax for RDF or more of a shorthand.
The bottom line on all of this is that syntax does not matter. One should be able to convert from XBRL to RDF + OWL 2 DL. What I am trying to figure out is what you get from off-the-shelf OWL validators or reasoners.
My intuition tells me that neither off-the-shelf XBRL tools nor off-the-shelf OWL tools will serve the needs of business professionals appropriately, particularly accounting professionals. Hybrid combination tools and digital financial reporting specific tools are what is necessary.
Article originally appeared on XBRL-based structured digital financial reporting (http://xbrl.squarespace.com/).
See website for complete article licensing information.