diff --git a/src/utils/util/resolver-pipeline/oscal-profile-resolve-merge.xsl b/src/utils/util/resolver-pipeline/oscal-profile-resolve-merge.xsl index d6464f5506..89099f6f9f 100644 --- a/src/utils/util/resolver-pipeline/oscal-profile-resolve-merge.xsl +++ b/src/utils/util/resolver-pipeline/oscal-profile-resolve-merge.xsl @@ -1,6 +1,7 @@ - - + + + @@ -25,34 +28,43 @@ templates not this one. --> - + + - + + - + - + - + - + + + - - - + + + - + @@ -64,7 +76,8 @@ - + + @@ -77,18 +90,34 @@ - - - + + + + + + + + Found multiple structuring directives. Choose at most one from: flat (default), as-is, custom. + Error + + + + + + + + - + - + + - + @@ -96,64 +125,58 @@ - - - - - - - - + + - + - - + + - - - - - - + - - + + + + + + + - + - + + - + + - - - - - - --> - - + + - + @@ -177,6 +200,7 @@ + @@ -194,15 +218,26 @@ - - ... elements of different types combining ... + + + + + + Combining elements of different types is not supported. + Error + + + - + - @@ -219,7 +254,7 @@ - + diff --git a/src/utils/util/resolver-pipeline/oscal-profile-resolve-select.xsl b/src/utils/util/resolver-pipeline/oscal-profile-resolve-select.xsl index d8ca35000a..52ea10a3b2 100644 --- a/src/utils/util/resolver-pipeline/oscal-profile-resolve-select.xsl +++ b/src/utils/util/resolver-pipeline/oscal-profile-resolve-select.xsl @@ -95,7 +95,7 @@ - + - - - - - - - - - - - - - - - - - - - - - - - @@ -170,58 +146,6 @@ --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -232,7 +156,7 @@ - + diff --git a/src/utils/util/resolver-pipeline/select-or-custom-merge.xsl b/src/utils/util/resolver-pipeline/select-or-custom-merge.xsl new file mode 100644 index 0000000000..62c652ffd3 --- /dev/null +++ b/src/utils/util/resolver-pipeline/select-or-custom-merge.xsl @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/utils/util/resolver-pipeline/testing/1_selected/select.xspec b/src/utils/util/resolver-pipeline/testing/1_selected/select.xspec index b14ce0adef..7f94a578ef 100644 --- a/src/utils/util/resolver-pipeline/testing/1_selected/select.xspec +++ b/src/utils/util/resolver-pipeline/testing/1_selected/select.xspec @@ -156,29 +156,36 @@ test="$x:result/o:selection/@uuid = $ov:catalog_uuid"/> - + + x2 x1 - - - + + + ... Group X of XYZ Control X1 + Control X2 Group Y of XYZ Group Z of XYZ + + + @@ -286,6 +293,70 @@ + + + + + + z3.a-1 + + + + + + + + + ... + + Group X of XYZ + + + Group Y of XYZ + + + Group Z of XYZ + Control Z3 + Control Z3-A + Control Z3-A-1 + + + + + + + + + + + + + + z3.a-1 + + + + + + + + + ... + + Group X of XYZ + + + Group Y of XYZ + + + Group Z of XYZ + Control Z3-A-1 + + + + + + diff --git a/src/utils/util/resolver-pipeline/testing/3_merged/merge-as-is.xspec b/src/utils/util/resolver-pipeline/testing/3_merged/merge-as-is.xspec index f262452115..f08929c155 100644 --- a/src/utils/util/resolver-pipeline/testing/3_merged/merge-as-is.xspec +++ b/src/utils/util/resolver-pipeline/testing/3_merged/merge-as-is.xspec @@ -1,52 +1,46 @@ - - - - + stylesheet="../../oscal-profile-resolve-merge.xsl" + xslt-version="3.0"> - - - - - - - - - - Group X of XYZ - Control X1 - Control X2 - Control X3 - - - Group Y of XYZ - Control Y1 - Control Y2 - Control Y3 - - - Group Z of XYZ - Control Z1 - Control Z2 - Control Z3 - Control Z3-A - Control Z3-A-1 + + + + + + + Group X of XYZ + Control X1 + Control X2 + Control X3 + + + Group Y of XYZ + Control Y1 + Control Y2 + Control Y3 + + + Group Z of XYZ + Control Z1 + Control Z2 + Control Z3 + Control Z3-A + Control Z3-A-1 + - - - - - true - - - - - - + + + + true + + + + + Group X of XYZ Control X1 @@ -69,182 +63,568 @@ - - - - - - - - + + + + + + + + + Group X of XYZ + Control X1 + + + Group Z of XYZ + Control Z1 + Control Z3 + Control Z3-A + Control Z3-A-1 + + + + + + + Group X of XYZ + Control X1 + Control X2 + + + Group Y of XYZ + Control Y1 + Control Y2 + Control Y3 + + + Group Z of XYZ + Control Z3 + Control Z3-A + Control Z3-A-1 + + + + + + true + + + + + + Group X of XYZ - Control X1 + Control X1 + Control X1 + Control X2 - + Group Z of XYZ - Control Z1 - Control Z3 - Control Z3-A - Control Z3-A-1 + Control Z1 + Control Z3 + Control Z3-A + Control Z3-A-1 + + + Control Z3 + Control Z3-A + Control Z3-A-1 - - - - Group X of XYZ - Control X1 - Control X2 - - + Group Y of XYZ - Control Y1 - Control Y2 - Control Y3 + Control Y1 + Control Y2 + Control Y3 - - Group Z of XYZ - Control Z3 - Control Z3-A - Control Z3-A-1 - - + + + + + + + + + Group X of XYZ + + + + no control + + Control X1 + + + + + Group X of XYZ + + + + + Control X1 + Control X2 + + + + true + + + + + + + Group X of XYZ + + + + + no control + + + + + Control X1 + Control X1 + Control X2 - - - true - - - - - - - Group X of XYZ + + + + + + + + Test Profile + 2019-11-13T12:41:07.061-05:00 + 1.3 + 1.0.2 + + + + + Control X1 + + + true + + + + + +

at least every 3 years

+
+
+
+
+
+
+ + + + Test Profile + 2019-11-13T12:41:07.061-05:00 + 1.3 + 1.0.2 + + + Control X1 + + + + +

at least every 3 years

+
+
+
+
+
+
+
+ + + + + Control X1 + + + Ref BBB + + Bbb bbbbb Bbb b. + + + + + + + true + + + + Ref AAA + + Aaaa aaaa aaaa + + + + + + + + Control X1 - Control X2 - - - Group Z of XYZ - Control Z1 - Control Z3 - Control Z3-A - Control Z3-A-1 - - - Control Z3 - Control Z3-A - Control Z3-A-1 - - - - - Group Y of XYZ - Control Y1 - Control Y2 - Control Y3 - - - + + + Ref BBB + + Bbb bbbbb Bbb b. + + + + + Ref AAA + + Aaaa aaaa aaaa + + + + + + + - - - - - + + + + + + + uuid a + uuid a again + opr:id b + opr:id b again + uuid c + opr:id c + + + + uuid a + opr:id b + uuid c + + + + + + + + + + + no control + + Control X1 + + + Ref AAA + + + + + true + + + + + + + + + + + Ref AAA + + + + + no control + + Control X1 + + + + + + + + + + Group X of XYZ + Control X1 + + + + Ref AAA + + + + + true + + + + + + + + + + Ref AAA + + + + Group X of XYZ + Control X1 + + + + + + + + + + + Group X of XYZ + + + + true + + + + + + + + + + + + + + + Group X of XYZ + + Group XX + Control X1 + + + + + true + + + + + + + + Group X of XYZ + + Group XX + Control X1 + + + + + + + + + + + + + no control + + Control X1 + + + + + no control + + Control X1 + + + true + + + + + + + + + + no control + + Control X1 + + + + + + + + + id a + id a again + opr:id b + opr:id b again + id c + opr:id c + + + + id a + opr:id b + id c + + + + + + + + + Group X of XYZ + + + + no control + + Control X1 + + + Group Y of XYZ + Control Y1 + + + + true + + + + + + Group X of XYZ no control - Control X1 + Control X1 - - Group Z of XYZ - Control Z1 - Control Z3 - Control Z3-A - Control Z3-A-1 - - + + Group Y of XYZ + Control Y1 - - - + + + + + + + + + Group X of XYZ + + + + no control + + Control X1 + + + Group Y of XYZ + + Group YY + Control Y1 + + + + + true + + + + + + Group X of XYZ - + + no control - Control X1 - Control X2 + Control X1 - + Group Y of XYZ - Control Y1 - Control Y2 - Control Y3 + + Group YY + Control Y1 + - - Group Z of XYZ - Control Z3 - Control Z3-A - Control Z3-A-1 - - + + + + + + + + + Group X of XYZ + + Group XX + Control X1 + + + + + true + + + + + + + Group X of XYZ + + Group XX + Control X1 + - - - true - - - - - - - Group X of XYZ - - - - - no control - - - - - Control X1 - Control X1 - Control X2 - - - Group Z of XYZ - Control Z1 - Control Z3 - Control Z3-A - Control Z3-A-1 - - - Control Z3 - Control Z3-A - Control Z3-A-1 - - - - - Group Y of XYZ - Control Y1 - Control Y2 - Control Y3 - - - + + + + + + + + + - diff --git a/src/utils/util/resolver-pipeline/testing/3_merged/merge-back-matter.xspec b/src/utils/util/resolver-pipeline/testing/3_merged/merge-back-matter.xspec deleted file mode 100644 index 3c1e92ee7c..0000000000 --- a/src/utils/util/resolver-pipeline/testing/3_merged/merge-back-matter.xspec +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - - - - - - - - - - Group X of XYZ - Control X1 - - - Group Z of XYZ - Control Z1 - Control Z3 - Control Z3-A - Control Z3-A-1 - - - - - - Ref AAA - - Aaaa aaaa aaaa - - - - - Ref BBB - - Bbb bbbbb Bbb b. - - - - - - - - - - - Control X1 - Control Z1 - Control Z3 - Control Z3-A - - Control Z3-A-1 - - - - - Ref AAA - - Aaaa aaaa aaaa - - - - - Ref BBB - - Bbb bbbbb Bbb b. - - - - - - - - - - - - - - Group X of XYZ - Control X1 - - - Group Z of XYZ - Control Z1 - Control Z3 - Control Z3-A - Control Z3-A-1 - - - - - - Ref AAA - - Aaaa aaaa aaaa - - - - - Ref BBB - - Bbb bbbbb Bbb b. - - - - - - - true - - - - - - - Group X of XYZ - Control X1 - - - Group Z of XYZ - Control Z1 - Control Z3 - Control Z3-A - - Control Z3-A-1 - - - - - - Ref AAA - - Aaaa aaaa aaaa - - - - - Ref BBB - - Bbb bbbbb Bbb b. - - - - - - - - diff --git a/src/utils/util/resolver-pipeline/testing/3_merged/merge-combine.xspec b/src/utils/util/resolver-pipeline/testing/3_merged/merge-combine.xspec new file mode 100644 index 0000000000..6a514161b1 --- /dev/null +++ b/src/utils/util/resolver-pipeline/testing/3_merged/merge-combine.xspec @@ -0,0 +1,275 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Control A + Control B + Control A1 + + + + + + + + + + + Control A + Control A1 + + Control B + + + + + + + + + Control A + + + + + + + + + Control A + Control B + Control A1 + + + + + + + + + + + + + + + + + + + + + + + + + + Control A + Control A1 + + + + Control A + Control A1 + + + + + + + Control A + Control B + Control A1 + + + + + + Control A + Control A1 + + + Control B + + + + + + + + Control A + Control B + Control A1 + + + + + + Control A + Control A1 + + + Control B + + + + + + + + + + + + + + + + + + + + + + + + + + + + Control A + Control A1 + + + + + + Control A + + + + + + + + Control A + Control B + Control A1 + + + + + + Control A + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Control A + Control A1 + + + + + Control A + Control A1 + + + + + + + Control A + Control B + Control A1 + + + + + Control A + Control B + Control A1 + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/utils/util/resolver-pipeline/testing/3_merged/merge-custom.xspec b/src/utils/util/resolver-pipeline/testing/3_merged/merge-custom.xspec index 10ec033a70..4cf7ba997a 100644 --- a/src/utils/util/resolver-pipeline/testing/3_merged/merge-custom.xspec +++ b/src/utils/util/resolver-pipeline/testing/3_merged/merge-custom.xspec @@ -1,28 +1,16 @@ - - - - - - - - - - - - - - - + + + + + Group X of XYZ Control X1 @@ -49,7 +37,7 @@ - + New Group 1 @@ -59,8 +47,8 @@ - - New Group 1 + + New Group 2 x2 @@ -71,93 +59,577 @@ - - - - - - New Group 1 - Control X1 - Control Y1 - Control Z1 - - - New Group 1 - Control X2 - Control Y2 - Control Z2 - - - + + + + + ... + ... + + + - - - - - - Group X of XYZ - Control X1 + + + + + + + + + + + + + + + + + + Group X of XYZ + Control X1 + Control X2 + Control X3 + + + Group Y of XYZ + Control Y1 + Control Y2 + Control Y3 + + + Group Z of XYZ + Control Z1 + Control Z2 + Control Z3 + Control Z3-A + + Control Z3-A-1 + + + + + + + + New Group 1 + + + x1 + y1 + z1 + + + + + New Group 2 + + + x2 + y2 + z2 + + + + + + + + + + New Group 1 + Control X1 + Control Y1 + Control Z1 - - Group Z of XYZ - Control Z1 - Control Z3 - Control Z3-A - Control Z3-A-1 + + New Group 2 + Control X2 + Control Y2 + Control Z2 + + + + + + + + + Group X of XYZ + Control X1 + Control X2 + Control X3 + + + + + Parent of Group Y + + Group Y of XYZ + Control Y1 + Control Y2 + Control Y3 + + + + + Control Z1 + Control Z2 + Control Z3 + Control Z3-A + + Control Z3-A-1 + - + + + + + New Group 1 + + + x1 + y1 + z1 + + + + + New Group 2 + + + x2 + y2 + z2 + + + + + + + + + + New Group 1 + Control X1 + Control Y1 + Control Z1 - - - - Group X of XYZ - - Control X1 - - - Control X2 + + New Group 2 + Control X2 + Control Y2 + Control Z2 - - Group Y of XYZ - Control Y1 - Control Y2 - Control Y3 + + + + + + + Control X1 + Control X2 + Control X3 + + + + + Group A + + + + x2 + + + + + Group B + + + x2 + + + + + + + + + + Group A + Control X1 + Control X3 - - Group Z of XYZ - Control Z3 - Control Z3-A - Control Z3-A-1 - - + + + + Group B + Control X2 + + + + + + + Control X1 + Control X2 + Control X3 + + + + + Group A + + Group A.1 + + + x2 + nonexistent + + + + + + Group B + + Group B.1 + + + q* + + + + + + + + + + + Group A + + Group A.1 + Control X2 + + + + + + Group B + + Group B.1 + + + + + + + + + + + + + Control X1 + Control X2 + Control X3 + + + + + + + x2 + + + + + + + + + Control X3 + + + + + + + Control X1 + Control X2 + Control X3 + + + + + + + nonexistent + + + + + + + + + + + + + Control X3 + Control X1 + Control X2 + + + + + + + Control X2 + Control X1 + Control X3 + + + + + + + + Control X1 + Control X2 + Control X3 + + + + + + + Control X1 + Control X2 + Control X3 + + + + + + + + + Control X1 + Control X2 + Control X3 + + + + + x1 + x3 + ax2 + + + + - - - Control X1 - Control Z1 - Control Z3 - Control Z3-A - Control Z3-A-1 - - - - Control X1 - + + + + + + + + + + + + + + + + a1 + + + + + + + + + + + + + + + + + + + + + nonexistent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + a1 + + + + + + + + + + + + + + + + + + + + + + + a1 + + + + + + + + + - Control X2 - Control Y1 - Control Y2 - Control Y3 - Control Z3 - Control Z3-A - Control Z3-A-1 - + + + + + + + + + + + + + + + a1.1 + + + + + + + + + - - + + + + + + + + + + + + + + + a1.1 + + + + + + + + + + + + + + + + x1 + + + diff --git a/src/utils/util/resolver-pipeline/testing/3_merged/merge.xspec b/src/utils/util/resolver-pipeline/testing/3_merged/merge.xspec index c4619ccbea..d9e44c873d 100644 --- a/src/utils/util/resolver-pipeline/testing/3_merged/merge.xspec +++ b/src/utils/util/resolver-pipeline/testing/3_merged/merge.xspec @@ -1,17 +1,57 @@ - - + + + + + + + + text + + + + + + + + + + + + + + - + + + - - + + + + + + + + + + + - - - - + + + + + + + Group X of XYZ Control X1 @@ -36,29 +76,206 @@ - - - - - - Control X1 - Control X2 - Control X3 - Control Y1 - Control Y2 - Control Y3 - Control Z1 - Control Z2 - Control Z3 - Control Z3-A - Control Z3-A-1 + + + + + + Control X1 + Control X2 + Control X3 + Control Y1 + Control Y2 + Control Y3 + Control Z1 + Control Z2 + Control Z3 + Control Z3-A + Control Z3-A-1 + - - - + + + + + + + + + Group X of XYZ + Control X1 + + + Group Z of XYZ + Control Z1 + Control Z3 + Control Z3-A + Control Z3-A-1 + + + + + + + Group X of XYZ + + Control X1 + + + Control X2 + + + Group Y of XYZ + Control Y1 + Control Y2 + Control Y3 + + + Group Z of XYZ + Control Z3 + Control Z3-A + Control Z3-A-1 + + + + + + + + + + Control X1 + Control Z1 + Control Z3 + Control Z3-A + Control Z3-A-1 + + + + Control X1 + + + Control X2 + Control Y1 + Control Y2 + Control Y3 + Control Z3 + Control Z3-A + Control Z3-A-1 + + + + + + + + + + Test Profile + 2019-11-13T12:41:07.061-05:00 + 1.3 + 1.0.2 + + + + + Control X1 + + + + + + +

at least every 3 years

+
+
+
+
+
+
+ + + + Test Profile + 2019-11-13T12:41:07.061-05:00 + 1.3 + 1.0.2 + + + + Control X1 + + + + +

at least every 3 years

+
+
+
+
+
+
+
+ + + + + Control X1 + + + Ref BBB + + Bbb bbbbb Bbb b. + + + + + + + + + Ref AAA + + Aaaa aaaa aaaa + + + + + + + + + Control X1 + + + Ref BBB + + Bbb bbbbb Bbb b. + + + + + Ref AAA + + Aaaa aaaa aaaa + + + + + + + + + 0 + + + + + + - + @@ -66,65 +283,450 @@ Group X of XYZ Control X1 - - Group Z of XYZ - Control Z1 - Control Z3 - Control Z3-A - Control Z3-A-1 - - - - - - - Group X of XYZ - - Control X1 - - - Control X2 - Group Y of XYZ Control Y1 - Control Y2 - Control Y3 - - - Group Z of XYZ - Control Z3 - Control Z3-A - Control Z3-A-1 - - + + {$ov:as-is-content} + - + Control X1 - Control Z1 - Control Z3 - Control Z3-A - Control Z3-A-1 - - - - Control X1 - - - Control X2 Control Y1 - Control Y2 - Control Y3 - Control Z3 - Control Z3-A - Control Z3-A-1 - - + + + + + + + + + + + 1 + + + + + + + + + + + + true + + + + + + + + + + + true + 1 + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + Ref CCC + + + Ref BBB + + + Ref AAA + + + + + + + + + Ref CCC + + + Ref BBB + + + Ref AAA + + + + + + + + + Control X1 + + + Ref CCC + + + Ref BBB + + + + + Control X2 + + + Ref AAA + + + + + + + + + + Ref CCC + + + Ref BBB + + + Ref AAA + + + + + + + + + Control X1 + + + Ref CCC + + + Ref BBB, first + + + Ref AAA + + + + + Control X2 + + + Ref CCC + + + Ref BBB, second + + + Ref AAA + + + + + + Ref CCC + + + Ref BBB, third + + + Ref AAA + + + + + + + + + Ref CCC + + + Ref BBB, third + + + Ref AAA + + + Ref CCC + + + Ref CCC + + + + + + + + + + + + + + + + + + + + + + + + + + + no control + + + Group X of XYZ + + + no control + + + + no control + + + Group X2 + + + no control + + + + no control + + + + + + + + + + no control + + + + no control + + + + no control + + + + no control + + + + no control + + + + + + + + Control A + + Group X of XYZ + Control X1 + Control Y1 + + Group X2 + Control X2 + Control Y2 + + + + + + + Control A + Control X1 + Control Y1 + Control X2 + Control Y2 + + + + + + + + + no control + + Control A + + Group X of XYZ + + + no control + + Control X1 + + + + + + ... + ... + ... + ... + + + + + + + + + Control X1 + + + + + + Control X1 + + + + + + + + + + + + + + + + + + + + + Control X1 + + + + + + + + + + + + + + + + + + + + + + + Control X1 + + + + + + + + + + + + + + + + + + + + + + + Control X1 + + + + + + + + + + + + + + + + + + + + + + + + + + + +