-
Notifications
You must be signed in to change notification settings - Fork 0
XML Schema
If an attribute/character data is configurable, it can take a value that starts with config: followed by a nested config key such that the value is detected dynamically. For example, if the value for a configurable is config:corge.grault, libkinetic will look for the key corge from the plugin config (Plugin::getConfig(), which must be an associative array, then look for the key grault inside this associative array.
The config search mechanism can be changed by overriding KineticAdapter::getKineticConfig($key).
By libkinetic convention, an element's ID is in the form foo.bar.qux, i.e. a few parts joined with a dot .. An ID usually starts with the parent ID foo.bar, then a dot ., then its own part qux. To make this easier, attributes defining an ID have this special rule:
If an ID starts with a dot
., the element must be the direct child of another element with an ID. The actual ID will be prepended with the parent element's ID. For example, if the element withid="foo.bar"has a child withid=".qux", the actual ID of the child isfoo.bar.qux.
A user string is an identifier to a message template that will be sent to the user. Specifically, this is usually an ID to a translation.
The XML schema of libkinetic is https://rawgit.com/SOF3/libkinetic/master/libkinetic.xsd. All elements and attributes described in this wiki are under this schema, unless otherwise specified. Custom elements and attributes defined by plugins should use a separate schema (hence a separate namespace).
Libkinetic's XML parser is xmlns-sensitive. If a document does not specify the empty namespace, the root tag is implicitly xmlns="https://rawgit.com/SOF3/libkinetic/master/libkinetic.xsd".
- The root element is a
<kinetic>.- Attributes:
-
namespace, required: The plugin's namespace used as the prefix for FQNs referenced in some nodes below.
-
- Children:
-
<include>,[0, ∞): Includes another kinetic file from the plugin resources folder.- Attributes:
-
path, required: The file path of the kinetic file relative to the resources folder. Can also start withhttp:///https://to require an online resource (will be cached), e.g. a GitHub raw link.
-
- Attributes:
-
<cont>, optional,[0, 1]: The generic command used for continuing the execution from a UI node.- Ignored in files included with
<include>. - Attributes:
-
name, required: The command name, configurable.
-
- Children:
-
<alias>,[0, ∞): Aliases for the command, configurable.- Character data: The alias name (configurable).
-
- Ignored in files included with
-
[0, ∞)UiNode. Details are given in the UiNode article. -
<wizard>,[0, ∞): Defines a wizard.- Attributes:
-
id, required: the ID of the wizard.
-
- Children:
-
<param>,[0, ∞): Defines a parameter variable. The variable is available at the whole<wizard>scope.- Attributes:
-
name, required: the name of the parameter. -
type, optional: the type of the parameter. Will be validated if specified.
-
- Attributes:
-
<return>,[0, ∞): Defines a return variable. Also declares a variable at the<wizard>scope.- Attributes:
-
name, required: the name of the return variable. -
type, optional: the type of the return variable. Will be validated if specified.
-
- Attributes:
-
- Attributes:
-
- Attributes: