An editor variable is a shorthand notation for context-dependent information, like a file or
folder path, a timestamp 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.
The following editor variables can be used in
Oxygen XML Developer
commands of external engines
or other external tools, in transformation scenarios, validation scenarios:
- ${oxygenHome} -
Oxygen XML Developer
installation folder as
URL.
- ${oxygenInstallDir} -
Oxygen XML Developer
installation folder as
file path.
- ${frameworks} - The path (as URL) of the
frameworks subfolder of the
Oxygen XML Developer
install folder.
- ${frameworksDir} - The path (as file path)
of the frameworks subfolder of the
Oxygen XML Developer
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
or in a
- ${selection} - The XML content of the current
selection in the editor panel. This variable can be used in a
or in a selection plugin.
- ${id} - Application-level unique identifier.
- ${uuid} - Universally unique identifier.
- ${env(VAR_NAME)} - Value of the
VAR_NAME environment variable.
- ${ask('user-message', param-type, 'default-value'
?)} - To prompt for values at runtime, use the ask('user-message',
param-type, 'default-value' ?) editor variable. The following parameters can be set:
- 'user-message' - the actual message to be displayed. Note the quotes
that enclose the message.
- param-type - optional parameter. Can have one of the following values:
- url - input is considered to be an URL.
Oxygen XML Developer
checks
that the URL is valid before passing it to the transformation.
- password - input characters are hidden.
- generic - the input is treated as generic text that requires no
special handling.
- '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' will be displayed for the user, the type is not
specified (the default is string), the default value will be
'default'.
- ${ask('message', password)} - 'message' will
be displayed for the user, the characters typed will be replaced with a circle
character.
- ${ask('message', password, 'default')} - Same as above, default
value will be 'default'.
- ${ask('message', url)} - 'message' will be
displayed for the user, the type of parameter will be URL.
- ${ask('message', url, 'default')} - Same as above, default
value will be 'default'.
- ${system(var.name)} - Value of the
var.name system variable.
- ${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.