The programming language (or scripting language) built into CSE HTML Validator (called TNPL) gives users a unique and powerful ability to customize the validation results by letting you create your own validation rules. With this programming/scripting language, customized programs (also called 'user functions') can be written to check tags, attributes, attribute values, and more. These custom programs and functions can generate custom validator messages based on the results of the checks.
TNPL programs can be assigned to tags, attributes, and more, so that when a tag or attribute is encountered during validation, the assigned program for that tag or attribute is run to perform the checks.
The Batch Wizard also supports customization using TNPL user functions.
Also using TNPL, event functions can be written in order to affect the behavior and output of the validator and Batch Wizard. Advanced customizations can be made using these event functions.
There are two main groups of event functions, those for the Batch Wizard and those for the Validator Engine. Each group of event functions can be placed in their own file (which is just a text file with UTF-8 encoding) or all the functions may be combined into one file and specified as the user functions file for both the Batch Wizard and the Validator Engine. In that case, functions that the Batch Wizard does not recognize (such as the Validator Engine functions) will be ignored by the Batch Wizard, and the functions that the Validator Engine does not recognize (such as the Batch Wizard functions) will be ignored by the Validator Engine.
NOTE: The Batch Wizard functions operate in their own environment (or scope), separately from the Validator Engine functions, so one group of functions cannot access variables from the other group. That is, the Batch Wizard functions cannot access variables set in a Validator Engine function and vice versa. Furthermore, each validation also operates in its own environment, so variables set during one validation operation cannot be accessed from a different validation operation. However, output can be shared in one file by writing with append mode using writeFile().
NOTE: Two or more functions with the same function name are allowed. Each function will be executed, but the order of execution is undefined.
Please choose a sub-topic for more information.