Altova XMLSpy 2024 Enterprise Edition

Execute Formula (on Server)

Home Prev Top Next

The Execute Formula and Execute Formulas  on Server (high-performance) commands are enabled when an XBRL instance document is the active document in Text View or Grid View. These commands execute formulas and/or assertions defined in the DTS associated with the XBRL instance file. (A DTS, short for Discoverable Taxonomy Set, is a collection of taxonomies.) Formulas are evaluated with data in the XBRL instance file, and the results are output in an XBRL instance file. Assertions are evaluated separately, and the results are output in a JSON or XML file.


The Execute Formula on Server (high-performance) command uses an associated RaptorXML+XBRL Server to execute formulas. Use the command Tools | Manage Raptor Servers to set up a RaptorXML+XBRL Server.


If there are no formulas or assertions defined in the DTS, a message to this effect is displayed. If there is a valid formula or assertion in the DTS, the XBRL Formula Execution dialog (screenshot below) pops up.

Click to expand/collapse


If parameters are defined in the DTS, each parameter will be displayed in the Parameters pane and a value can be entered for it. Parameter names are read-only. Mandatory parameters are displayed with a red exclamation mark, and the OK button is disabled till the parameter is assigned a value. Optional parameters have a default value. If a required type is specified, the type is displayed. Parameters that require multiple values are indicated with a + icon, which can be clicked to add a new value. Note that optional parameters without a value will not be passed to the engine for execution. Default values are read-only and will be executed if the user does not enter a value.


Namespace mappings

This table defines prefixes that are used in the QNames of parameters and types. Additional namespaces for use in parameter evaluation may be defined here.


Saving and loading parameters

Parameter settings, including namespace mappings, can be saved in JSON or XML format by clicking the Save button. The file format is determined by the file extension given to the file. Note that optional parameters without a value will not be saved. Once saved, a parameters file can be loaded into the dialog via the Load button.


XBRL processing options

The Options button opens the XBRL Processing Options dialog, in which you can switch on de-duplication (to automatically ignore duplicate facts).




This pane contains a tree view that allows the selection of formula and/or assertion components to be executed. Each item shows an icon and its description, as well as the ID and expression if these are available. To select a component for execution, check its check box. Outputs of assertion executions can be either JSON or XML; select the output format from the Output Format combo box. The format of an XBRL formula execution is always XML.




You can select whether the execution should be done with XMLSpy's internal engine or with Altova's RaptorXML Server. In case of an execution error, an error message is shown in the output window. Otherwise, a success message is displayed. The output files, assertions-ouput-file.xml/json and/or formula-output-file.xml, are opened in new document windows, not saved to disk. You will need to explicitly save the file to the desired location on disk.




If you select <trace> in the Output Format combo box (at the bottom left of the dialog), extra debug information for all “variable set evaluations” will be collected during the formula execution and then be displayed in the Messages window (see screenshot below). The trace lists the individual variable set evaluations for each formula/assertion at the points where the actual assignment of the variables in that evaluation are displayed. If the variables reference instance facts, clicking on the values takes you to the corresponding fact element in the instance. Clicking on the formula/assertion or variable name will take you to the corresponding definition in the formula linkbase files. In the case of validation assertions, the assertion messages that have been generated in that evaluation step are also displayed.

Click to expand/collapse

Note:Running a trace can require significant overheads in terms of memory as well as computation speed. When using large XBRL instances, assertions can be evaluated millions of times, and each evaluation might need to store the values of up to 40 variables. So, this feature should only be used for debugging with small/reduced samples, otherwise execution will be slow and XMLSpy might even run out of memory. For this reason, each trace is has a hard-coded limit of 1000 evaluations.


© 2017-2023 Altova GmbH