-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Profile resolver selection: XSpec additions and minor XSLT enhancemen…
…ts (#1101) * Group scenarios and add edge case scenario * Group the scenarios that test o:glob-as-regex. * Add scenario for edge case where input is empty. * For selection, augment XSpec and update XSLT * Add XSpec tests for oscal-profile-resolve-select.xsl, mostly at the level of templates and functions. * Minor enhancements in oscal-profile-resolve-select.xsl: * Add support for with-parent-controls * Generate fatal error if resource cannot be fetched * Provide focused error message if resource has no suitable rlink * Handle missing matching pattern * Fix indentation * Fix scenario that intentionally omits pattern * Rename o:resource-or-warning as o:resource-or-error * Attributes, not elements, for "from" and "to" * Update expected value for 4a3cadf changes in catalog * The abc-full_catalog.xml file has changed, so the "Loose parameters" test scenario needs adjustment. * Reduce redundancy in expected metadata * metadata is copied verbatim, so no need to check details in multiple test scenarios for the match=profile template * Update verbiage to cross-reference with logged discussion pages
- Loading branch information
1 parent
98d2a7a
commit ee95ed8
Showing
9 changed files
with
1,758 additions
and
370 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
src/utils/util/resolver-pipeline/testing/1_selected/catalog-no-uuid.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<catalog xmlns="http://csrc.nist.gov/ns/oscal/1.0"/> |
2 changes: 2 additions & 0 deletions
2
src/utils/util/resolver-pipeline/testing/1_selected/catalog-nonstandard-file-name-ext.xmlcat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<catalog xmlns="http://csrc.nist.gov/ns/oscal/1.0" uuid="xmlcat"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/utils/util/resolver-pipeline/testing/1_selected/resource-media-type.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<?xml-model href="../../../../../specifications/profile-resolution/example-checkup.sch" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?> | ||
<!-- Modified by conversion XSLT 2021-04-05T11:22:08.131-04:00 - RC2 OSCAL becomes RC3 OSCAL --> | ||
<profile xmlns="http://csrc.nist.gov/ns/oscal/1.0" | ||
uuid="427f8c54-c3af-4ca3-a92c-f6abaa015ba5"> | ||
<metadata> | ||
<title>Test Profile with Nonstandard File Name Extension in resource/rlink</title> | ||
<last-modified>2020-05-30T14:39:37.3-04:00</last-modified> | ||
<version>1.0</version> | ||
<oscal-version>1.0.0-rc2</oscal-version> | ||
</metadata> | ||
<import href="#0050231f-4fd0-43d6-8fa0-431367cd83e1"> | ||
<include-all/> | ||
</import> | ||
<back-matter> | ||
<resource uuid="0050231f-4fd0-43d6-8fa0-431367cd83e1"> | ||
<rlink href="https://some-non-xml-url"/> | ||
<rlink href="catalog-nonstandard-file-name-ext.xmlcat" media-type="xml"/> | ||
</resource> | ||
<resource uuid="0050231f-4fd0-43d6-8fa0-431367cd83e1"> | ||
<!-- Duplicate uuid is intentional, for testing template with | ||
mode="o:select" match="import[starts-with(@href,'#')]" --> | ||
<rlink href="catalog-nonstandard-file-name-ext.xmlcat" media-type="xml"/> | ||
</resource> | ||
</back-matter> | ||
</profile> |
21 changes: 21 additions & 0 deletions
21
src/utils/util/resolver-pipeline/testing/1_selected/resource-multiple-rlinks.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<?xml-model href="../../../../../specifications/profile-resolution/example-checkup.sch" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?> | ||
<!-- Modified by conversion XSLT 2021-04-05T11:22:08.131-04:00 - RC2 OSCAL becomes RC3 OSCAL --> | ||
<profile xmlns="http://csrc.nist.gov/ns/oscal/1.0" | ||
uuid="427f8c54-c3af-4ca3-a92c-f6abaa015ba5"> | ||
<metadata> | ||
<title>Test Profile with Nonstandard File Name Extension in resource/rlink</title> | ||
<last-modified>2020-05-30T14:39:37.3-04:00</last-modified> | ||
<version>1.0</version> | ||
<oscal-version>1.0.0-rc2</oscal-version> | ||
</metadata> | ||
<import href="#0050231f-4fd0-43d6-8fa0-431367cd83e1"> | ||
<include-all/> | ||
</import> | ||
<back-matter> | ||
<resource uuid="0050231f-4fd0-43d6-8fa0-431367cd83e1"> | ||
<rlink href="catalog-nonstandard-file-name-ext.xmlcat" media-type="xml"/> | ||
<rlink href="catalog-no-uuid.xml"/> | ||
</resource> | ||
</back-matter> | ||
</profile> |
Oops, something went wrong.