An editor variable is a shorthand notation for context-dependent information, like a file or
folder path, a time-stamp, or a date. It is used in the definition of a command (for example
the input URL of a transformation, the output file path of a transformation, the command line
of an external tool) to make a command or a parameter generic and reusable with other input
files. When the same command is applied to different files, the notation is expanded at the
execution of the command so that the same command has different effects depending on the
actual file.
You can use the following editor variables in Oxygen XML Editor commands of external
engines or other external tools, in transformation scenarios, validation scenarios, and
Author operations:
- ${oxygenHome} - Oxygen XML Editor installation folder as
URL;
- ${oxygenInstallDir} - Oxygen XML Editor installation folder as file path;
- ${frameworks} - The path (as URL) of the
frameworks subfolder of the Oxygen XML Editor install
folder;
- ${frameworksDir} - The path (as file path)
of the frameworks subfolder of the Oxygen XML Editor installation
folder;
- ${home} - The path (as URL) of the user home folder;
- ${homeDir} - The path (as file path) of the user
home folder;
- ${pdu} - Current project folder as URL;
- ${pd} - Current project folder as file path;
- ${pn} - Current project name;
- ${cfdu} - Current file folder as URL, that is the path of the
current edited document up to the name of the parent folder, represented as a URL;
- ${cfd} - Current file folder as file path, that is
the path of the current edited document up to the name of the parent folder;
- ${cfn} - Current file name without extension and
without parent folder;
- ${cfne} - Current file name with extension;
- ${cf} - Current file as file path, that is the
absolute file path of the current edited document;
- ${cfu} - The path of the current file as a URL;
- ${af} - The file path of the zip archive that includes the current
transformed file (this variable is available only in a transformation scenario);
- ${afu} - The URL of the zip archive that includes the current
transformed file (this variable is available only in a transformation scenario);
- ${afd} - The directory of the zip archive that includes the current
transformed file (this variable is available only in a transformation scenario);
- ${afdu} - The URL of the directory of the zip archive that includes
the current transformed file (this variable is available only in a transformation
scenario);
- ${afn} - The file name (without parent directory and without file
extension) of the zip archive that includes the current transformed file (this variable is
available only in a transformation scenario);
- ${afne} - The file name (with file extension, for example
.zip or .epub, but without parent directory) of
the zip archive that includes the current transformed file (this variable is available only
in a transformation scenario);
- ${currentFileURL} - Current file as URL,
that is the absolute file path of the current edited document represented as URL;
- ${ps} - Path separator, that is the separator which can be used on
the current platform (Windows, Mac OS X, Linux) between library files specified in the class
path;
- ${timeStamp} - Time stamp, that is the current
time in Unix format. It can be used for example to save transformation results in different
output files on each transform;
- ${caret} - The position where the caret is
inserted. This variable can be used in a code template , in Author operations, or
in a selection plugin;
- ${selection} - The XML content of the current
selection in the editor panel. This variable can be used in a code template
and Author
operations, or in a selection plugin;
- ${id} - Application-level unique identifier;
- ${uuid} - Universally unique identifier;
- ${env(VAR_NAME)} - Value of the
VAR_NAME environment variable. The environment variables are managed by the
operating system. If you are looking for Java System Properties, use the
${system(var.name)} editor variable;
- ${ask('message', type, ('real_value1':'rendered_value1';
'real_value2':'rendered_value2'; ...), 'default_value')} - To prompt for
values at runtime, use the ask('message', type, ('real_value1':'rendered_value1';
'real_value2':'rendered_value2'; ...), 'default-value'') editor variable. You can set
the following parameters:
- 'message' - the displayed message. Note the quotes that enclose the
message;
- type - optional parameter. Can have one of the following values:
- 'default-value' - optional parameter. Provides a default value in the
input text box;
Examples:
- ${ask('message')} - Only the message displayed for the user is
specified.
- ${ask('message', generic, 'default')} -
'message' is displayed, the type is not specified (the default
is string), the default value is 'default'.
- ${ask('message', password)} - 'message' is
displayed, the characters typed are masked with a circle symbol.
- ${ask('message', password, 'default')} - same as before, the
default value is 'default'.
- ${ask('message', url)} - 'message' is
displayed, the parameter type is URL.
- ${ask('message', url, 'default')} - same as before, the default
value is 'default'.
- ${system(var.name)} -
Value of the var.name Java system property. The Java system properties can be
specified in the command line arguments of the Java runtime as
-Dvar.name=var.value. If you are looking for operating system environment
variables, use the${env(VAR_NAME)} editor variable instead.
- ${date(pattern)} - Current date. Follows the given
pattern. Example: yyyy-MM-dd;
- ${dbgXML} - The path to the current Debugger
source selection (for tools started from the XSLT/XQuery Debugger);
- ${dbgXSL} - The path to the current Debugger
stylesheet selection (for tools started from the XSLT/XQuery Debugger);
- ${tsf} - The transformation result file;
- ${ps} - The path separator which can be used on
different operating systems between libraries specified in the class path;
- ${dsu} - The path of the detected schema as a
URL;
- ${ds} - The path of the detected schema as a local
file path;
- ${cp} - Current page number;
- ${tp} - Total number of pages in the document.