Editor variables

An editor variable is a shorthand notation for a file path or directory path. It is used in the definition of a command (the input URL of a transformation, the output file path of a transformation, the command line of an external tool, etc.) to make the command generic. When the same command is applied the notation is expanded so that the same command has different effects depending on the actual value of the notation.

The following editor variables can be used in <oXygen/> commands:

${oxygenHome}

Oxygen installation directory as URL

${oxygenInstallDir}

Oxygen installation directory

${frameworks}

the path of the frameworks subdirectory of the <oXygen/> install directory as URL

${frameworksDir}

the path of the frameworks subdirectory of the <oXygen/> install directory

${home}

the path of the user home directory as URL

${homeDir}

the path of the user home directory

${pdu}

Project directory as URL

${pd}

project directory - the path of the current project directory

${pn}

project name- the name of the current project

${cfdu}

current file directory url - the path of the current edited document up to the name of the parent directory as URL

${cfd}

current file directory - the path of the current edited document up to the name of the parent directory

${cfn}

current file name - the name of the current edited document without extension and parent directory

${cf}

current file - the absolute file path of the current edited document

${currentFileURL}

current file as URL - the absolute file path of the current edited document as URL

${ps}

Path Separator - The separator which can be used on different operating systems between libraries specified in the class path.

${timeStamp}

Time Stamp - The current Unix time on the computer which can be used to save transformation results in different output files on each transform.

 Custom editor variables

An editor variable can be created by the user and included in any user defined expression where a built-in editor variable is also allowed. For example a custom editor variable may be necessary for configuring the command line of an external tool, the working directory of a custom validator, the command line of aa custom XSLT engine, a custom FO processor, etc. All the custom editor variables are listed together with the built-in editor variables, for example when editing the working directory or the command line of an external tool or of a custom validator, the working directory or a custom validator, etc.

Creating a custom editor variable is very simple: just specify the name that will be used in user defined expressions, the value that will replace the variable name at runtime and a textual description for the user of that variable.

An editor variable can be created also from a Java system property. For example the Java system property var.name can be inserted in any expression where built-in editor variables like ${currentFileURL} are allowed with the expression ${system(var.name)}.

An editor variable can be created also from an environment variable of the operating system. For example the environment variable VAR_NAME can be inserted in any expression where built-in editor variables like ${currentFileURL} are allowed with the expression ${env(VAR_NAME)}.

The current date can be inserted at cursor location with the custom variable ${date(yyyy-MM-dd)}. The date format is: the year with 4 digits, the month with 2 leters, the day with 2 letters.

The custom editor variables are configured in Preferences.