DOORS Extension Language is a scripting language used to extend the functionality of IBM's Rational DOORS. This programming language is somewhat similar to C and C++. This language is specific to DOORS, and it has its own syntax, declaration, a forum to discuss the development, in addition to the specific reference manuals. DXL scripts were utilized to help the users of DOORS. Much of the native DOORS GUI is written in DXL. DXL is used in the client-server based "DOORS Classic"; it is not used in the newer web-based "DOORS Next Generation".
Usage of DXL
There are several of ways to use the DXL in the Rational DOORS.
"Editor DXL" is DXL typed into the DXL Editor window and run from there. It may or may not also be saved in some file. This DXL typically has some user interface, if only print statements.
"Menu DXL" is stored in Files and appear in DOORS windows, either the Explorer or open Module. The files must be of type, the files and the housing folders must be set up to display DOORS menus. It is otherwise like DXL Editor DXL.
"Attribute DXL" is stored in an Attribute Definition and saved in a Module. It has the context of a single object. When the object-attr-value is retrieved the code runs and calculates the value for that object. Calculated values are not saved in the module. Attr-DXL should be written to run without user interface and complete without any pauses.
"Layout DXL" is defined in a Column and saved in a module's View. It runs for an object when that object's layout column is displayed in the GUI. It is otherwise similar to Attr-DXL. Layout DXL can be generated by the traceability Wizard, and can be converted to Attr-DXL..
"Batch DXL" is stored in files. It runs when DOORS is run inbatch mode as either "Batch", "DXL", or "CLE" code defined in the batch process's command line. Since Batch mode as no GUI loaded, so DXL running in batch has some restrictions on what can run or how it is run, certainly it can have no GUI.
"Trigger DXL" is defined in a "Trigger" and stored either in a Module, a Project, or in the Database root. There is no native interface for Triggers; a file-based DXL is needed to create or delete the Trigger. When the Trigger's specified Event occurs any Triggers associated with that event run in order of priority. There are some restrictions on what can run inside a Trigger, but it can and often does have some Interface. "Post" event trigger run after the event; "Pre" event triggers run before the event and can prevent the event from happening. The most common types of events are opening/closing a module, selecting a new object, or saving an object-attr value. Dynamic triggers are not stored and exist only while DOORS is running on the client computer. A typical dynamic trigger would be a post-module-close trigger that will close a GUI associated with that module. A common mistake made while learning Triggers is to define a pre-module-close trigger that always prevents the module from closing.
"Eval DXL" is invoked from other DXL and runs in its own context. It is generally reserved for nuanced advanced DXL. "Top Eval" code gets deployed in the "top context" and applies to all future DXL until DOORS closes.
DXL script extensions
DXL scripts are usually stored with extension of ".dxl", however they do use the library files with extension ".inc".
"Hello, world" example
To print the "Hello, World", the following code will be used, print "Hello, World"
DXL editors
Sodius DXL Editor, built on top of Eclipse, is one tool which provides option to edit, browse, compile, execute, and debug DXL scripts. There are many open source and free editors like Notepad++ and jEdit that support DXL by custom properties.