The TemplateEngine object is used to create strings which have system variable names replaced with their values. This is used by the Source context object to ensure that values taken from an XML element or attribute can be values values augmented with system or environment variable values. tools=${java.home}/lib/tools.jar Above is an example of the use of an system variable that has been inserted into a plain Java properties file. This will be converted to the full path to tools.jar when the system variable "java.home" is replaced with the matching value.
예제 #1
0
 /// <summary>
 /// Constructor for the <c>Source</c> object. This is used to
 /// maintain a context during the serialization process. It holds
 /// the <c>Strategy</c> and <c>Context</c> used in the
 /// serialization process. The same source instance is used for
 /// each XML element evaluated in a the serialization process.
 /// </summary>
 /// <param name="strategy">
 /// this is used to resolve the classes used
 /// </param>
 /// <param name="support">
 /// this is the context used to process strings
 /// </param>
 /// <param name="style">
 /// this is the style used for the serialization
 /// </param>
 /// <param name="strict">
 /// this determines whether to read in strict mode
 /// </param>
 public Source(Strategy strategy, Support support, Style style, bool strict) {
    this.filter = new TemplateFilter(this, support);
    this.engine = new TemplateEngine(filter);
    this.session = new Session();
    this.strategy = strategy;
    this.support = support;
    this.strict = strict;
    this.style = style;
 }