XBRL Validator Tool
Overview
The XBRL Validator Tool facilites context checking and value comparison between XBRL files. It is designed to verify the accuracy of XBRL tagging and ensure that the values are consistent across multiple files. The tool is particularly useful for comparing XBRL files in different languages or checking the consistency of tags across multiple files.
Prerequisites
Ensure that Java is installed and properly configured on your system.
Running the Tool
Open a terminal and execute the following command:
java -jar xbrl-validator.jar <command> [file1 file2 ...]
Here, command refers to one of the following:
| Command | Type | Scenario |
|---|---|---|
| equality-test | Executes the equality test against exactly two XBRL files. Compares file contents and contexts. | Determines whether the contents of two XBRL files are identical, regardless of context ID and non-critical elements. |
| context-equality-test | Executes the Context Equality test against two or more XBRL files. Compares only the presence of contexts. Files are separated by a space. | Verifies if all contexts are identical among the provided XBRL files. Useful for checking if tags are consistent across all three languages or all provided files. Note: Discrepancies in the TypedDimension value are not checked in this mode, as it primarily focuses on validating the tagging accuracy. |
Examples
-
To run a value and context equality test between
file1.xbrlandfile2.xbrlin the current directory, use:java -jar xbrl-validator.jar equality-test file1.xbrl file2.xbrl -
To run a context equality test among three files,
nl.xbrl,fr.xbrl, anden.xbrllocated in~/Documents/, execute:java -jar xbrl-validator.jar context-equality-test ~/Documents/nl.xbrl ~/Documents/fr.xbrl ~/Documents/en.xbrl
Interpreting the Report
The result is automatically copied to the clipboard. To visualize it, paste the content into Visual Studio Code and save the file with a .md extension. Alternatively, use markdownlivepreview.com to display the markdown.
Examples of Unequal Values Check
- The value of XBRLConcept(contextId=c206, dimensions=[dcl:m7, part:m6, psn:m1, bas:m117, rls:m7, dim:open - 1, dim:ptpn - Skytron], primaryItem=met:str2, value=Aard deelneming 10000) differs from: XBRLConcept(contextId=c206, dimensions=[dcl:m7, part:m6, psn:m1, bas:m117, rls:m7, dim:open - 1, dim:ptpn - Skytron], primaryItem=met:str2, value=Aard deelneming 1).
| Original | New |
|---|---|
| Aard deelneming 1 | Aard deelneming 1 |
Interpretation: In this example, the context [dcl:m7, part:m6, psn:m1, bas:m117, rls:m7, dim:open - 1, dim:ptpn - Skytron] is present in both XBRL files, but the values differ.
The first file contains the value Aard deelneming 10000, while the second file has Aard deelneming 1 for the same context.
The difference visualization table clearly illustrates the discrepancies between the two files using strikethrough or bold formatting.
Note that ~~ ~~ indicates discrepancies due to spaces.
Example of Context Difference Check
Missing Concept Value with Typed Dimensions
- The Concept XBRLConcept(contextId=c4, dimensions=[part:m2, psn:m10, bas:m26, qlt:m1, dim:anlp - Desert fish BU], primaryItem=met:str2, value=NL40455959683) is missing.
Interpretation:
Typed Dimensions are denoted by contexts starting with dim, followed by the identifying key value after -.
Here, the XBRL concept includes a Typed Dimension: dim:anlp - Desert fish BU.
This indicates that the XBRL concept with context [part:m2, psn:m10, bas:m26, qlt:m1, dim:anlp - Desert fish BU] is absent in the second XBRL file. This suggests that the other XBRL file either lacks a fact with context [part:m2, psn:m10, bas:m26, qlt:m1, dim:anlp] or it doesn't have the corresponding value Desert fish BU for the Typed Dimension dim:anlp.
In our example, the second XBRL file contains Desert fish BU as the value.
(refer to the issue regarding concatenation of legal entities' name and type)
Missing Concept Value without Typed Dimensions
- The Concept XBRLConcept(contextId=c1619, dimensions=[ntr:m9, gdr:m3, cvt:m3, part:m8, bas:m1, wkr:m1], primaryItem=met:am1, value=5853.17) is missing.
Interpretation: The second XBRL file lacks a concept with context [ntr:m9, gdr:m3, cvt:m3, part:m8, bas:m1, wkr:m1]. This indicates that this fact was not included in the second XBRL file.