Skip to content

Commit f0d7ff6

Browse files
committed
Add with-parent-controls for import inclusion (and not exclusion) for #1662.
1 parent 45ad642 commit f0d7ff6

File tree

1 file changed

+35
-5
lines changed

1 file changed

+35
-5
lines changed

src/metaschema/oscal_profile_metaschema.xml

+35-5
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,28 @@
8989
</remarks>
9090
</assembly>
9191
</choice>
92-
<assembly ref="select-control-by-id" max-occurs="unbounded">
93-
<use-name>exclude-controls</use-name>
94-
<group-as name="exclude-controls" in-json="ARRAY"/>
92+
<define-assembly name="exclude-controls" scope="local">
93+
<formal-name>Select Control</formal-name>
94+
<description>Select a control or controls from an imported control set.</description>
95+
<flag ref="with-child-controls"/>
96+
<model>
97+
<define-field name="with-id" as-type="token" max-occurs="unbounded">
98+
<formal-name>Match Controls by Identifier</formal-name>
99+
<description>Selecting a control by its ID given as a literal.</description>
100+
<group-as name="with-ids" in-json="ARRAY"/>
101+
</define-field>
102+
<define-assembly name="matching" max-occurs="unbounded">
103+
<formal-name>Match Controls by Pattern</formal-name>
104+
<description>Selecting a set of controls by matching their IDs with a
105+
wildcard pattern.</description>
106+
<group-as name="matching" in-json="ARRAY"/>
107+
<flag ref="pattern"/>
108+
</define-assembly>
109+
</model>
95110
<remarks>
96-
<p>Identifies which controls to exclude, or eliminate, from the set of included controls by control identifier or match pattern.</p>
111+
<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>
97112
</remarks>
98-
</assembly>
113+
</define-assembly>
99114
</model>
100115
<remarks>
101116
<p>The contents of the <code>import</code> element indicate which controls from the source will be included. Controls from the source catalog or profile may be either selected, using the <code>include-all</code> or <code>include-controls</code> directives, or de-selected (using an <code>exclude-controls</code> directive).</p>
@@ -443,6 +458,7 @@
443458
<formal-name>Select Control</formal-name>
444459
<description>Select a control or controls from an imported control set.</description>
445460
<flag ref="with-child-controls"/>
461+
<flag ref="with-parent-controls"/>
446462
<model>
447463
<define-field name="with-id" as-type="token" max-occurs="unbounded">
448464
<formal-name>Match Controls by Identifier</formal-name>
@@ -475,4 +491,18 @@
475491
<formal-name>Pattern</formal-name>
476492
<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>
477493
</define-flag>
494+
<define-flag as-type="token" name="with-parent-controls">
495+
<formal-name>Include Parent Controls with Control</formal-name>
496+
<description>When a control is included, whether its lineage of parent (ancestor) controls are also included.</description>
497+
<constraint>
498+
<allowed-values>
499+
<enum value="yes">Include parent controls with an included control.</enum>
500+
<enum value="no">When importing a control, only include parent controls that are also explicitly called.</enum>
501+
</allowed-values>
502+
</constraint>
503+
</define-flag>
504+
<define-flag as-type="string" name="pattern">
505+
<formal-name>Pattern</formal-name>
506+
<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>
507+
</define-flag>
478508
</METASCHEMA>

0 commit comments

Comments
 (0)