Altova XMLSpy 2024 Enterprise Edition

XULE Documents

Home Prev Top Next

XMLSpy provides a number of features that support the creation, validation, and execution of XULE documents. This section describes these features.

 

XULE conformant files (.xule files)

The .xule file type is predefined in XMLSpy as being XULE conformant. This means that when a .xule file is opened in XMLSpy, XULE editing help in the form of syntax coloring and auto-completion will be available. In the File Types section of the Options dialog, you can specify other file extensions to also be XULE conformant.

 

XULE document sets

Multiple XULE documents can be packaged in a zip archive (typically .zip). This zip archive is a XULE document set (or XULE ruleset). You can then execute the entire XULE document set on an XBRL instance, by specifying the zip file as the XULE file to execute,

 

A zip archive can have any structure. XULE files at all levels of the archive will be used during XULE execution; non-XULE files will be filtered out.

 

Syntax coloring

XULE Documents can be edited in the Text View of XMLSpy. The screenshot below shows the default syntax coloring of a sample XULE document. You can customize the syntax coloring in the Fonts and Colors | Text View section of the Options dialog.

XULESDocSyntaxColoring

 

Auto-completion

As you enter rules in the XULE document, you will receive two types of auto-completion help:

 

related to XULE language syntax

related to the structure of a selected XBRL taxonomy

 

XULEDocEditing

 

You can select the taxonomy you want to use in the Info Window (see screenshot below). In the XULE tab, click the icon to the right of the Taxonomy item, and, in the menu that appears, click Select Taxonomy. Then browse for the taxonomy and select it. Only one taxonomy can be added at a time. If you add a new taxonomy, it will replace the previous taxonomy. Alternatively, you can remove a taxonomy (see screenshot below) before adding a new one.

XULEDocSelectTaxonomy
Note:You must add to the XULE document the namespace declarations of all the taxonomy components that you need (see XULE document screenshot above). The namespace prefixes do not need to match that of the taxonomy, but it is best to keep the same namespace prefixes to avoid confusion. If you do not add namespace declarations, then auto-completion of taxonomy components will not work.

 

Validate XULE

A XULE document can be validated for correct syntax against the XULE language specification by using the XML | Validate (F8) command.

 

Integration in XMLSpy projects

You can integrate XULE documents in an XMLSpy project in the following way:

 

1.Add the XULE document to a suitable folder in an XMLSpy project.

2.In the project properties of that folder, enter the XBRL instance file on which you want to run the XULE file.

3.Right-click the XULE document in the project, and select the command XBRL | Execute XULE. The XULE document will be executed on the XBRL instance that was specified for the folder, and the results will be displayed in the Messages window or a new document (see XULE execution options).

 

© 2017-2023 Altova GmbH