Skip to content

Commit

Permalink
Add a constraint for #221 to error on bad group-as
Browse files Browse the repository at this point in the history
This new constraint implements a check for the following issue comment.

metaschema-framework/metaschema-java#221 (comment)
  • Loading branch information
aj-stein-gsa committed Oct 29, 2024
1 parent 0441e6d commit 9cb705d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions schema/metaschema/metaschema-module-constraints.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@
<description>Ensure each import is a Metaschema module.</description>
<message>Unable the resource at '{{ resolve-uri(@href) }}' is not a Metaschema module.</message>
</expect>
<expect id="module-model-group-as-in-json-invalid" target=".//(define-assembly|define-field|assembly|field)[@max-occurs=1]" test=".[not(group-as)]">
<formal-name>Group-As Behavior Used with Valid Max-Occurs</formal-name>
<description>Given group-as behavior for a parent assembly or field, you cannot have a group-as for multiple values.</description>
<message>The group-as for the parent location requires a max-occurs that is greater than 1 to support that feature.</message>
</expect>
</constraints>
</context>
<context>
Expand Down

0 comments on commit 9cb705d

Please sign in to comment.