INCLUDE
You can use this element to split your SKIN file into several parts, so that your code is nicely separated. Don't forget to add DUMMY (or another root) element to the content of the included files.
Warning: cycles are not allowed for includes. Do not include a file that directly or indirectly includes the same file. To avoid cycles, it is possible to use the INCLUDE_ONCE element instead
Attributes brief detailed show all inherited
Name | Description | Default | |
---|---|---|---|
file | Path to the XML file to include | empty | |
content | XML content to include | empty | |
ignore_missing | When set to true, no error is thrown if the file is missing | false |
Examples
The following file:
if the include.xml file contains the following lines:
- <?xml version="1.0" encoding="utf-8" ?>
- <IMAGE_PARAM_KNOB param_id="dsp.input4" image="knob_black.bmp" image_orientation="horizontal" images_count="127" />
Will be equivalent to the following file:
- <?xml version="1.0" encoding="utf-8" ?>
- <SKIN language_version="1.0" background_color="#ffffff" repeat="true" h_margin="10" layout_type="row">
- <IMAGE_PARAM_KNOB param_id="dsp.input4" image="knob_black.bmp" image_orientation="horizontal" images_count="127" />
- </SKIN>
Just as if the code below the <?xml version="1.0" encoding="utf-8" ?> line had been pasted inside the including file.
Note that the included file has to be a valid XML file: the first line is mandatory, and the file must have a root element. If you want to include a file containing several elements in a list, they have to be enclosed in a root element. The DUMMY element can be used for this purpose.
Generating content on the fly
Using build-time scripting for VARIABLE and content attribute for INCLUDE you can generate SKIN content on the fly.
However, note that using REPEAT as "IF" to paste or skip some blocks of code (see examples in REPEAT) can be more convenient in many cases.