Learn about XULE for XBRL


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 to ensure the quality of data that is submitted. One approach is by using business rule validation, and XULE is one method that is growing in popularity in 2025.

What is XULE?

XULE, from “XBRL rule,” was created by XBRL.US to help filing organizations control the quality of their submitted data. The syntax provides a way to query and check XBRL reports by validating business rules prior to filing.

XBRL.US hosts the Center for Data Quality, an initiative aimed at improving the usability and accuracy of submitted XBRL data. The organization highlights that inconsistencies and errors in filed XBRL data have hindered the full realization of XBRL’s potential benefits. To address this, the Center established the Data Quality Committee (DQC), which develops guidance and standardized validation rules to identify and prevent errors before submission. These DQC Rules are available in multiple formats, including the recently introduced XULE.

XULE was designed as a modern, user-friendly alternative to XBRL Formula, a traditional validation rule language for XBRL. Unlike XBRL Formula—which is difficult to use and only applicable when integrated into a published taxonomy by the regulator—XULE is independent of any specific taxonomy and accessible to non-technical stakeholders, such as accountants. Its simplified syntax makes it easier to read and use across various applications.

XULE syntax supports two primary methods for assessing data quality: queries and assertions. Queries allow users to compute data from numbers in an XBRL report, generating outputs for further analysis. Assertions, on the other hand, test data against predefined rules, and actions can be defined based on the results.

XULE queries and assertions are executed against XBRL reports or taxonomies using a XULE processor. As part of its comprehensive suite of XBRL tools, Altova provides both an interactive XULE editor and a XULE processor, making it easier for users to implement and benefit from these data quality checks. 

XULE Processor

To assist users working with XBRL data, 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 full 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 documents for correct syntax according to the XULE specification.

XULE processor in XMLSpy

Developers can also take advantage of a RaptorXML+XBRL Server installed on their network for high performance XULE processing directly inside XMLSpy.

XULE Editor

In addition to its XULE processor and validator, XMLSpy includes the industry’s first XULE editor. Features include syntax coloring, 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 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 it.

Below you can see the XULE editor window in Single Query mode being used to identify and navigate to facts in an iXBRL report.

XULE editor in XMLSpy

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.

XULE editor with code completion

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.

Calculate and test XULE rules

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.

To get started, download a free, 30-day trial of XMLSpy and RaptorXML+XBRL Server.

Tags: , , , ,
0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *