XQuery Formula Specification (Minimun XML based and more XQuery based)

From XBRLWiki
Jump to: navigation, search


According to the XBRL 2.1 Specification, XBRL validation includes:

  1. simple calculations; (+ and -) of fact items that exist in the same context (reported for the same company, same period of time, same segment and same information of the scenario container)
  2. other constraints (almost never used) defined in the definition linkbase: (requires-element, essence-alias, etc...)

Very soon the XBRL community discovered that the functionality included in the calculation linkbase (+ and - operations) was not enough for the validation purposes of the majority of the users (mostly regulators like the FDIC who was the very first one adopting a "proprietary" formula solution).

That motivated the creation of richer validation rules.


So far, before the XBRL Consortium finished a "standardized" solution, different software vendors has developed their own solutions.

The XQuery based solution designed by Reporting Standard S.L. is one of the alternatives created in 2006 in order to help in the development of a standardized solution.

Comparison chart

The advantages of the XQuery solution over the currently adopted solution are:

  • The XQuery solution provides a mechanism to develop functions that can be executed on any XQuery processor.
  • The XQuery solution provides a very simple XML compared with the standardized solution. The XML syntax proposed in the XQuery solution is very simple because if only contains formulas "XPath 2.0" expressions and variables. The standardized solution contains more than 25 different types of resources with attributes that modifies the element meaning.
  • The XQuery solution provides a simpler handling of inputs and outputs, everything is a sequence (as in the XPath 2.0 data model) the user may want to process a sequence item by item. Contrary to the Standard solution, the formula output is not post-processed and is available as input for the next step.
  • The XQuery solution provides functions to create instances, facts and every element inside an instance document. The user does not need to worry about aspects
  • The XQuery solution does not have specific filters. Filtering capabilities are always possible and available via the development of functions

What Reporting Standard S.L. offers

Reporting Standard has developed both solutions.

  • The standard formula solution and
  • The XQuery based solution.

This combination is perfect for scenarios that requires extensibility over time, compatibility with other processors and advanced functionality that cannot be achieved with current specification.