Almost all child elements and attribute values in a process
element can include variables which are substituted just before the execution of the process-command. Example: <upload base="%0/">
.
Variable | Description |
---|---|
%0 , %1 , %2 , ..., %9 , %* | A process-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 ' |
%n , %r , %e | Similar to %N , %R , %E except that these variables contain properly escaped URI components. For example if %R contains "foo bar ", then %r contains "foo%20bar ". |
%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 ' |
%C , %c |
Note that this URL does not end with a ' |
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).
Most attribute and element values described in this documentation as being URIs (data type anyURI) in fact are not URIs. These attribute and element values can contain %-variables. They are required to be valid URIs only after the %-variables have been substituted with their values.
The problem is that URIs may also contain escaped characters which look very much like references to %-variables. For example, a whitespace must be escaped as "%20
", which looks like a reference to variable %2
followed by literal string "0
".
In practice:
It is recommended to specify variables as %{0}
, %{1}
, ..., %{d}
, %{E}
, etc, rather than as %0, %1, ..., %d, %E, etc, because it makes clear what is a variable reference and what is an escaped character.
An escaped character such as "%20" must be specified as "%%20" because variable substitution occurs before the URIs are used and because, during variable substitution, a real percent character can be protected against substitution by doubling it.
Example: relative URI "docs/my report/my.doc.%0", where variable %0 represents a file extension, must be specified as "docs/my%%20report/my%%20doc.%0".