Macromedia flash media server 2-managing flash media server ユーザーズマニュアル
Symbolic text substitutions
81
Mapping environment variables
You can also specify symbols that resolve to environment variables. To refer to an environment
variable in one of the XML configuration files, use the name of the environment variable
within percent (
variable in one of the XML configuration files, use the name of the environment variable
within percent (
%
) characters. The
%
characters indicate to the server that the symbol refers to
an environment variable, and not to a user-defined string.
The syntax for specifying an environment variable as a symbol is
${%ENV_VAR_NAME%}
.
For example, the server will map the following symbol to the
COMPUTERNAME
variable:
${%COMPUTERNAME%}
Defining symbols outside the substitution.xml file
You can specify all of your text substitution mappings under the
Symbols
tag in
subsitutions.xml. However, you can also specify separate external files that contain symbol-to-
string mappings. To do this, specify one or more
string mappings. To do this, specify one or more
KeyValueFile
tags in the substitution.xml
file. Each of these tags can specify the location of one external file.
For example, the following XML specifies the file C:\testfiles\mySymbols.txt within the
substitution.xml file:
substitution.xml file:
<Root>
<KeyValueFile>C:\testfiles\mySymbols.txt</KeyValueFile>
</Root>
These external files are not in XML format. They simply contain a collection of symbol-value
pairs, where each symbol-value pair appears on a separate line and takes the following form:
pairs, where each symbol-value pair appears on a separate line and takes the following form:
symbol=value
The following example shows three symbol-value pairs:
USER_NAME=foo
USER_PSWD = bar
HELLO= " world "
USER_PSWD = bar
HELLO= " world "
Place comments on separate lines that begin with a number sign (
#
). Do not place comments
on the same line as a symbol definition.
The first equal sign (
=
) found in a line is considered the delimiter that separates the symbol
and the value. The server trims any leading or trailing white space from both the symbol and
the value. If the value is surrounded by double quotation marks, the server does not trim
leading or trailing white space within the quotation marks.
the value. If the value is surrounded by double quotation marks, the server does not trim
leading or trailing white space within the quotation marks.