Skip to content

Commit

Permalink
Allow only let in constraint for XML schema for #548
Browse files Browse the repository at this point in the history
  • Loading branch information
aj-stein-nist committed Feb 23, 2024
1 parent a8dc500 commit 0299d0a
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 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 minOccurs="0" maxOccurs="unbounded">
<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,8 +1260,7 @@

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

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

0 comments on commit 0299d0a

Please sign in to comment.