Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Profile resolver: Compatibility with Saxon 10 and 11 #1685

Merged
merged 1 commit into from
Mar 3, 2023

Conversation

galtm
Copy link
Contributor

@galtm galtm commented Mar 2, 2023

Committer Notes

This PR addresses issue #1629 by replacing usage of document-uri with base-uri. The document-uri function is known to return different results in Saxon 10 vs. 11. Using base-uri removes a difference in the XSLT profile resolver's behavior between Saxon 10 and 11.

Unlike #1639, this PR builds on the head of the develop branch and does not include code from #1596 or #1549.

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.

Testing Done

  • Ran all the unit-level XSpec tests (that is, the .xspec files in the testing/ directory) with Oxygen 24.1, which uses Saxon 10.
  • Ran all the unit-level XSpec tests with Oxygen 25.0, which uses Saxon 11.
  • With both Oxygen 24.1 and 25, transformed all the profiles in src/specifications/profile-resolution/profile-resolution-examples. Diff'd the results, and they are the same except time stamps. The profiles that error out (e.g., broken_profile.xml) behave the same way in both Oxygen versions.
  • Used the command in the "How do we replicate this issue" section of XSLT profile resolver does not work with Saxon version 11 #1629. Now the command works with Saxon 12.0.

Replace document-uri with base-uri. Saxon 10 and 11 can
return different values from document-uri() function. For
compatibility and to avoid errors when document-uri() returns
empty with Saxon 11, use base-uri() instead.
@galtm galtm changed the title Compatibility with Saxon 10 and 11 Profile resolver: Compatibility with Saxon 10 and 11 Mar 2, 2023
@aj-stein-nist aj-stein-nist requested review from a team, aj-stein-nist and wendellpiez March 2, 2023 14:26
Copy link
Contributor

@aj-stein-nist aj-stein-nist left a comment

Choose a reason for hiding this comment

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

Looks good, thanks so much for your prompt turnaround given the feedback requested. I have not merged this yet, but will shortly as I do some higher-level integration testing "by hand" so to speak.

@aj-stein-nist aj-stein-nist merged commit 705997b into usnistgov:develop Mar 3, 2023
aj-stein-nist pushed a commit to aj-stein-nist/OSCAL-forked that referenced this pull request Jun 29, 2023
Replace document-uri with base-uri. Saxon 10 and 11 can
return different values from document-uri() function. For
compatibility and to avoid errors when document-uri() returns
empty with Saxon 11, use base-uri() instead.
aj-stein-nist pushed a commit to aj-stein-nist/OSCAL-forked that referenced this pull request Jul 10, 2023
Replace document-uri with base-uri. Saxon 10 and 11 can
return different values from document-uri() function. For
compatibility and to avoid errors when document-uri() returns
empty with Saxon 11, use base-uri() instead.
@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
Replace document-uri with base-uri. Saxon 10 and 11 can
return different values from document-uri() function. For
compatibility and to avoid errors when document-uri() returns
empty with Saxon 11, use base-uri() instead.
aj-stein-nist pushed a commit that referenced this pull request Sep 28, 2023
Replace document-uri with base-uri. Saxon 10 and 11 can
return different values from document-uri() function. For
compatibility and to avoid errors when document-uri() returns
empty with Saxon 11, use base-uri() instead.
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.

2 participants