XBRL (eXtensible Business Reporting Language) is an open, XML-based standard for the electronic submission of business and financial data. Though XBRL specifies what data must be reported and provides a standardized way of doing so, companies and regulatory agencies need a way of ensuring data quality through business rule validation. XULE is one method that is growing in popularity.
Let’s take a look at what XULE is and how it works.
What is XULE?
The mission of the XBRL.US Center for Data Quality is improving the usability and effectiveness of submitted XBRL data, noting that inconsistencies and errors in the XBRL data filed have prevented the benefits promised by XBRL from being realized fully. The Center formed the Data Quality Committee to develop guidance and uniform validation rules to detect and even prevent these errors prior to submission: the DQC Rules are available in various formats and have most recently been introduced in XULE.
XULE is not the only standard created for assessing data quality. XBRL Formula is also used as a validation rule language for XBRL. However, it is not easy to use and can, in fact, only be utilized if the regulator includes XBRL Formula rules directly in the published taxonomy. The goal behind XULE was to create a modern alternative to XBRL Formula that is more user friendly and independent of any specific taxonomy. Since it’s less complex, XULE is also easier to read by non-technical XBRL stakeholders such as accountants.
XULE syntax provides two ways to check data quality: queries and assertions. Queries can be used to compute data based on numbers provided in an XBRL report and produce output that can be further assessed. Data can also be tested against defined assertions and then actions can be taken based on the results.
Once they are defined, XULE queries are executed against an XBRL report or taxonomy using a XULE processor. As part of its comprehensive set of XBRL tools, Altova offers both a XULE processor and an interactive XULE editor.
Starting with Version 2020, a complete XULE processor is built into both RaptorXML+XBRL Server and XMLSpy.
For a server-based solution, RaptorXML+XBRL includes a hyper-fast XBRL processor with complete support for XULE. Options let you execute XULE documents from the command line, with scripts, and via a number of server and engine APIs, including a powerful Python API. The server can process single XULE documents or rulesets containing multiple XULE documents stored in a ZIP archive.
XMLSpy, Altova’s desktop developer tool for XML, JSON, and XBRL, also includes a built-in XULE processor that powers its XULE editor (described below).
The XULE processor and validator in XMLSpy executes XULE expressions against an XBRL instance document, as well as providing validation of XULE documents for correct syntax according to the XULE specification.
Developers can also take advantage of a RaptorXML+XBRL Server installed on their network for high performance XULE processing directly inside XMLSpy.
In addition to its XULE processor and validator, XMLSpy includes the industry’s first XULE editor. Features include syntax coloring in XULE documents, auto-completion of XULE language constructs, integration of XULE documents in XMLSpy projects, and other features to help you understand, write, and test XULE expressions.
While you can access these features to view and edit XULE docs in Text View as shown above, XMLSpy also includes a unique XULE editor window that lets you interactively query the active XBRL report (i.e., XBRL instance document) and immediately view the results of your query.
To make it easy to compose and test queries, the XMLSpy XULE window offers single query mode. Toggling this on enables you to enter an expression without the “output” keyword and as a single query, and to generate the result as a single output. Valid XULE syntax requires the output keyword, but if you want to quickly and interactively query the XBRL document, it is much easier to be able to type a single query without the output keyword.
Below you can see the XULE editor window in Single Query mode being used to identify and navigate to facts in an iXBRL report.
As you type in the XULE window, auto-completion values are offered based on both the XULE language syntax and the structure of the underlying XBRL Taxonomy.
After composing your query and clicking the Run button on the toolbar, the results of the execution are displayed in the Results pane.
You can click any link in the results to navigate to the respective node in the XBRL instance document, as shown below. Here we have a XULE query that calculates the quick ratio for the periods reported.
For complete details on the various options toolbar buttons available in the XULE window, please refer to the XMLSpy Manual. To help developers, accountants, and other stakeholders learn XULE, the XMLSpy examples project includes several XBRL reports and XULE documents. You’ll even find some simple queries for testing listed directly in the XULE window.