Skip to content

Commit

Permalink
Clarify behavior for multiple constraints
Browse files Browse the repository at this point in the history
A key part of usnistgov#411 is clarifying what happens in the
presence of multiple allowed-values constraints. This commit adds
wording to address that.
  • Loading branch information
aj-stein-nist committed Aug 18, 2023
1 parent 4abfaef commit 06d4f07
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions website/content/specification/syntax/constraints.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,12 @@ Within `allowed-values` of a `constraint`, a Metaschema processor MUST strictly
</define-flag>
```

## `define-flag` constraints
### `define-flag` constraints

## `define-field` constraints
### `define-field` constraints

## `define-assembly` constraints
### `define-assembly` constraints

### Multiple allowed value constraints for the same target

A Metaschema processor MUST process and support validation of content instances of Metaschema modules with multiple `allowed-values` constraints for the same targets with an implicit or explicit `allow-other="no"` directive. Fields and flags may have their own internal enumerations, and assemblies themselves can define additional `allowed-values` constraints with `target` attributes for context-sensitive constraints to the same fields and flags, the result is compositional. A Metaschema processor MUST validate content instances with these constraints when there is an explicit or implicit `allow-other="no"` as a union of all enumerations applicable to the context-sensitive target. Below is an example.

0 comments on commit 06d4f07

Please sign in to comment.