From e5fa65f2b95fceb3b1b0f23416bb71b399f5d5e4 Mon Sep 17 00:00:00 2001 From: galtm <40716346+galtm@users.noreply.github.com> Date: Tue, 27 Sep 2022 09:14:26 -0400 Subject: [PATCH] Implement opr:oscal-version and v:compare functions. (#1420) The opr:oscal-version function meets the "req-meta-oscal-version" requirement from #1386. The v:compare utility function helps opr:oscal-version meet the "req-meta-oscalversion-error" requirement. --- .../oscal-profile-resolve-metadata.xsl | 54 +- .../testing/2_metadata/metadata.xspec | 79 +-- .../testing/2_metadata/version-util.xspec | 508 ++++++++++++++++++ .../util/resolver-pipeline/version-util.xsl | 346 ++++++++++++ 4 files changed, 916 insertions(+), 71 deletions(-) create mode 100644 src/utils/util/resolver-pipeline/testing/2_metadata/version-util.xspec create mode 100644 src/utils/util/resolver-pipeline/version-util.xsl diff --git a/src/utils/util/resolver-pipeline/oscal-profile-resolve-metadata.xsl b/src/utils/util/resolver-pipeline/oscal-profile-resolve-metadata.xsl index da67371d88..e2eb01e802 100644 --- a/src/utils/util/resolver-pipeline/oscal-profile-resolve-metadata.xsl +++ b/src/utils/util/resolver-pipeline/oscal-profile-resolve-metadata.xsl @@ -1,16 +1,17 @@ - - - + + + + @@ -38,9 +42,6 @@ metadata, due to privacy or security concerns. This parameter is passed from oscal-profile-RESOLVE.xsl and the end user can override it. --> - - - @@ -84,21 +85,42 @@ - - + + + - - + + + + + + + + Import uses oscal-version of {. + }, which is newer than profile oscal-version of { + $source}. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/utils/util/resolver-pipeline/version-util.xsl b/src/utils/util/resolver-pipeline/version-util.xsl new file mode 100644 index 0000000000..9bbb19c3d0 --- /dev/null +++ b/src/utils/util/resolver-pipeline/version-util.xsl @@ -0,0 +1,346 @@ + + + + + + + + + + + + + + + + {$A} is not a valid semantic version. + + + {$B} is not a valid semantic version. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file