XBRL Validator Help

Overview of the Process

What is XBRL?

eXtensible Business Reporting Language (XBRL) is an XML-based standard to describe financial data, and facilitate the creation, distribution and re-use of business reports. XBRL is developed by the XBRL International consortium, and is defined in the XBRL v2.1 specification.

What is inline XBRL?

Inline XBRL (iXBRL) is a standard for tagging XBRL within an HTML (i.e. HTML or XHTML) document.

Companies House requires all submissions to be well-formed XML, to be provided as XHTML and to be valid iXBRL (XHTML will enable more rigorous checking of the mark-up to be performed).

The main objective of iXBRL is to enable XBRL data to be displayed in situations where the producer wants to preserve a specific visual presentation of the information, while still allowing access to the underlying input data. It enables data to be presented in a manner dictated by the presenter, while also allowing the underlying XBRL tags to be processed automatically by consuming applications.

iXBRL-enabled applications allow the preparer to publish an HTML version of their accounts laid out and formatted as they wish - consequently the necessity to render accounts via stylesheets with their accompanying limitations has been removed.

XBRL Validation Service

Companies House have adopted XBRL v2.1 for electronic filing of audit exempt accounts. In order to assist the development of third party software to use the service, we provide an XBRL Validation Service that allows users to test submissions for conformance with the Companies House taxonomy.

The validation service will cater for both inline XBRL and 'raw' XBRL. (For inline XBRL submissions, the underlying XBRL content will be extracted prior to performing the validation.)

Using the service

The XBRL validation service allows users to submit XBRL based reports (or instance documents) for testing. Submitted accounts will be tested for conformance with the XBRL v2.1 specification, and for conformance with the appropriate UK GAAP taxonomies (and Companies House Audit Exempt taxonomies for 'raw' XBRL submissions).

When a document is submitted, the validation service will return either a "successful" response, or a list of errors found in the document. Each error will contain up to four parts:

  1. An error code, indicating the class of error encountered
  2. The location of the error within the submitted instance document
  3. An error message describing the details of the problem
  4. Optionally, an excerpt from the XBRL v2.1 specification describing the rule that has been broken

Validation process

In order to understand the errors that are reported, it is useful to understand some of the details of the validation process. Validation takes place in two stages:

  1. XML well-formedness, DTS discovery and XML Schema validation
  2. XBRL validation and consistency checking

If the validation fails during the first stage, the validator will stop and report the errors without proceeding to the second stage. During the first stage, the document is checked to ensure that it is valid, well-formed XML, and that it conforms to the relevant XML Schemas, including the XBRL taxonomy schema for the Companies House taxonomy. If the document fails either of these tests, you will receive either a MalformedXMLError, or a SchemaValidationError. During this process, the validator will check that the instance document identifies the referenced taxonomies correctly (DTS discovery testing). Failure to reference a taxonomy correctly will usually result in an IllegalReference error or an UnresolvableReferenceError.
The second stage of validation checks the document for conformance with the validation and consistency rules laid down in the XBRL v2.1 Specification. These rules ensure that the submitted document is a valid XBRL v2.1 instance document, and that it conforms to the referenced taxonomies.

A third stage of validation will be performed for inline XBRL documents - this will cater for additional business rules validation e.g. to ensure that the appropriate Companies Act statements have been supplied and that the accounts fall under the 2006 Companies Act etc.

For information on common errors and their causes please click here.

Common Errors

Although the validator covers a very wide range of validation rules, there are a number of error scenarios that occur frequently. Whilst the validator will describe the problem accurately, it may not always be obvious what the cause is. This page describes common causes for such errors.

Incorrect schemaRef

If an instance document references the incorrect canonical URL for a taxonomy, this will typically result in an UnresolvableReferenceError, stating that the document could not be obtained. In the case that the schema reference actually exists, but is the wrong schema for the taxonomy, this will typically result in a namespace mismatch (see below).

Item not found

There are a number of scenarios in which the validator will fail to find the definition of an item included in the instance document. This is caught at the XML Schema validation stage, and so will result in a SchemaValidationError with a message of the form:

Invalid content was found starting with element
'uk-gaap- pt:ProfitsLossOnOrdinaryActivitiesBeforeTax'.
One of '{"http://www.xbrl.org/2003/instance":item, "http://www.xbrl.org/2003/instance":tuple, "http://www.xbrl.org/2003/instance":context, "http://www.xbrl.org/2003/instance":unit, "http://www.xbrl.org/2003/linkbase":footnoteLink}' is expected..
XBRL Line: 66. XBRL Column: 19953

This error is reported because the validator has failed to find the schema defining the 'pt:ProfitsLossOnOrdinaryActivitiesBeforeTax' element. There are a number of possible reasons for this:

  • A simple typo in the instance documents. For example, the error above would occur if the instance document says 'pt:ProfitsLossOnOrdinaryActivitiesBeforeTax' but the taxonomy defines 'pt:ProfitLossOnOrdinaryActivitiesBeforeTax' .
  • A namespace mismatch. If the namespace associated with the pt prefix does not match the targetNamespace of the schema referenced in the schemaRef element of the instance document (or any other taxonomy schema document that forms part of the Discoverable Taxonomy Set) then this will result in the definition of the item not being found, and the error above being reported. This could be a result of a typo in the xmlns:pt attribute that defines the pt prefix.

Calculation inconsistencies

If an instance document does not to conform to the relationships prescribed by a calculation linkbase then a SummationItemCalculationMismatchError will be reported. The message text will describe what items were included in the calculation, and the expected and actual totals. Whilst the message text should be readily comprehensible, it is worth understanding the circumstances under which the calculations will be checked.

Calculations only apply within a single context. In order to bind, the summation item (the total) must be present in the instance document, along with at least one component item. For example, if the relationship A = B + C + D is defined, the calculation will be checked if A exists, and at least one of B, C or D, within the same context.

(These calculation checks will be performed on all 'raw' XBRL submissions; however for inline XBRL, no such validation will be performed.)

Missing mandatory elements

Mandatory elements are often described by means of a requires-element arc in the definition linkbase. This states that if one element is present, then a second element must also be present. Failure to comply with this constraint will result in a RequiresElementError.

Checking that the first element is present is a test that must be done outside the validator.