Skip to content

Commit

Permalink
Adjustments to alter, moving to to an inline definition
Browse files Browse the repository at this point in the history
  • Loading branch information
david-waltermire committed Aug 19, 2022
1 parent 4c28895 commit ea31b2b
Showing 1 changed file with 1 addition and 101 deletions.
102 changes: 1 addition & 101 deletions src/metaschema/oscal_profile_metaschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@
</define-assembly>
<define-assembly name="alter" max-occurs="unbounded">
<formal-name>Alteration</formal-name>
<description>An Alter element specifies changes to be made to an included control when a profile is resolved.</description>
<description>Specifies changes to be made to an included control when a profile is resolved.</description>
<group-as name="alters" in-json="ARRAY"/>
<flag ref="control-id" required="yes"/>
<model>
Expand Down Expand Up @@ -326,7 +326,6 @@
<description>A name given to the control, which may be used by a tool for display and navigation.</description>
</define-field>
<assembly ref="parameter" max-occurs="unbounded">
<!-- CHANGED: "parameters" to "params" -->
<group-as name="params" in-json="ARRAY"/>
</assembly>
<assembly ref="property" max-occurs="unbounded">
Expand All @@ -340,7 +339,6 @@
</assembly>
</model>
<constraint>
<!-- CHANGE: added allowed values for a property/@name -->
<allowed-values target="prop/@name" allow-other="yes">
&allowed-values-control-group-property-name;
</allowed-values>
Expand Down Expand Up @@ -425,104 +423,6 @@
<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>
</remarks>
</define-assembly>
<<<<<<< HEAD
=======
<define-assembly name="alter">
<formal-name>Alteration</formal-name>
<description>Specifies changes to be made to an included control when a profile is
resolved.</description>
<flag ref="control-id" required="yes"/>
<model>
<assembly ref="remove" max-occurs="unbounded">
<group-as name="removes" in-json="ARRAY"/>
</assembly>
<assembly ref="add" max-occurs="unbounded">
<group-as name="adds" in-json="ARRAY"/>
</assembly>
</model>
<remarks>
<p>Use <code>@control-id</code> to indicate the scope of alteration.</p>
<p>Multiple <code>alter</code> constructs may not apply to the same control.</p>
</remarks>
</define-assembly>
<define-assembly name="remove">
<formal-name>Removal</formal-name>
<description>Specifies objects to be removed from a control based on specific aspects of the object that must all match.</description>
<define-flag name="by-name" as-type="token">
<formal-name>Reference by (assigned) Name</formal-name>
<description>Identify items to remove by matching their assigned name</description>
</define-flag>
<define-flag name="by-class" as-type="token">
<formal-name>Reference by Class</formal-name>
<description>Identify items to remove by matching their <code>class</code>.</description>
</define-flag>
<define-flag name="by-id" as-type="token">
<formal-name>Reference by ID</formal-name>
<description>Identify items to remove indicated by their <code>id</code>.</description>
</define-flag>
<define-flag name="by-item-name" as-type="token">
<formal-name>Item Name Reference</formal-name>
<description>Identify items to remove by the name of the item's information element name, e.g. <code>title</code> or <code>prop</code></description>
</define-flag>
<define-flag name="by-ns" as-type="token">
<formal-name>Item Namespace Reference</formal-name>
<description>Identify items to remove by the item's <code>ns</code>, which is the namespace associated with a <code>part</code>, or <code>prop</code>.</description>
</define-flag>
<remarks>
<p>Use <code>by-name</code>, <code>by-class</code>, <code>by-id</code>, <code>by-ns</code> or <code>by-item-name</code> (potentially in combination) to indicate by appropriate matching object to remove when the profile is resolved. The control affected is indicated by the <code>control-id</code>on the <code>alter</code> construct.</p>
<p>To change contents of a control, use <code>remove</code> to remove an object, then <code>add</code> to add it back again with the changes.</p>
</remarks>
</define-assembly>
<define-assembly name="add">
<formal-name>Addition</formal-name>
<description>Specifies contents to be added into controls, in resolution</description>
<define-flag name="position" as-type="token">
<formal-name>Position</formal-name>
<description>Where to add the new content with respect to the targeted element (beside it or inside it)</description>
<constraint>
<allowed-values>
<enum value="before">Preceding the id-ref target</enum>
<enum value="after">Following the id-ref target</enum>
<enum value="starting">Inside the control or id-ref target, at the start</enum>
<enum value="ending">Inside the control or id-ref target, at the end</enum>
</allowed-values>
</constraint>
</define-flag>
<define-flag name="by-id" as-type="token">
<formal-name>Reference by ID</formal-name>
<description>Target location of the addition.</description>
</define-flag>
<model>
<define-field name="title" as-type="markup-line">
<formal-name>Title Change</formal-name>
<description>A name given to the control, which may be used by a tool for display and navigation.</description>
</define-field>
<assembly ref="parameter" max-occurs="unbounded">
<!-- CHANGED: "parameters" to "params" -->
<group-as name="params" in-json="ARRAY"/>
</assembly>
<assembly ref="property" max-occurs="unbounded">
<group-as name="props" in-json="ARRAY"/>
</assembly>
<assembly ref="link" max-occurs="unbounded">
<group-as name="links" in-json="ARRAY"/>
</assembly>
<assembly ref="part" max-occurs="unbounded">
<group-as name="parts" in-json="ARRAY"/>
</assembly>
</model>
<constraint>
<!-- CHANGE: added allowed values for a property/@name -->
<allowed-values target="prop/@name" allow-other="yes">
&allowed-values-control-group-property-name;
</allowed-values>
</constraint>
<remarks>
<p>When no <code>id-ref</code> is given, the addition is inserted into the control targeted by the alteration at the start or end as indicated by <code>position</code>. Only <code>position</code> values of "starting" or "ending" are permitted when there is no <code>id-ref</code>.</p>
<p><code>id-ref</code>, when given, should indicate, by its ID, an element inside the control to serve as the anchor point for the addition. In this case, <code>position</code> value may be any of the permitted values.</p>
</remarks>
</define-assembly>
>>>>>>> a8c12d91f (Proposed metaschema docs updates (#50))
<define-flag as-type="token" name="with-child-controls">
<formal-name>Include Contained Controls with Control</formal-name>
<description>When a control is included, whether its child (dependent) controls are also included.</description>
Expand Down

0 comments on commit ea31b2b

Please sign in to comment.