Skip to content

Profile resolver: Test modify phase, plus minor XSLT enhancements#1321

Merged
david-waltermire merged 1 commit intousnistgov:developfrom
galtm:profiler-tests-4
Sep 27, 2022
Merged

Profile resolver: Test modify phase, plus minor XSLT enhancements#1321
david-waltermire merged 1 commit intousnistgov:developfrom
galtm:profiler-tests-4

Conversation

@galtm
Copy link
Contributor

@galtm galtm commented Jun 19, 2022

Committer Notes

This pull request adds template- and function-level XSpec tests for the XSLT profile resolver. It also updates the underlying XSLT, mostly to align with the latest specification.

XSLT

  • Warn if set-parameter matches nothing
  • Handle more types of children of param
  • Make match="control" template handle both implicit and explicit binding
  • New oscal:patches-to-id-targeting-ancestor function for processing
    needed in multiple places
  • For explicit binding that adds a title, add it after original title
    to facilitate keeping the right one in finish phase
  • For removal by class, expect exact match with no tokenization or
    case insensitivity
  • In finish phase, keep only last title of a control

XSpec

  • Add tests at the level of individual templates and functions

All Submissions:

By submitting a pull request, you are agreeing to provide this contribution under the CC0 1.0 Universal public domain dedication.

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you included examples of how to use your new feature(s)?
  • Have you updated all OSCAL website and readme documentation affected by the changes you made? Changes to the OSCAL website can be made in the docs/content directory of your branch.

@galtm
Copy link
Contributor Author

galtm commented Jul 3, 2022

Hi @david-waltermire-nist , The validate-website check failed and the log says, "Error: Link checker detected broken or invalid links, read attached report." However, I don't see an attached report. Can you please help me fix this failure? Thanks!

@aj-stein-nist
Copy link
Contributor

Hi @david-waltermire-nist , The validate-website check failed and the log says, "Error: Link checker detected broken or invalid links, read attached report." However, I don't see an attached report. Can you please help me fix this failure? Thanks!

I think you're good for now.

Be sure to click the Details on the validate-website job check on this PR and click the Summary button in the upper left-hand corner. Scroll all the way to the bottom of this page and locate the html_link_report. It had expired, so I just re-ran it for you.

I am not sure what Dave wants us to do here, since we fixed this particular website link in a fix to main in a9f5b50. I think we need to merge main back into develop accordingly.

@galtm
Copy link
Contributor Author

galtm commented Jul 5, 2022

I think you're good for now.

Be sure to click the Details on the validate-website job check on this PR and click the Summary button in the upper left-hand corner. Scroll all the way to the bottom of this page and locate the html_link_report. It had expired, so I just re-ran it for you.

@aj-stein-nist , thank you! Now I'll know how to find future reports. I'll leave it to @david-waltermire-nist to either merge a link fix into develop or give me instructions.

@wendellpiez
Copy link
Contributor

@aj-stein-nist is this PR getting caught up in that link checker thing we were talking about?

@david-waltermire
Copy link
Contributor

@galtm I fixed the broken link. This PR should be completely ready for review.

wendellpiez
wendellpiez previously approved these changes Aug 22, 2022
Copy link
Contributor

@wendellpiez wendellpiez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! unit tests too.

Copy link
Contributor

@david-waltermire david-waltermire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Most of the XSLT changes are to align with the latest specification.

XSLT
- Warn if set-parameter matches nothing
- Handle more types of children of param
- Make match="control" template handle both implicit and explicit binding
- New oscal:patches-to-id-targeting-ancestor function for processing
  needed in multiple places
- For explicit binding that adds a title, add it after original title
  to facilitate keeping the right one in finish phase
- For removal by class, expect exact match with no tokenization or
  case insensitivity
- In finish phase, keep only last title of a control

XSpec
- Add tests at the level of individual templates and functions
Copy link
Contributor

@david-waltermire david-waltermire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I rebased this. Thanks!

@david-waltermire david-waltermire merged commit b866b52 into usnistgov:develop Sep 27, 2022
aj-stein-nist pushed a commit that referenced this pull request Oct 18, 2022
Most of the XSLT changes are to align with the latest specification.

XSLT
- Warn if set-parameter matches nothing
- Handle more types of children of param
- Make match="control" template handle both implicit and explicit binding
- New oscal:patches-to-id-targeting-ancestor function for processing
  needed in multiple places
- For explicit binding that adds a title, add it after original title
  to facilitate keeping the right one in finish phase
- For removal by class, expect exact match with no tokenization or
  case insensitivity
- In finish phase, keep only last title of a control

XSpec
- Add tests at the level of individual templates and functions
david-waltermire pushed a commit that referenced this pull request Oct 31, 2022
Most of the XSLT changes are to align with the latest specification.

XSLT
- Warn if set-parameter matches nothing
- Handle more types of children of param
- Make match="control" template handle both implicit and explicit binding
- New oscal:patches-to-id-targeting-ancestor function for processing
  needed in multiple places
- For explicit binding that adds a title, add it after original title
  to facilitate keeping the right one in finish phase
- For removal by class, expect exact match with no tokenization or
  case insensitivity
- In finish phase, keep only last title of a control

XSpec
- Add tests at the level of individual templates and functions
aj-stein-nist pushed a commit to aj-stein-nist/OSCAL-forked that referenced this pull request Jan 10, 2023
Most of the XSLT changes are to align with the latest specification.

XSLT
- Warn if set-parameter matches nothing
- Handle more types of children of param
- Make match="control" template handle both implicit and explicit binding
- New oscal:patches-to-id-targeting-ancestor function for processing
  needed in multiple places
- For explicit binding that adds a title, add it after original title
  to facilitate keeping the right one in finish phase
- For removal by class, expect exact match with no tokenization or
  case insensitivity
- In finish phase, keep only last title of a control

XSpec
- Add tests at the level of individual templates and functions
aj-stein-nist pushed a commit to aj-stein-nist/OSCAL-forked that referenced this pull request Feb 6, 2023
Most of the XSLT changes are to align with the latest specification.

XSLT
- Warn if set-parameter matches nothing
- Handle more types of children of param
- Make match="control" template handle both implicit and explicit binding
- New oscal:patches-to-id-targeting-ancestor function for processing
  needed in multiple places
- For explicit binding that adds a title, add it after original title
  to facilitate keeping the right one in finish phase
- For removal by class, expect exact match with no tokenization or
  case insensitivity
- In finish phase, keep only last title of a control

XSpec
- Add tests at the level of individual templates and functions
aj-stein-nist pushed a commit to aj-stein-nist/OSCAL-forked that referenced this pull request Jun 29, 2023
Most of the XSLT changes are to align with the latest specification.

XSLT
- Warn if set-parameter matches nothing
- Handle more types of children of param
- Make match="control" template handle both implicit and explicit binding
- New oscal:patches-to-id-targeting-ancestor function for processing
  needed in multiple places
- For explicit binding that adds a title, add it after original title
  to facilitate keeping the right one in finish phase
- For removal by class, expect exact match with no tokenization or
  case insensitivity
- In finish phase, keep only last title of a control

XSpec
- Add tests at the level of individual templates and functions
aj-stein-nist pushed a commit to aj-stein-nist/OSCAL-forked that referenced this pull request Jul 10, 2023
Most of the XSLT changes are to align with the latest specification.

XSLT
- Warn if set-parameter matches nothing
- Handle more types of children of param
- Make match="control" template handle both implicit and explicit binding
- New oscal:patches-to-id-targeting-ancestor function for processing
  needed in multiple places
- For explicit binding that adds a title, add it after original title
  to facilitate keeping the right one in finish phase
- For removal by class, expect exact match with no tokenization or
  case insensitivity
- In finish phase, keep only last title of a control

XSpec
- Add tests at the level of individual templates and functions
@aj-stein-nist aj-stein-nist added this to the v1.1.0 milestone Jul 27, 2023
aj-stein-nist pushed a commit to galtm/OSCAL that referenced this pull request Sep 28, 2023
Most of the XSLT changes are to align with the latest specification.

XSLT
- Warn if set-parameter matches nothing
- Handle more types of children of param
- Make match="control" template handle both implicit and explicit binding
- New oscal:patches-to-id-targeting-ancestor function for processing
  needed in multiple places
- For explicit binding that adds a title, add it after original title
  to facilitate keeping the right one in finish phase
- For removal by class, expect exact match with no tokenization or
  case insensitivity
- In finish phase, keep only last title of a control

XSpec
- Add tests at the level of individual templates and functions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants