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

Validating extra-schema constraints (requirements) over JSON (JSONatron) under XSLT-M4 Metaschema #726

Closed
3 tasks
wendellpiez opened this issue Aug 4, 2020 · 3 comments
Labels
enhancement Scope: CI/CD Enhancements to the project's Continuous Integration and Continuous Delivery pipeline. Scope: Metaschema Issues targeted at the metaschema pipeline Scope: Modeling Issues targeted at development of OSCAL formats User Story

Comments

@wendellpiez
Copy link
Contributor

User Story:

One feature is still not implemented in the new Metaschema toolkit, namely the capability to generate a Schematron that will function to enforce constraints declared in the Metaschema, over JSON data.

An XSLT exists that can produce this Schematron to work over XML conformant to a given metaschema. Other logic exists that will perform the path mapping from such a Schematron, to an alternative version that should work equivalently over equivalent JSON. Applying this logic to the XSLT operative over the XML, its logical equivalent can be produced programmatically.

This is experimental, has not been tested, and may (in testing) expose small glitches or anomalies between the way XML and JSON are addressed, which require resolution or workarounds.

On the other hand, demonstrating this capability will be unreal, especially with a live example illustrating meaningful constraints.

Goals:

Complete and demonstrate functionality of enforcing Metaschema constraints over JSON.

The goal of #725 (docs revamp), including documentation of constraints, is not a goal or dependency for this Issue, although documenting the constraints is key to demonstrating them.

Helping to make error messages as clear as possible to work operationally (in either/both XML or JSON, with any necessary adjustments) is a goal, as this is part of JSONatron functionality.

Dependencies:

This issue is also tracked here: usnistgov/metaschema-xslt#12

Part of this work entails copying or contriving a Schematron shell that can consume JSON and put it through a transformation pipeline, delivering SVRL. @david-waltermire-nist has one of these.

Acceptance Criteria

  • All OSCAL website and readme documentation affected by the changes in this issue have been updated. Changes to the OSCAL website can be made in the docs/content directory of your branch.
  • 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.
@shaila309
Copy link

How to get access of the Schematron shell that can consume JSON to validate extra-schema constraints?

@wendellpiez
Copy link
Contributor Author

wendellpiez commented Oct 21, 2020

@shaila309 this is work under development. We have a Schematron fork at https://github.com/usnistgov/schematron where we intend to address this. @david-waltermire-nist can update you as to its current status. In any case, Schematron can be wrapped in a pipeline that can parse the JSON into a generic XML structure (defined by XPath). We are able both to convert this JSON-OSCAL-as-XML into analogous XML OSCAL (that is what the format converters do) and also to address it for purposes of rules assertion (Schematron). But we have not yet fielded the capability.

@david-waltermire david-waltermire added Scope: CI/CD Enhancements to the project's Continuous Integration and Continuous Delivery pipeline. Scope: Metaschema Issues targeted at the metaschema pipeline Scope: Modeling Issues targeted at development of OSCAL formats labels Apr 13, 2021
@david-waltermire david-waltermire modified the milestones: OSCAL 1.1.0, Backlog Jul 5, 2022
@aj-stein-nist aj-stein-nist removed this from the Backlog milestone Jul 27, 2023
@aj-stein-nist
Copy link
Contributor

Because this issue pertains to the Metaschema Framework and the XSLT implementation at a layer below OSCAL and not the OSCAL models itself, I will leave usnistgov/metaschema-xslt#12 for now.

@aj-stein-nist aj-stein-nist closed this as not planned Won't fix, can't repro, duplicate, stale Sep 27, 2023
@github-project-automation github-project-automation bot moved this from Todo to Done in NIST OSCAL Work Board Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Scope: CI/CD Enhancements to the project's Continuous Integration and Continuous Delivery pipeline. Scope: Metaschema Issues targeted at the metaschema pipeline Scope: Modeling Issues targeted at development of OSCAL formats User Story
Projects
Status: Done
Development

No branches or pull requests

4 participants