Glossary
The following terminology is used in this specification:
Assembly
An assembly is defined as follows:
An assembly does not have an associated value.
An assembly may reference or directly define zero or more flags. Flag instances associated with an assembly definition typically provide additional metadata used to identify or characterize the object represented by the assembly.
An assembly has an optional model consisting of references to zero or more assemblies or fields as model instances. These model instances allow complex data to be composed within an assembly.
An assembly definition is a type of definition within a given Metaschema module used to represent the implementation of a complex information element as an assembly.
Constraint
A constraint is defined as follows:
Constraints enable content validation beyond what format-specific schemas (XML Schema, JSON Schema) can express. They are declared within definitions and apply to the data instances that conform to those definitions.
Constraints use Metapath expressions extensively for:
- Target selection (
@target): Identifying which nodes the constraint applies to - Condition testing (
@test): Evaluating boolean conditions that must be satisfied - Variable binding (
@expressionin<let>): Capturing values for reuse within the constraint - Message templates (
{expression}syntax): Generating dynamic error messages when validation fails
The <let> element declares variables using Metapath expressions, making computed values available for reuse across constraints within the same scope.
The following constraint types are supported:
| Constraint Type | Purpose |
|---|---|
allowed-values | Restricts a value to an enumerated set of allowed values |
expect | Asserts that a boolean condition must evaluate to true |
has-cardinality | Enforces minimum and/or maximum occurrence counts |
index | Defines a named index for looking up nodes by key |
index-has-key | Validates that a value exists as a key in a defined index |
is-unique | Ensures values are unique within a specified scope |
matches | Validates that a value matches a regular expression or data type pattern |
See Constraints for complete documentation on declaring and using constraints.
Data Model
A data model, abbreviated as DM, is defined as follows:
As described by RFC 3444), a data model is defined at a lower level of abstraction than the information model it represents, and includes many details.
- Intended for implementors
- Include protocol-specific constructs.
In Metaschema, the format-specific schema (i.e., XML or JSON Schema) is generated within the Metaschema architecture from a Metaschema module. By defining data models appropriate and tuned for each format, these generated schemas can be used to validate that data is conformant to the associated format, and thus conformant to the information model defined by a given Metaschema module.
Definition
An assembly definition, field definition, or flag definition are types of definitions within a Metaschema module.
Domain
An information domain is defined as follows:
Flag
A flag is defined as follows:
A flag is a pairing of a name and a value.
A flag typically provides identifying or classifying information for the containing assembly or field.
The flag’s value is strongly typed using one of the built in simple data types.
A flag definition is a type of definition within a given Metaschema module used to represent the implementation of a simple, named information element with an associated primitive value as a flag.
Field
A field is defined as follows:
A field is typically used to provide supporting information for a containing assembly.
The field’s value is strongly typed using one of the built in simple data types or markup data types.
A field definition is a type of definition within a given Metaschema module used to represent the implementation of a named complex information element with an associated primitive or markup typed value, and zero or more flags as a field.
Information Element
An information element is defined as follows:
An information element is implemented by a definition in a Metaschema module.
Information Model
An information model, abbreviated as IM, is defined as follows:
As described by RFC 3444), an IM describes information elements at a conceptual level, independent of any specific implementations or protocols used to transport the data.
- Level of abstraction depends on the modeling needs of the designers
- Define relationships between managed objects
- Should hide all protocol or implementation details, allowing for different implementations
Metapath
Metapath is defined as follows:
Metapath expressions use a path-based syntax to navigate the hierarchical structure of assemblies, fields, and flags in a format-independent manner. This allows the same expressions to work across JSON, YAML, and XML representations of the same data.
Metapath expressions are used in constraints to specify target nodes, define test conditions, bind variables, and generate dynamic constraint messages. See Metapath Expression Language for complete documentation.
Metaschema Module
A Metaschema module is defined as follows:
A Metaschema module is composed of flag, field, and assembly definitions.
- Flag: A simple named data object with an associated scalar value. A simple name / value pair. A flag is used to represent a leaf information element.
- Field: A complex named data object with an associated scalar or markup typed value and zero or more flags. A field is used to represent an edge information element.
- Assembly: A complex named data object, with no value, zero or more flags, and a complex model consisting of a combination of child fields and assemblies. An assembly is used to represent a composite information element.
A Metaschema module can be used as the basis for producing schema files, content conversion utilities, documentation, parsing code, and other artifacts that can be used in support of handling data aligned with an information model.