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

Add function-arity(), function-lookup(), and function-name() to default function registry #275

Open
8 tasks
aj-stein-gsa opened this issue Dec 4, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request java Pull requests that update Java code
Milestone

Comments

@aj-stein-gsa
Copy link
Contributor

aj-stein-gsa commented Dec 4, 2024

User Story

Per shared interest from @wandmagic and the rest of the FedRAMP Automation Team, I would like us to include function-arity(), function-lookup(), function-name() to the default function registry for Metapath.

NOTE: This function is not listed as a TODO in the registry as of the current state of DefaultFunctionLibrary.java in develop, which seems odd. I found some Saxonica documentation which explained the legacy function-available() is not what we need for XPath 3.1, but not sure how it evaded Dave's earlier dump of the spec to text, but here we are.

Goals

  • Allow general runtime safety to check for missing functions with implementing the following:
  • Allow developers to code "pre-check" constraints with external constraint files to introspect the runtime and gracefully fail when users accidentally check instances against models with older versions of the tool moving forward to know that function is not yet implemented.

(Yes, ironically this function was perhaps the very first one we should have implemented so long ago, but oh well. 🤣)

Dependencies

N/A

Acceptance Criteria

  • All website and readme documentation affected by the changes in this issue have been updated.
  • A Pull Request (PR) is submitted that fully addresses the goals of this User Story. This issue is referenced in the PR.
  • The CI-CD build process runs without any reported errors on the PR. This can be confirmed by reviewing that all checks have passed in the PR.

Revisions

No response

@aj-stein-gsa aj-stein-gsa added enhancement New feature or request java Pull requests that update Java code labels Dec 4, 2024
@wandmagic
Copy link
Contributor

NICE!

@aj-stein-gsa
Copy link
Contributor Author

NICE!

I never thought I would get this excitement about an issue in an open-source project. I guess we have infected you, @wandmagic.

@david-waltermire david-waltermire moved this from To Triage to Ready in Spec and Tooling Work Board Dec 6, 2024
@david-waltermire david-waltermire added this to the v2.2.0 milestone Dec 9, 2024
aj-stein-gsa added a commit to aj-stein-gsa/metaschema-java that referenced this issue Dec 20, 2024
@aj-stein-gsa aj-stein-gsa moved this from Ready to In progress in Spec and Tooling Work Board Dec 20, 2024
@aj-stein-gsa aj-stein-gsa changed the title Add function-lookup() to default function registry Add function-arity() function-lookup(), and function-name() to default function registry Dec 21, 2024
@aj-stein-gsa aj-stein-gsa changed the title Add function-arity() function-lookup(), and function-name() to default function registry Add function-arity(), function-lookup(), and function-name() to default function registry Dec 21, 2024
@aj-stein-gsa
Copy link
Contributor Author

I adjusted the AC here but in the interim, while implementing some of the other functions is blocked by some very helpful refactoring by Dave to support #309, I can work on the other simpler functions in this category for the time being. I updated the issue accordingly.

david-waltermire pushed a commit to aj-stein-gsa/metaschema-java that referenced this issue Dec 28, 2024
@david-waltermire david-waltermire linked a pull request Dec 28, 2024 that will close this issue
8 tasks
david-waltermire pushed a commit to aj-stein-gsa/metaschema-java that referenced this issue Dec 29, 2024
aj-stein-gsa added a commit that referenced this issue Dec 29, 2024
)

* [WIP] Add function-lookup impl and tests for #275

* Removed compile and PMD errors and warnings, mostly related to string-join. Adjusted function name resolution, to use the function name resolver, instead of the variable name resolver to ensure that the default function namespace is used.

---------

Co-authored-by: David Waltermire <[email protected]>
@david-waltermire
Copy link
Contributor

@aj-stein-gsa Are you going to PR the function-arity and function-name functions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request java Pull requests that update Java code
Projects
Status: In progress
3 participants