XBRL is interesting but I’m not sure what does correct usage mean here. I can imagine consistent usage with the consistency being defined between different types of reports: balance sheet, profit, and cash flow. Besides this, there are tons of other types of reports, like gov taxes, employment expenses etc. Of course, all of them have to be consistent with those 3 main reports and each other. Correctness, on the other hand, would mean XBRL’s true representation of entity’s business transactions, which is likely a non-automatable task. In Estonia, we file annuals electronically, and filing an XBRL file is one of the options. I have not used it but I have used the form-based entry. It has extensive validation between the reports but I don’t know how it’s been implemented.
I have built two accounting systems in Prolog. One of them I use every day for doing daily accounting for my Estonian company. Prolog is perfect for this. The system itself is very simple and includes both the API interface (frontend is a trivial SPA) and “logic” in 300 lines of code. It uses a simple journaled database to record grouped credit/debit lines. The way how entries are recorded guaratees that the accounting equation is always satisfied. Account balances and cash flows are calculated with the most basic aggregation. Prolog is fast enough, no tabling is neccessary. It’s been audited and found be a good system. XBRL is a very complicated file format and adding support for generating reports in it takes way more effort than just using the simple form-based entry of the gov registry and filling it with the aggregated values from my own system.