The parameter of a command C contained in the macro-command can contain variables. These variables are substituted with their values before executing command C.
Macro-variable substitution is also performed in the context, pattern and expression attributes of the match, test, get, set pseudo-commands.
Excerpt of example 2 below: <command name="putAttribute" parameter="%0 %1"/>.
| Variable | Description |
|---|---|
%0, %1, %2, ..., %9, %* | A macro-command can have a parameter. This string is split like in a command line. First 10 parts of the split parameter can be referenced as variables
|
%D, %d |
This variable is replaced by an empty string if the document being edited is found on a remote HTTP or FTP server.
|
%P, %p |
This variable is replaced by an empty string if the document being edited is found on a remote HTTP or FTP server.
Note that this URL does not end with a ' |
%N, %R, %E | %N is the base name of the document being edited. Example: %R is the base name of the document being edited without the extension, if any (sometimes called the root name). Example: %E is the extension of the document being edited, if any. Example: Note that the extension does not start with a ' |
%S |
|
| %U | User's account name. Example: john. |
| %H | User's home directory. Example: /home/john. |
%W, %w |
Note that this URL does not end with a ' |
%_ | A macro-command can be used to specify a ``pipe'' of commands. If variable Each executed command overwrites This variable is set to the empty string for commands which do not return a result. |
The "%" character can be escaped using "%%". The above variables can be specified as %{0}, %{1}, ..., %{R}, %{E}, etc, if it helps (see note about escaped URIs).