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:
Attribute | Data Type | Use | Default Value |
---|---|---|---|
@deprecated | version (string ) | optional | (no default) |
@name | token | required | (no default) |
Elements:
Element | Data Type | Use |
---|---|---|
<formal-name> | string | 0 or 1 |
<description> | markup-line | 0 or 1 |
<prop> | special | 0 to ∞ |
<remarks> | special | 0 or 1 |
<example> | special | 0 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.
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:
Attribute | Data Type | Use | Default Value |
---|---|---|---|
@as-type | token | optional | string |
@default | string | optional | (no default) |
@deprecated | version (string ) | optional | (no default) |
@name | token | required | (no default) |
@required | yes or no | optional | no |
Elements:
Element | Data Type | Use |
---|---|---|
<formal-name> | string | 0 or 1 |
<description> | markup-line | 0 or 1 |
<prop> | special | 0 to ∞ |
<constraint> | special | 0 or 1 |
<remarks> | special | 0 or 1 |
<example> | special | 0 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.
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:
Attribute | Data Type | Use | Default Value |
---|---|---|---|
@as-type | token | optional | string |
@collapsible | yes or no | optional | no |
@default | string | optional | (no default) |
@deprecated | version (string ) | optional | (no default) |
@in-xml | WRAPPED , WITH_WRAPPER or UNWRAPPED | optional | WRAPPED |
@max-occurs | positive-integer or unbounded | optional | 1 |
@min-occurs | non-negative-integer | optional | 0 |
@name | token | required | (no default) |
Elements:
Element | Data Type | Use |
---|---|---|
<formal-name> | string | 0 or 1 |
<description> | markup-line | 0 or 1 |
<prop> | special | 0 to ∞ |
json-key | special | 0 or 1 |
json-value-key orjson-value-key-flag | special | 0 or 1 |
<group-as> | special | 0 or 1 |
flag ordefine-flag | special | 0 or ∞ |
<constraint> | special | 0 or 1 |
<remarks> | special | 0 or 1 |
<example> | special | 0 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 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:
Attribute | Data Type | Use | Default Value |
---|---|---|---|
@deprecated | version (string ) | optional | (no default) |
@max-occurs | positive-integer or unbounded | optional | 1 |
@min-occurs | non-negative-integer | optional | 0 |
@name | token | required | (no default) |
Elements:
Element | Data Type | Use |
---|---|---|
<formal-name> | string | 0 or 1 |
<description> | markup-line | 0 or 1 |
<prop> | special | 0 to ∞ |
json-key | special | 0 or 1 |
json-value-key orjson-value-key-flag | special | 0 or 1 |
<group-as> | special | 0 or 1 |
flag ordefine-flag | special | 0 or ∞ |
<constraint> | special | 0 or 1 |
<remarks> | special | 0 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.