It is possible to break down a script definition into multiple files thus providing a re-use mechanism.
In order to achieve this, a script definition will have to reference subscripts. Each of these subscripts will be a standalone script that can be run independently.
Here is an example of a script that can be used as a subscript:
<?xml version="1.0" encoding="UTF-8"?> <ieg-script ...> <identifier id="Subscript" scriptversionnumber="V1" type="Test" /> <question-page ...> ... </question-page> ... </ieg-script>
The script in the above example code snippet can be included in another script as a subscript, as follows:
<?xml version="1.0" encoding="UTF-8"?> <ieg-script ...> <identifier id="Script" scriptversionnumber="V1" type="Test" /> <section> <ieg-sub-script> <identifier id="Subscript" scriptversionnumber="V1" type="Test" /> </ieg-sub-script> </section> <section> ... </section> ... </ieg-script>
The possible point of insertion of a subscript in a script can be as follows:
Another limitation to keep in mind is that a subscript can appear only once in a script as the page IDs must be unique within the resulting script.
Note that a script might be used as a subscript elsewhere. When modifying scripts, ensure that any referencing scripts are re-tested to ensure the changes do not have an undesired impact.