Inline Definitions

Inline definitions are a mechanism to both define a named information element and instantiate it. In this way, inline definitions can be thought of as both definitions and instances, sharing most of the data elements of both.

Inline definitions are provided as a convenience to allow single-use information elements to be declared inline, within other definitions. Single-use, inline declarations are easier to maintain than a top-level definition that is referenced, since the maintainer doesn’t have to trace the reference.

Common Inline Definition Data

All inline definition types share a common syntax composed of the following XML attributes and elements.

Attributes:

AttributeData TypeUseDefault Value
@deprecatedversion (string)optional(no default)
@nametokenrequired(no default)

Elements:

ElementData TypeUse
<formal-name>string0 or 1
<description>markup-line0 or 1
<prop>special0 to ∞
<remarks>special0 or 1
<example>special0 to ∞

These attributes and elements are based on the definition common data elements, since an inline definition uses a reduced set of the same data with the same semantics.

Due to their single use nature, inline definitions do not allow the use of @scope or <use-name>.

  • Use of scope is not necessary, since inline definitions are always scoped to the inline context of their use. This inline scoping has equivalent behavior to @scope="local".
  • Use of a <use-name> is not needed, since strict control of naming is provided by @name.

Inline <define-flag>

An inline flag definition, represented by the <define-flag> element, is used to declare a single use, locally scoped flag within a top-level <define-field>, a top-level <define-assembly>, an inline <define-field>, or an inline <define-assembly>.

A inline flag definition provides the means to implement a simple, named information element with a value.

An inline flag definition is a leaf node in a Metaschema-based model that is intended to represent a granular particle of identifying and qualifying information.

The flag’s value is strongly typed using one of the built-in simple data types identified by the @as-type attribute.

The syntax of an inline flag definition is composed of the following XML attributes and elements.

Attributes:

AttributeData TypeUseDefault Value
@as-typetokenoptionalstring
@defaultstringoptional(no default)
@deprecatedversion (string)optional(no default)
@nametokenrequired(no default)
@requiredyes or nooptionalno

Elements:

ElementData TypeUse
<formal-name>string0 or 1
<description>markup-line0 or 1
<prop>special0 to ∞
<constraint>special0 or 1
<remarks>special0 or 1
<example>special0 to ∞

These attributes and elements are based on a combination of a reduced set of the data elements provided by the top-level flag definition and the flag instance, since an inline flag definition uses a reduced set of the same data with the same semantics.

The elements and attributes common to all inline definitions are defined earlier in this specification.

Inline <define-field>

An inline field definition, represented by the <define-field> element, is used to declare a single use, locally scoped field within a top-level <define-assembly> or an inline <define-assembly>.

A inline field definition provides the means to implement a complex named information element with a value and an optional set of flag instances.

An inline field definitions is an edge node in a Metaschema-based model. Fields are typically used to provide supporting information for a containing assembly definition. The optional flag instances, declared on an inline field definition, typically characterize or identify the field’s value. With optional use of flags, a field can be more or less complex, depending on the modeling need.

The fields’s value is strongly typed using one of the built-in simple data types or markup data types identified by the @as-type attribute.

The syntax of an inline field definition is composed of the following XML attributes and elements.

Attributes:

AttributeData TypeUseDefault Value
@as-typetokenoptionalstring
@collapsibleyes or nooptionalno
@defaultstringoptional(no default)
@deprecatedversion (string)optional(no default)
@in-xmlWRAPPED, WITH_WRAPPER or UNWRAPPEDoptionalWRAPPED
@max-occurspositive-integer or unboundedoptional1
@min-occursnon-negative-integeroptional0
@nametokenrequired(no default)

Elements:

ElementData TypeUse
<formal-name>string0 or 1
<description>markup-line0 or 1
<prop>special0 to ∞
json-keyspecial0 or 1
json-value-key or
json-value-key-flag
special0 or 1
<group-as>special0 or 1
flag or
define-flag
special0 or ∞
<constraint>special0 or 1
<remarks>special0 or 1
<example>special0 to ∞

These attributes and elements are based on a combination of a reduced set of the data elements provided by the top-level field definition and the field instance, since an inline field definition uses a reduced set of the same data with the same semantics.

The elements and attributes common to all inline definitions are defined earlier in this specification.

Inline <define-assembly>

An inline assembly definition, represented by the <define-assembly> element, is used to declare a single use, locally scoped assembly within a top-level <define-assembly> or an inline <define-assembly>.

A inline assembly definition provides the means to implement a complex, composite, named information element that collects and organizes other information elements, with no value of its own.

An assembly definition consists of an optional set of flags and an optional sequence of model instances.

An inline assembly definition is a compositional node in a Metaschema-based model. Assemblies are typically used to represent complex data objects, combining multiple information elements together into a composite object representing a larger semantic concept. An assembly’s flag instances typically characterize or identify this composite object, while its model instances represent the information being composed.

An assembly is similar to a field, except it contains structured content (objects or elements), not text or unstructured “rich text.” The contents permitted in a particular (type of) assembly are indicated in its model element.

An assembly definition has no value, so the @as-type and @default attributes are not permitted.

The syntax of an inline assembly definition is composed of the following XML attributes and elements.

Attributes:

AttributeData TypeUseDefault Value
@deprecatedversion (string)optional(no default)
@max-occurspositive-integer or unboundedoptional1
@min-occursnon-negative-integeroptional0
@nametokenrequired(no default)

Elements:

ElementData TypeUse
<formal-name>string0 or 1
<description>markup-line0 or 1
<prop>special0 to ∞
json-keyspecial0 or 1
json-value-key or
json-value-key-flag
special0 or 1
<group-as>special0 or 1
flag or
define-flag
special0 or ∞
<constraint>special0 or 1
<remarks>special0 or 1

These attributes and elements are based on a combination of a reduced set of the data elements provided by the top-level assembly definition and the assembly instance, since an inline assembly definition uses a reduced set of the same data with the same semantics.

The elements and attributes common to all inline definitions are defined earlier in this specification.