+
+7.1 Declaration vs Definition
+
+A declaration associates a layout to a type, without specifying where
+this type is located in the event structure hierarchy (see Section 6).
+This therefore includes typedef, typealias, as well as all type
+specifiers. In certain circumstances (typedef, structure field and
+variant field), a declaration is followed by a declarator, which specify
+the newly defined type name (for typedef), or the field name (for
+declarations located within structure and variants). Array and sequence,
+declared with square brackets ("[" "]"), are part of the declarator,
+similarly to C99.
+
+A definition associates a type to a location in the event structure
+hierarchy (see Section 6).
+
+
+7.2 Metadata Scopes
+
+CTF metadata uses two different types of scoping: a lexical scope is
+used for declarations and type definitions, and a dynamic scope is used
+for variants references to tag fields.
+
+7.2.1 Lexical Scope
+
+Each of "trace", "stream", "event", "struct" and "variant" have their own
+nestable declaration scope, within which types can be declared using "typedef"
+and "typealias". A root declaration scope also contains all declarations
+located outside of any of the aforementioned declarations. An innermost
+declaration scope can refer to type declared within its container
+lexical scope prior to the innermost declaration scope. Redefinition of
+a typedef or typealias is not valid, although hiding an uppermost scope
+typedef or typealias is allowed within a sub-scope.
+
+7.2.2 Dynamic Scope
+
+For variant tag definition only, the dynamic scope used to look up the
+location of the associated tag field consists in the lexical scope of
+the structures where the variant is declared, extended with the implicit
+dynamic scope specified by the event structure hierarchy presented at
+the beginning of Section 6. Therefore, lower levels in the dynamic scope
+(e.g. event context) can refer to a tag field located in upper levels
+(e.g. in the event header) by specifying, in this case,
+"header.field_name" as tag identifier. This allows, for instance, the
+event context to define a variant referring to the "id" field of the
+event header as selector.
+
+The target dynamic scope must be specified explicitly when referring to
+a field outside of the local static scope. The dynamic scope prefixes
+are thus:
+
+ - Stream Packet Context: "stream.packet.context.",
+ - Event Header: "stream.event.header.",
+ - Stream Event Context: "stream.event.context.",
+ - Event Context: "event.context.",
+ - Event Payload: "event.fields.".
+
+Multiple declarations of the same field name within a single scope is
+not valid. It is however valid to re-use the same field name in
+different scopes. There is no possible conflict, because the dynamic
+scope must be specified when a variant refers to a tag field located in
+a different dynamic scope.
+
+
+7.2 Metadata Examples
+