SkillAgentSearch skills...

XBRL

Classes that implement the XBRL 2.1, XDT, Formulas, Generics, XFI and other XBRL specifications

Install / Use

/learn @bseddon/XBRL
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

XBRL for PHP

Table of contents

Find much more information in the wiki.

Status

Build status parsing Build status compile GAAPs Build status compile extensions Build status load_instances Build status reports

Conformance suite tests

XBRL 2.1 conformance XBRL dimensions conformance XPath 2.0 conformance XBRL functions registry conformance XBRL Formulas conformance XBRL Enumerations conformance XBRL Generics conformance iXBRL conformance

Build status last run date

These tests are performed nightly to provide an overview of the status of the source code. All tests have been run on Linux and Windows.
This project does not support HHVM.

Statistics

This project comprises 102535 lines in 251 files

About the project

The XBRLQuery project started as an idea to take the regulatory information companies must produce and extend that use within organizations. The benefit of using XBRL to represent corporate data is that it's verifiable and published and in an agreed, transparent format, a format accepted by all major regulatory bodies around the world.

We realised the ability to work as a community to provide useful information from internal or published financial data will allow organizations to plan, analyse and react to business driven factors and by doing so via an OpenSource project, it becomes beneficial to all.

An overview of the project is provided below. There is more information available in the Wiki including and explanation and documentation of the source code and examples of using the source to create reports.

Validating

The processor can be validating. Set a variable to true and both the schemas and instance documents are validated. Set the variable to false and the processor just processes and assumes you know the schemas and instance documents are valid and consistent.

Specifications supported

  • XBRL 2.1 except there is no support for reference linkbases.
  • XBRL Dimensions are supported.
  • XBRL Generics including generic references, generic links, generic labels and assertions.
  • XBRL Formulas.
  • XBRL Taxonomy Packages (including support for the various legacy SEC packages).
  • XBRL Extensible Enumerations 1.0 and 2.0 PWD.
  • In-line XBRL 1.1 and tranformations to TRR 4

XBRL Formulas includes support for:

Notable exception:

Only instance documents using the XML format (XHTML) can be read as the processor does not support any of the OIM mappings.

These exceptions exist because there has been no reason to add support. At the moment where iXBRL is being used, submitters are also providing data in XML formatted instance documents.

Taxonomy package support

There are many instances of zip files containing taxonomies. If a zip file content follows the XBRL Taxonomy Package specification then the processor will support it. However, there are many instances of zip files that contain taxonomies which were packaged this way long before the packaging specification existed. The US SEC packages are an example. In fact there are two versions of legacy packages available from the SEC: one that uses a JSON file to catalog the package content; and one that uses an XML file. The processor supports both.

In addition, the Danish IFRS package is supported as is the taxonomy from the Danish Business Agency (Erhvervsstyrelsen). Neither of these packages support the XBRL Taxonomy Packaging specification though the taxonomies are provided in a zip file.

Sometimes it is helpful to extend the core XBRL processinging class to add specific functionality for a taxonomy. This is especially true when a taxonomy may be extended. Examples of extended XBRL processing classes are IFRS and ESMA ESEF taxonomies. In these cases, the base packaging class, such as XBRL_TaxonomyPackage can be extended to return the name of the XBRL processor class to use to processes the taxonomies. Examples provided include:

  • XBRL-US-TaxonomyPackage.php
  • XBRL-IFRS-Package.php
  • XBRL-ESMA-ESEF-Package.php

Conformance

The project passes almost all conformance tests, the omissions arising because there is no support for reference linkbases.

A separate project XBRL-tests provides a means to verify the project passes the conformance test. This project is a copy of the test harness we use to run the conformance tests.

Signing

Instance documents and taxonomies can also be signed. The signing techniques used are similar to those use to sign Word or PDF documents or emails. Documents are signed using the private key of a certificate you have so that others are able to verify the contents of a document have not changed since you created it.

Signing does not impact the original document but is important for recipients of a taxonomy to know they are working with an unaltered copy of the relevant taxonomy and for recipients of instance documents to know the contents have not be altered since the document was prepared.

Signing uses only open standards for encryption and verification such as public/private key certificates. Although the project provides code to verify a signed instance document, the same process is possible using a standard distribution of most programming languages such as, but not limited to, Java, C#, Python and C++.

Purpose

This project has been created by Lyquidity Solutions Limited using the website name of www.xbrlquery.com to provide PHP applications with access to validated corporate data contained in XBRL instance documents. We also provide consulting services around these XBRL technologies. Please contact us at info-at-xbrlquery.com.

XBRL stands for 'eXtensible Business Reporting Language'. Naively I thought that word 'Reporting' in this context could be prefixed with words like 'Management' or 'Budgeting'. I thought the overwhelming focus on using XBRL to create submissions to regulatory authorities like the US SEC or the UK HMRC was a consequence of having so many accounting and governmental organizations involved in XBRL community. But the reality is the purpose of XBRL 'reporting' is reporting to regulatory bodies. It is rarely, if ever, used for other types of reporting.

Most of the tools I have seen that are available commercially or are in the public domain such as Arelle, Gepsio or ABRLAPI focus on preparing instance documents and/or validating those documents against a taxonomy and reporting errors. Clearly ensuring data contained in instance documents are consistent with the base taxonomy they claim to represent this is an important first step. In the context of 'reporting' to statutory authorities it probably is the only goal. Surely there are other potential uses for data that can be recorded in a document and that can be validated against a taxonomy.

Budgeting and management reporting are examples of processes all organiz

Related Skills

View on GitHub
GitHub Stars48
CategoryProduct
Updated2mo ago
Forks17

Languages

PHP

Security Score

95/100

Audited on Jan 9, 2026

No findings