|
113 | 113 | </context> |
114 | 114 |
|
115 | 115 | <context> |
116 | | - <metapath target="/profile"/> |
| 116 | + <metapath target="/profile/import"/> |
| 117 | + |
117 | 118 | <constraints> |
118 | | - <let var="resolved-profile-imports" expression="resolve-profile(doc(resolve-uri(import/@href)))/catalog"/> |
119 | | - <index id="oscal-profile-metadata-index-scoped-role-id" name="index-imports-metadata-role-id" target="map:merge($resolved-profile-imports/metadata/role ! map:entry(@id,.))?*"> |
120 | | - <formal-name>In-Scope Role Identifiers</formal-name> |
121 | | - <description>An index of role identifiers that are in-scope for the profile model. Roles are collected from imported catalogs and profiles. For a given role @id, a locally declared role takes precedence over a role that is imported, the role that was last imported.</description> |
| 119 | + <let var="resolved-profile-import" expression=".[@href] ! resolve-profile(doc(resolve-uri(Q{http://csrc.nist.gov/ns/oscal/1.0}resolve-reference(@href))))/catalog"/> |
| 120 | + <index id="oscal-profile-import-index-control-id" name="profile-import-index-control-id" target="$resolved-profile-import//control"> |
| 121 | + <formal-name>In-Scope Control Identifiers</formal-name> |
| 122 | + <description>An index of control identifiers that are in-scope for selection in the profile import.</description> |
122 | 123 | <key-field target="@id"/> |
123 | 124 | </index> |
124 | | - <index id="oscal-profile-index-imports-metadata-scoped-location-uuid" name="index-imports-metadata-location-uuid" target="map:merge($resolved-profile-imports/metadata/location ! map:entry(@uuid,.))?*"> |
125 | | - <key-field target="@uuid"/> |
126 | | - </index> |
127 | | - <index id="oscal-profile-index-imports-metadata-scoped-party-uuid" name="index-imports-metadata-party-uuid" target="map:merge($resolved-profile-imports/metadata/party ! map:entry(@uuid,.))?*"> |
128 | | - <key-field target="@uuid"/> |
129 | | - </index> |
130 | | - <index id="oscal-profile-index-imports-metadata-scoped-party-organization-uuid" name="index-imports-metadata-party-organization-uuid" target="map:merge($resolved-profile-imports/metadata/party[@type='organization'] ! map:entry(@uuid,.))?*"> |
131 | | - <key-field target="@uuid"/> |
132 | | - </index> |
133 | | - <index id="oscal-profile-index-imports-metadata-scoped-property-uuid" name="index-imports-metadata-property-uuid" target="map:merge($resolved-profile-imports//prop[@uuid] ! map:entry(@uuid,.))?*"> |
134 | | - <key-field target="@uuid"/> |
135 | | - </index> |
| 125 | + <index-has-key id="oscal-profile-import-has-key-include-exclude-control-id" name="profile-import-index-control-id" target="(include-controls|exclude-controls)/with-id"> |
| 126 | + <key-field target="."/> |
| 127 | + </index-has-key> |
136 | 128 | </constraints> |
137 | | - |
138 | | - <context> |
139 | | - <metapath target="import"/> |
140 | | - |
141 | | - <constraints> |
142 | | - <let var="resolved-profile-import" expression="resolve-profile(doc(resolve-uri(@href)))/catalog"/> |
143 | | - <index id="oscal-profile-import-index-control-id" name="profile-import-index-control-id" target="$resolved-profile-import//control"> |
144 | | - <formal-name>In-Scope Control Identifiers</formal-name> |
145 | | - <description>An index of control identifiers that are in-scope for selection in the profile import.</description> |
146 | | - <key-field target="@id"/> |
147 | | - </index> |
148 | | - <index-has-key id="oscal-profile-import-has-key-include-exclude-control-id" name="profile-import-index-control-id" target="(include-controls|exclude-controls)/with-id"> |
149 | | - <key-field target="."/> |
150 | | - </index-has-key> |
151 | | - </constraints> |
152 | | - </context> |
153 | 129 | </context> |
154 | 130 | <context> |
155 | 131 | <metapath target="/mapping-collection"/> |
|
176 | 152 | <context> |
177 | 153 | <metapath target="/component-definition"/> |
178 | 154 | <constraints> |
179 | | - <let var="all-imports" expression="recurse-depth('doc(resolve-uri(import-component-definition/@href))/component-definition')"/> |
| 155 | + <let var="all-imports" expression="import-component-definition ! recurse-depth('doc(resolve-uri(Q{http://csrc.nist.gov/ns/oscal/1.0}resolve-reference(@href)))/component-definition')"/> |
180 | 156 | <index id="oscal-component-definition-index-metadata-scoped-role-id" name="index-imports-metadata-role-id" target="map:merge($all-imports/metadata/role ! map:entry(@id,.))?*"> |
181 | 157 | <formal-name>In-Scope Role Identifiers</formal-name> |
182 | 158 | <description>An index of role identifiers that are in-scope for the component-definition model. Roles are collected from imported component-definition. For a given role @id, a locally declared role takes precedence over a role that is imported, the role that was last imported.</description> |
|
199 | 175 | <context> |
200 | 176 | <metapath target="/system-security-plan"/> |
201 | 177 | <constraints> |
202 | | - <let var="all-imports" expression="recurse-depth('resolve-profile(doc(resolve-uri(import-profile/@href)))/catalog')"/> |
| 178 | + <let var="all-imports" expression="resolve-profile(doc(resolve-uri(Q{http://csrc.nist.gov/ns/oscal/1.0}resolve-reference(import-profile/@href))))/catalog"/> |
203 | 179 | <index id="oscal-ssp-index-metadata-scoped-role-id" name="index-imports-metadata-role-id" target="map:merge($all-imports/metadata/role ! map:entry(@id,.))?*"> |
204 | 180 | <formal-name>In-Scope Role Identifiers</formal-name> |
205 | 181 | <description>An index of role identifiers that are in-scope for the system-securtity-plan model. Roles are collected from imported profiles and catalogs. For a given role @id, a locally declared role takes precedence over a role that is imported, the role that was last imported.</description> |
|
222 | 198 | <context> |
223 | 199 | <metapath target="/assessment-plan"/> |
224 | 200 | <constraints> |
225 | | - <let var="all-imports" expression="recurse-depth('.[import-ssp]/doc(resolve-uri(import-ssp/@href))/system-security-plan|.[import-profile]/resolve-profile(doc(resolve-uri(import-profile/@href)))/catalog')"/> |
| 201 | + <let var="all-imports" expression="recurse-depth('.[import-ssp]/doc(resolve-uri(Q{http://csrc.nist.gov/ns/oscal/1.0}resolve-reference(import-ssp/@href)))/system-security-plan|.[import-profile]/resolve-profile(doc(resolve-uri(Q{http://csrc.nist.gov/ns/oscal/1.0}resolve-reference(import-profile/@href))))/catalog')"/> |
226 | 202 | <index id="oscal-ap-index-metadata-scoped-role-id" name="index-imports-metadata-role-id" target="map:merge($all-imports/metadata/role ! map:entry(@id,.))?*"> |
227 | 203 | <formal-name>In-Scope Role Identifiers</formal-name> |
228 | 204 | <description>An index of role identifiers that are in-scope for the assessment-plan model. Roles are collected from imported system-securtity-plans, which in turn includes referenced profiles and catalogs. For a given role @id, a locally declared role takes precedence over a role that is imported, the role that was last imported.</description> |
|
245 | 221 | <context> |
246 | 222 | <metapath target="/assessment-results"/> |
247 | 223 | <constraints> |
248 | | - <let var="all-imports" expression="recurse-depth('.[import-ap]/doc(resolve-uri(import-ap/@href))/assessment-plan|.[import-ssp]/doc(resolve-uri(import-ssp/@href))/system-security-plan|.[import-profile]/resolve-profile(doc(resolve-uri(import-profile/@href)))/catalog')"/> |
| 224 | + <let var="all-imports" expression="recurse-depth('.[import-ap]/doc(resolve-uri(Q{http://csrc.nist.gov/ns/oscal/1.0}resolve-reference(import-ap/@href)))/assessment-plan|.[import-ssp]/doc(resolve-uri(Q{http://csrc.nist.gov/ns/oscal/1.0}resolve-reference(import-ssp/@href)))/system-security-plan|.[import-profile]/resolve-profile(doc(resolve-uri(Q{http://csrc.nist.gov/ns/oscal/1.0}resolve-reference(import-profile/@href))))/catalog')"/> |
249 | 225 | <index id="oscal-ar-index-metadata-scoped-role-id" name="index-imports-metadata-role-id" target="map:merge($all-imports/metadata/role ! map:entry(@id,.))?*"> |
250 | 226 | <formal-name>In-Scope Role Identifiers</formal-name> |
251 | 227 | <description>An index of role identifiers that are in-scope for the assessment-result model. Roles are collected from imported assessment-plans, which in turn includes referenced system-securtity-plans, which in turn includes referenced profiles and catalogs. For a given role @id, a locally declared role takes precedence over a role that is imported, the role that was last imported.</description> |
|
268 | 244 | <context> |
269 | 245 | <metapath target="/plan-of-action-and-milestones"/> |
270 | 246 | <constraints> |
271 | | - <let var="all-imports" expression="recurse-depth('.[import-ap]/doc(resolve-uri(import-ap/@href))/assessment-plan|.[import-ssp]/doc(resolve-uri(import-ssp/@href))/system-security-plan|.[import-profile]/resolve-profile(doc(resolve-uri(import-profile/@href)))/catalog')"/> |
| 247 | + <let var="all-imports" expression="recurse-depth('.[import-ap]/doc(resolve-uri(Q{http://csrc.nist.gov/ns/oscal/1.0}resolve-reference(import-ap/@href)))/assessment-plan|.[import-ssp]/doc(resolve-uri(Q{http://csrc.nist.gov/ns/oscal/1.0}resolve-reference(import-ssp/@href)))/system-security-plan|.[import-profile]/resolve-profile(doc(resolve-uri(Q{http://csrc.nist.gov/ns/oscal/1.0}resolve-reference(import-profile/@href))))/catalog')"/> |
272 | 248 | <index id="oscal-poam-index-metadata-scoped-role-id" name="index-imports-metadata-role-id" target="map:merge($all-imports/metadata/role ! map:entry(@id,.))?*"> |
273 | 249 | <formal-name>In-Scope Role Identifiers</formal-name> |
274 | 250 | <description>An index of role identifiers that are in-scope for the plan-of-action-and-milestones model. Roles are collected from imported system-securtity-plans, which in turn includes referenced profiles and catalogs. For a given role @id, a locally declared role takes precedence over a role that is imported, the role that was last imported.</description> |
|
0 commit comments