Skip to content

Commit

Permalink
Allow only let in constraint for XML schema for usnistgov#548
Browse files Browse the repository at this point in the history
  • Loading branch information
aj-stein-nist committed Feb 23, 2024
1 parent 7b93f17 commit 5c2e09d
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions schema/xml/metaschema.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -1175,20 +1175,14 @@
<xs:attribute name="expression" type="MetaschemaPathType" use="required"/>
</xs:complexType>

<xs:group name="LetExpressionGroup">
<xs:sequence>
<xs:element name="let" type="ConstraintLetType" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Declares a variable whose name is bound to the result of the Metapath expression. These variables can be used in target and other Metapath expressions used in constrains that are declared in the same context or in constraints declared in a child assembly, field, or flag.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:group>

<xs:complexType name="DefineFlagConstraintsType">
<xs:sequence>
<xs:group ref="LetExpressionGroup"/>
<xs:choice maxOccurs="unbounded">
<xs:element name="let" type="ConstraintLetType">
<xs:annotation>
<xs:documentation>Declares a variable whose name is bound to the result of the Metapath expression. These variables can be used in target and other Metapath expressions used in constrains that are declared in the same context or in constraints declared in a child assembly, field, or flag.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="allowed-values" type="AllowedValuesType">
<xs:annotation>
<xs:documentation>Constrains the allowed values for the flag.</xs:documentation>
Expand Down Expand Up @@ -1216,6 +1210,11 @@

<xs:group name="TargetedCommonConstraintsGroup">
<xs:choice>
<xs:element name="let" type="ConstraintLetType">
<xs:annotation>
<xs:documentation>Declares a variable whose name is bound to the result of the Metapath expression. These variables can be used in target and other Metapath expressions used in constrains that are declared in the same context or in constraints declared in a child assembly, field, or flag.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="allowed-values" type="TargetedAllowedValuesConstraintType">
<xs:annotation>
<xs:documentation>Constrains the allowed values for the flag or field referenced by the scope attribute.</xs:documentation>
Expand Down Expand Up @@ -1261,7 +1260,6 @@

<xs:complexType name="DefineFieldConstraintsType">
<xs:sequence>
<xs:group ref="LetExpressionGroup"/>
<xs:choice minOccurs="1" maxOccurs="unbounded">
<xs:group ref="TargetedCommonConstraintsGroup"/>
</xs:choice>
Expand All @@ -1271,7 +1269,6 @@

<xs:complexType name="DefineAssemblyConstraintsType">
<xs:sequence>
<xs:group ref="LetExpressionGroup"/>
<xs:choice minOccurs="1" maxOccurs="unbounded">
<xs:group ref="TargetedCommonConstraintsGroup"/>
<xs:group ref="AssemblyConstraintsGroup"/>
Expand Down

0 comments on commit 5c2e09d

Please sign in to comment.