pragma_struct
The pragma_struct function allows the Master Template to override selected features in the execution process and the creation of result documents.
FUNC TEXT pragma_struct (CONST TEXT feature_name; CONST TEXT feature_value; DATASTRUCTURE data_structure)
The result of this function is of TEXT.
This function has no effect on the AiaDocXML and HTML output.
The pragma function requires three parameters:
- feature_name, type TEXT. The type of feature to be applied.
- feature_value, type TEXT. Depends on the feature to be applied.
- data_structure, any DATASTRUCTURE variable or _data.
The following table lists currently supported features.
Feature |
Value |
Effect |
Result |
Output |
Header text |
Writes feature_value, followed by the full content of data_structure, formatted as XML into the result document. This function is intended for testing purposes only. All word processor content is stripped. This function is ignored when AIADOCXML output is requested and returns N. |
Y if the output was produced successfully; N otherwise. |
WriteDebugLog |
Header text |
Writes feature_value,followed by the full content of data_structure, formatted as XML into the debug log file. |
Y if debug logging was enabled; N otherwise. |
Any unsupported feature values are silently ignored and return an empty TEXT.
The resulting value of the pragma_struct function may contain word processor instructions. You should put these instructions in the result document using the @(...) construction. Manipulation of such a result using text_fragment, fragment_of_characters, replace or similar functions is not supported and can result in invalid result documents.