RXS_loadTpl()
Use this subprocedure to load a new template into the Template Engine. A template is essentially a file in the IFS that contains XML with named sections and variable data placeholders. Commonly programmers reuse templates across applications or web services. For instance, if many RPG web service applications use the same envelope tag, a separate file can store the header and footer of the envelope (e.g. envelope_header.tpl and envelope_footer.tpl) that encapsulates contents composed using a variety of content templates.
Note: If your program uses the default section and variable data placeholder delimiters then you can simply use the pFile parameter and not pass the rest (i.e. RXS_loadTpl(‘myfile.tpl’) ).
Subprocedure Prototype
|
Used to load a template file. Can be used to override defaults for section and variable delimeters. |
|
Required Specify the template file to load into the Template Engine. You can pass a fully qualified path (e.g. '/www/rxs/template/mytemplate.tpl') or a relative path based on the default template directory (e.g. 'mytemplate.tpl'). The default template directory can be found in physical file RXSCFG. |
|
Override the default section start delimiter found in RXSCFG with one of your own. |
|
Override the default section end delimiter found in RXSCFG with one of your own. |
|
Override the default variable data placeholder start delimiter found in RXSCFG with one of your own. |
|
Override the default variable data placeholder end delimiter found in RXSCFG with one of your own. |