From d9734866456312527fddb742c763cac76955bab0 Mon Sep 17 00:00:00 2001 From: Wendell Piez Date: Tue, 30 Jan 2018 18:01:41 -0500 Subject: [PATCH] More adjustments to profile semantics --- OSCAL-dev.xpr | 186 +++++++++--------- .../mini-testing/10_some-params-profile.xml | 5 +- examples/mini-testing/dinosaur-catalog.xml | 2 +- examples/mini-testing/dinosaur-profile.xml | 5 +- examples/mini-testing/dinosaur-testing.xml | 11 +- schema/xml/RNC/oscal-profile.rnc | 5 +- working/lib/XSLT/profile-resolver.xsl | 10 +- 7 files changed, 118 insertions(+), 106 deletions(-) diff --git a/OSCAL-dev.xpr b/OSCAL-dev.xpr index 786f4d93ec..b393cc1d28 100644 --- a/OSCAL-dev.xpr +++ b/OSCAL-dev.xpr @@ -14,7 +14,7 @@ - examples/mini-testing/dinosaur-profile.xml + examples/mini-testing/10_some-params-profile.xml @@ -29,7 +29,7 @@ - examples/mini-testing/04_exclude1-profile.xml + examples/mini-testing/dinosaur-testing.xml @@ -44,11 +44,11 @@ - working/JSON-mapping/docker-ee-opencontrol-oscal.json + working/lib/XSLT/OSCAL-finalize.xsl - Run this JSON file through Acquisition + ISO 27002 to OSCAL XProc (convert and refine) @@ -59,11 +59,11 @@ - examples/mini-testing/mini-testing-catalog.xml + working/ISO-27002/Convert-ISO-epub-to-OSCAL.xsl - SVG Sketch + ISO 27002 to OSCAL XProc (convert and refine) @@ -74,11 +74,11 @@ - examples/mini-testing/dinosaur-testing.xml + working/ISO-27002/ISO-27002-extraction.xpl - SVG Sketch + ISO 27002 to OSCAL XProc (convert and refine) @@ -89,7 +89,52 @@ - examples/mini-testing/dinosaur-catalog.xml + examples/mini-testing/dinosaur-profile.xml + + + + Profile: resolve and render (show only) + + + + + XPROC + + + + + + examples/mini-testing/04_exclude1-profile.xml + + + + Profile: resolve and render (show only) + + + + + XPROC + + + + + + working/JSON-mapping/docker-ee-opencontrol-oscal.json + + + + Run this JSON file through Acquisition + + + + + XPROC + + + + + + examples/mini-testing/mini-testing-catalog.xml @@ -104,7 +149,7 @@ - examples/mini-testing/99includeRAx3-profile.xml + examples/mini-testing/dinosaur-catalog.xml @@ -119,7 +164,7 @@ - examples/mini-testing/99includeACx2-profile.xml + examples/mini-testing/99includeRAx3-profile.xml @@ -134,7 +179,7 @@ - examples/mini-testing/42_invoke-exceptions-profile.xml + examples/mini-testing/99includeACx2-profile.xml @@ -149,7 +194,7 @@ - examples/mini-testing/41_exceptions-profile.xml + examples/mini-testing/42_invoke-exceptions-profile.xml @@ -164,7 +209,7 @@ - examples/mini-testing/32_invalid-profile.xml + examples/mini-testing/41_exceptions-profile.xml @@ -179,7 +224,7 @@ - examples/mini-testing/31_patched-messy-profile.xml + examples/mini-testing/32_invalid-profile.xml @@ -194,7 +239,7 @@ - examples/mini-testing/30_patched-profile.xml + examples/mini-testing/31_patched-messy-profile.xml @@ -209,7 +254,7 @@ - examples/mini-testing/20_compound-profile.xml + examples/mini-testing/30_patched-profile.xml @@ -224,7 +269,7 @@ - examples/mini-testing/11_more-params-profile.xml + examples/mini-testing/20_compound-profile.xml @@ -239,7 +284,7 @@ - examples/mini-testing/10_some-params-profile.xml + examples/mini-testing/11_more-params-profile.xml @@ -1107,21 +1152,6 @@ - - - working/lib/XSLT/OSCAL-finalize.xsl - - - - ISO 27002 to OSCAL XProc (convert and refine) - - - - - XPROC - - - working/SP800-53/SP800-53-extraction.xpl @@ -1332,21 +1362,6 @@ - - - working/ISO-27002/ISO-27002-extraction.xpl - - - - ISO 27002 to OSCAL XProc (convert and refine) - - - - - XPROC - - - working/ISO-27002/Enhance-ISO-27002-oscal.xsl @@ -1377,21 +1392,6 @@ - - - working/ISO-27002/Convert-ISO-epub-to-OSCAL.xsl - - - - ISO 27002 to OSCAL XProc (convert and refine) - - - - - XPROC - - - working/lib/util/utility.xq @@ -4389,7 +4389,24 @@ - examples/mini-testing/mini-testing-catalog.xml + working/ISO-27002/ISO-27002-OSCAL-refined.xml + + + + OSCAL core RNC (standalone) + OSCAL against its declarations + + + + + Validation_scenario + Validation_scenario + + + + + + examples/mini-testing/dinosaur-testing.xml @@ -4408,7 +4425,7 @@ - examples/mini-testing/dinosaur-testing.xml + examples/mini-testing/10_some-params-profile.xml @@ -4446,7 +4463,7 @@ - examples/mini-testing/dinosaur-catalog.xml + examples/mini-testing/mini-testing-catalog.xml @@ -4465,7 +4482,7 @@ - examples/mini-testing/99includeRAx3-profile.xml + examples/mini-testing/dinosaur-catalog.xml @@ -4484,7 +4501,7 @@ - examples/mini-testing/99includeACx2-profile.xml + examples/mini-testing/99includeRAx3-profile.xml @@ -4503,7 +4520,7 @@ - examples/mini-testing/42_invoke-exceptions-profile.xml + examples/mini-testing/99includeACx2-profile.xml @@ -4522,7 +4539,7 @@ - examples/mini-testing/41_exceptions-profile.xml + examples/mini-testing/42_invoke-exceptions-profile.xml @@ -4541,7 +4558,7 @@ - examples/mini-testing/32_invalid-profile.xml + examples/mini-testing/41_exceptions-profile.xml @@ -4560,7 +4577,7 @@ - examples/mini-testing/30_patched-profile.xml + examples/mini-testing/32_invalid-profile.xml @@ -4579,7 +4596,7 @@ - examples/mini-testing/20_compound-profile.xml + examples/mini-testing/30_patched-profile.xml @@ -4598,7 +4615,7 @@ - examples/mini-testing/11_more-params-profile.xml + examples/mini-testing/20_compound-profile.xml @@ -4617,7 +4634,7 @@ - examples/mini-testing/10_some-params-profile.xml + examples/mini-testing/11_more-params-profile.xml @@ -5023,23 +5040,6 @@ - - - working/ISO-27002/ISO-27002-OSCAL-refined.xml - - - - OSCAL core RNC (standalone) - OSCAL against its declarations - - - - - Validation_scenario - Validation_scenario - - - examples/FedRAMP/FedRAMP-MODERATE-working.xml diff --git a/examples/mini-testing/10_some-params-profile.xml b/examples/mini-testing/10_some-params-profile.xml index 593aeb1b77..a368fad005 100644 --- a/examples/mini-testing/10_some-params-profile.xml +++ b/examples/mini-testing/10_some-params-profile.xml @@ -12,8 +12,11 @@ - + + + + diff --git a/examples/mini-testing/dinosaur-catalog.xml b/examples/mini-testing/dinosaur-catalog.xml index ecd6a1b977..5a9f5a578e 100644 --- a/examples/mini-testing/dinosaur-catalog.xml +++ b/examples/mini-testing/dinosaur-catalog.xml @@ -29,7 +29,7 @@ Predators - + diff --git a/examples/mini-testing/dinosaur-profile.xml b/examples/mini-testing/dinosaur-profile.xml index 5e45f6303b..a132e2a268 100644 --- a/examples/mini-testing/dinosaur-profile.xml +++ b/examples/mini-testing/dinosaur-profile.xml @@ -7,8 +7,9 @@ Dinosaur Profile - - + + diff --git a/examples/mini-testing/dinosaur-testing.xml b/examples/mini-testing/dinosaur-testing.xml index bc0382a8cc..42422451bb 100644 --- a/examples/mini-testing/dinosaur-testing.xml +++ b/examples/mini-testing/dinosaur-testing.xml @@ -8,10 +8,15 @@ - + + + + - + + + diff --git a/schema/xml/RNC/oscal-profile.rnc b/schema/xml/RNC/oscal-profile.rnc index 8f9d91d193..d76b91518b 100644 --- a/schema/xml/RNC/oscal-profile.rnc +++ b/schema/xml/RNC/oscal-profile.rnc @@ -7,7 +7,7 @@ profile = element profile { idAttr, title, import+, merge?, modify? } import = element import { hrefAttr, (\include?, exclude?) } # presence of element merge means to merge (not merely aggregate) -merge = element merge { empty } +merge = element merge { element build { empty }? } modify = element modify { (param_setting | alteration )* } @@ -21,6 +21,7 @@ modify = element modify { (param_setting | alteration )* } all = element all { withSubContrlsAttr } withSubContrlsAttr = attribute with-subcontrols { ('yes'|'no') }? +withContrlAttr = attribute with-control { ('yes'|'no') }? # 'call' can call *either* a control or a subcontrol by its @id # Schematron requirement: there exists in the catalog a control or subcontrol @@ -29,7 +30,7 @@ call = element call { (withSubContrlsAttr, attribute control-id { xsd:NCName } ) | attribute subcontrol-id { xsd:NCName } } -match = element match { withSubContrlsAttr, attribute pattern { text } } +match = element match { withSubContrlsAttr, withContrlAttr, attribute pattern { text } } exclude = element exclude { ( match | element call { diff --git a/working/lib/XSLT/profile-resolver.xsl b/working/lib/XSLT/profile-resolver.xsl index 560f5c3056..6bce337eb6 100644 --- a/working/lib/XSLT/profile-resolver.xsl +++ b/working/lib/XSLT/profile-resolver.xsl @@ -194,10 +194,11 @@ + - + @@ -238,6 +239,7 @@ + @@ -281,15 +283,15 @@ - + - +