Model extensions support the re-use of sequences of frequently used statements. These model extensions are called by the defined name and shorten the code of plans and components. By default automaIT is delivered without any predefined model extensions.
Definition of Model Extensions
An XML file containing the statements has to be created. Its root element is
extensions. To define statements the element
command must be used.
These command elements contain:
- required and optional parameters
- block element that contains the content to be executed
The file has to be located in the file system of the server. Its location has to be referenced by the server property
Use of Model Extensions
Using the predefined model extensions requires::
- add additional namespace xmlns:ext="http://www.novatec-gmbh.de/np/schemas/server/model/extension" to plan or component.
- use this namespace for the predefined statements, e.g.
The schema file of the custom extensions (
custom-extensions.xsd) can be downloaded in the automaIT web UI (Menu element: extensions) to support code validation and completion in the XML Editor.
custom-extensions.xsd must be registered in the xml catalog analog to
model.xsd as described in Development Environment.