Skip to content

Commit 55527ef

Browse files
committed
with-parent-controls for import only for #1662
Add it for insert-controls, but not exclusion or merge, based upon team review and analysis of current profile resolution specification.
1 parent 1b3647a commit 55527ef

File tree

1 file changed

+39
-15
lines changed

1 file changed

+39
-15
lines changed

src/metaschema/oscal_profile_metaschema.xml

Lines changed: 39 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,24 @@
8181
<p>Identifies that all controls are to be included from the imported catalog or profile.</p>
8282
</remarks>
8383
</assembly>
84-
<assembly ref="select-control-by-id" min-occurs="1" max-occurs="unbounded">
85-
<use-name>include-controls</use-name>
86-
<group-as name="include-controls" in-json="ARRAY"/>
84+
<define-assembly name="include-controls">
85+
<formal-name>Select Control</formal-name>
86+
<description>Select a control or controls from an imported control set.</description>
87+
<flag ref="with-child-controls"/>
88+
<flag ref="with-parent-controls"/>
89+
<model>
90+
<field ref="with-id" max-occurs="unbounded">
91+
<group-as name="with-ids" in-json="ARRAY"/>
92+
</field>
93+
<assembly ref="matching" max-occurs="unbounded">
94+
<group-as name="matching" in-json="ARRAY"/>
95+
</assembly>
96+
</model>
8797
<remarks>
88-
<p>Identifies a subset of controls to import from the referenced catalog or profile by control identifier or match pattern.</p>
98+
<p>If <code>with-child-controls</code> is <q>yes</q> on the call to a control, no sibling <code>call</code>elements need to be used to call any controls appearing within it. This flag provides a way to include controls with all their dependent controls (enhancements) without having to call them individually.</p>
99+
<p>If <code>with-parent-controls</code> is <q>yes</q> on the call to a control, no sibling <code>call</code>elements need to be used to include any parent controls. This flag provides a way to include controls with all their ancestor controls (enhancements) without having to call them individually.</p>
89100
</remarks>
90-
</assembly>
101+
</define-assembly>
91102
</choice>
92103
<assembly ref="select-control-by-id" max-occurs="unbounded">
93104
<use-name>exclude-controls</use-name>
@@ -444,18 +455,12 @@
444455
<description>Select a control or controls from an imported control set.</description>
445456
<flag ref="with-child-controls"/>
446457
<model>
447-
<define-field name="with-id" as-type="token" max-occurs="unbounded">
448-
<formal-name>Match Controls by Identifier</formal-name>
449-
<description>Selecting a control by its ID given as a literal.</description>
458+
<field ref="with-id" max-occurs="unbounded">
450459
<group-as name="with-ids" in-json="ARRAY"/>
451-
</define-field>
452-
<define-assembly name="matching" max-occurs="unbounded">
453-
<formal-name>Match Controls by Pattern</formal-name>
454-
<description>Selecting a set of controls by matching their IDs with a
455-
wildcard pattern.</description>
460+
</field>
461+
<assembly ref="matching" max-occurs="unbounded">
456462
<group-as name="matching" in-json="ARRAY"/>
457-
<flag ref="pattern"/>
458-
</define-assembly>
463+
</assembly>
459464
</model>
460465
<remarks>
461466
<p>If <code>with-child-controls</code> is <q>yes</q> on the call to a control, no sibling <code>call</code>elements need to be used to call any controls appearing within it. Since generally, this is how control enhancements are represented (as controls within controls), this provides a way to include controls with all their dependent controls (enhancements) without having to call them individually.</p>
@@ -471,8 +476,27 @@
471476
</allowed-values>
472477
</constraint>
473478
</define-flag>
479+
<define-flag as-type="token" name="with-parent-controls">
480+
<formal-name>Include Parent Controls with Control</formal-name>
481+
<description>When a control is included, whether its parent (ancestor) controls are also included.</description>
482+
<constraint>
483+
<allowed-values>
484+
<enum value="yes">Include parent controls with an included control.</enum>
485+
<enum value="no">When importing a control, only include parent controls that are also explicitly called.</enum>
486+
</allowed-values>
487+
</constraint>
488+
</define-flag>
474489
<define-flag as-type="string" name="pattern">
475490
<formal-name>Pattern</formal-name>
476491
<description>A <a href="https://en.wikipedia.org/wiki/Glob_(programming)">glob expression</a> matching the IDs of one or more controls to be selected.</description>
477492
</define-flag>
493+
<define-field name="with-id" as-type="token">
494+
<formal-name>Match Controls by Identifier</formal-name>
495+
<description>Selecting a control by its ID given as a literal.</description>
496+
</define-field>
497+
<define-assembly name="matching">
498+
<formal-name>Match Controls by Pattern</formal-name>
499+
<description>Selecting a set of controls by matching their IDs with a wildcard pattern.</description>
500+
<flag ref="pattern"/>
501+
</define-assembly>
478502
</METASCHEMA>

0 commit comments

Comments
 (0)