The following sections describe each of the nodes, and their attributes.
Common attributes
Some attributes are common to all nodes, except for Grammar Nodes. These are:
Attribute name | Description | Possible Values | Mandatory | Default |
optional | Whether the structure or value represented by the node will always be present in the file. | T for true or F for false | No | F |
template | Whether this node and all its children represent a template. Templates must be defined before any nodes that use them. | T for true or F for false | No | F |
definedBy | Indicates that this node uses a pre-defined template. If set, all of the attributes of the template node will be used as defaults for the attributes of this node, unless specific attribute values are set on this node to override the template values. | The name of the node defining the template. The referenced node must have the template attribute set to T. | No | None |
name | The name that will be reported in error messages, and that must be used when referring to this node from another node (e.g. to a template node). Although the name attribute is not mandatory on most nodes, it is best to always specify a name because this will improve error reporting if there is a problem processing a file. | Any alphanumberic string. However, must not start with a number or contain any spaces. | Yes for data nodes (Attribute, Tag, Length, Value, Bytes and Record). Otherwise no. | None |
scriptVariables | The names of Attribute Nodes that will be used as variables in Expressions elsewhere in the hierarchy of nodes inside this node. These variable names must match the names of Attributes Nodes contained somewhere in the hierarchy inside this node. | A comma separated list of Attribute Node names, e.g. attr1,attr2. | No | None |
variables | The names of Attributes Nodes that will be used as variables in the bits, bytes, length or times attributes of other nodes. These variable names must match the names of Attributes Nodes contained somewhere in the hierarchy inside this node. | A comma separated list of Attribute Node names, e.g. attr1,attr2. | No | None |