$$prop: val1 : name1 , val2 : name2 , ...
The presence of a $$prop: string on a line of text in the configuration file means that this line contains one or more property values. Usually, the "$$prop:" string and the rest of the line of text are made invisible to the application that uses this configuration file by making it appear as a comment, e.g., if the configuration file is a Perl script this might look like:
$port = 3306 # $$prop: 3306:ip_port
The val:name pairs following the markup identifier string are interpreted as follows:
val1:name1 indicates that the first occurrence of the string val1 on this line is to be treated as the value of the property name1 and replaced whenever that property needs to be changed.
val2:name2 indicates that the first occurrence of the string val2 following the first occurrence of val1 is the value of the property name2.
etc.x1 = 1 # $$prop: 1:val
will cause the '1' in x1 to be considered the value of the property 'val'. To make the string '1' that follows the = sign be the property value, the markup has to be:
x1 = 1 # $$prop: 1:-, 1:val
The special '-' property name is also used in case the property value is the empty string, e.g., in the following markup the property is the empty string that follows the "x1 = " string:
x1 = #$$prop: "x1 = ":- , "":val
If a value contains punctuation characters that are part of the markup syntax (colon, comma, space), the value must be quoted, using the double-quote syntax that is defined for the ADL descriptor files.
$$propN: val1 : name1 , val2 : name2 , ... [$$]
This markup is used for configuration files that do not allow comment text to appear on the same line as the value that needs to be exposed as a modifiable property. It is similar to the inline syntax, but it indicates that the text on the line that follows the one on which the markup appears is to be searched for matching strings, not the current line.
$$propF: val1 : name1 , val2 : name2 , ... $$
This markup is used for configuration files in which the newline character is not considered different from other whitespace and updates of the file may cause newlines to be added or removed at any place where un-quoted whitespace occurs. For this type of markup, a closing $$ sequence is required to indicate the end of the list of val:name pairs. Newlines are allowed between the val:name pairs. All text following the closing $$ mark, regardless of newlines is searched for strings matching the values, until all values are found or until 1K of text is read for each val:name pair (if the latter occurs without finding all values, an error is reported). Note that each property value is still expected to reside on a single line.
<!-- $$propF "&":my_prop $$ --><sometag someattr="text & more text">
is not valid, even though "&" is OK to appear in the comment, and must be re-done this way:
<!-- $$propF "&":my_prop $$ --><sometag someattr="text & more text">
The quoting of the data values may be in different formats, depending on the file type, as specified by the 'quoting=' attribute (see the component descriptor syntax). This quoting is independent of the C-style double quotes used by the markup syntax itself to enclose a property value - the latter is always done with the C-style double quotes and is superimposed on top of the former, e.g., the string 'abc"def', which may be quoted as abc\"def for a C file, will appear as follows in the markup:
p = "abc\"def"; // $$prop "abc\\\"def":p_val
| Topic AdvADLPropertyMarkup . { Edit | WYSIWYG | Attach | Backlinks: Web All webs | Printable | History: %REVISIONS% More } |
|
Copyright © 2005-2007 3tera, Inc. All Rights Reserved.
|