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

Integrate use of oscal-prose-module.xsd in metaschema.xsd #187

Merged

Conversation

david-waltermire
Copy link
Collaborator

Committer Notes

The markup support in the metaschema.xsd is fairly simple and incomplete. This PR replaces the current markup support with the markup data types provided by the oscal-prose-module.xsd.

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Have you squashed any non-relevant commits and commit messages? [instructions]
  • Do all automated CI/CD checks pass?

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 website](https://pages.nist.gov/metaschema) and readme documentation affected by the changes you made? Changes to the website can be made in the website/content directory of your branch.

@wendellpiez
Copy link
Collaborator

There are some issues in bidirectional conversion here that need to be specified before I can finish the tooling to support this.

Specifically, when an image is given on its own line, this could be either <p><img src="some.svg"/></p> and plain <img src="some.svg"/>. As information loss goes this is probably tolerable, but it does require choosing between them.

Plus (relating to usnistgov/OSCAL#1151), determining that tools support the features defined should ultimately entail unit testing for Markdown conversions (new Issue?), along with a nice little specification (even a grammar?!) for OSCAL Markdown. Currently, Markdown conversions in the XSLT pipeline are handmade/bespoke, while in oscal-java an external library (with adjustments) is being used. This will not be sustainable for scaling across platforms.

(Should we solicit interest in helping develop a grammar for OSCAL Markdown?)

@aj-stein-nist
Copy link
Collaborator

along with a nice little specification (even a grammar?!) for OSCAL Markdown. Currently, Markdown conversions in the XSLT pipeline are handmade/bespoke, while in oscal-java an external library (with adjustments) is being used. This will not be sustainable for scaling across platforms.

(Should we solicit interest in helping develop a grammar for OSCAL Markdown?)

I know OSCAL has been in development for a few years, and the implementations and lack of standards around Markdown flavors has evolved somewhat. Is there, in fact an explicit idea of an OSCAL Markdown or you are proposing that now? If not existent yet, would it not be better if we target the emerging CommonMark specification? It appears the Java library we are using in metaschema-java that you reference is doing that too. I only point this out because it started in 2012 but did not see wider-spread adoption uptick until GitHub adopted it in 2019 over their specific GHFM variant, which is pretty late in OSCAL history.

@wendellpiez
Copy link
Collaborator

Would that it were even that simple. This is a discussion that has been going on for some time. A subset of CommonMark is probably wise. Every feature offered by any particular flavor or implementation of CommonMark (including arbitrary HTML)? -- maybe not. I say "OSCAL Markdown" not because I want to invent something new but because we are going to have to write some kind of spec.

@david-waltermire david-waltermire changed the base branch from master to develop March 5, 2022 17:27
@david-waltermire
Copy link
Collaborator Author

@wendellpiez I am creating a new develop branch to merge next-version Metaschema changes into. We can use this as an integration branch for further changes to our toolchains. I am going to merge this there.

@david-waltermire david-waltermire merged commit a738aa4 into usnistgov:develop Mar 5, 2022
@david-waltermire david-waltermire deleted the schema-refactor branch March 5, 2022 17:32
david-waltermire added a commit that referenced this pull request Mar 20, 2022
* refactored markup use in the Metaschema XSD to make use of the oscal-prose-module.xsd
* Refactored prose module to allow img tags in markup. Resolves usnistgov/OSCAL#1132
david-waltermire added a commit that referenced this pull request Apr 28, 2022
* refactored markup use in the Metaschema XSD to make use of the oscal-prose-module.xsd
* Refactored prose module to allow img tags in markup. Resolves usnistgov/OSCAL#1132
david-waltermire added a commit that referenced this pull request Jun 21, 2022
* refactored markup use in the Metaschema XSD to make use of the oscal-prose-module.xsd
* Refactored prose module to allow img tags in markup. Resolves usnistgov/OSCAL#1132
david-waltermire added a commit that referenced this pull request Dec 7, 2022
* refactored markup use in the Metaschema XSD to make use of the oscal-prose-module.xsd
* Refactored prose module to allow img tags in markup. Resolves usnistgov/OSCAL#1132
aj-stein-nist pushed a commit to aj-stein-nist/metaschema that referenced this pull request Jan 9, 2023
)

* refactored markup use in the Metaschema XSD to make use of the oscal-prose-module.xsd
* Refactored prose module to allow img tags in markup. Resolves usnistgov/OSCAL#1132
aj-stein-nist pushed a commit to aj-stein-nist/metaschema that referenced this pull request Jan 10, 2023
)

* refactored markup use in the Metaschema XSD to make use of the oscal-prose-module.xsd
* Refactored prose module to allow img tags in markup. Resolves usnistgov/OSCAL#1132
aj-stein-nist pushed a commit to aj-stein-nist/metaschema that referenced this pull request Jan 10, 2023
)

* refactored markup use in the Metaschema XSD to make use of the oscal-prose-module.xsd
* Refactored prose module to allow img tags in markup. Resolves usnistgov/OSCAL#1132
aj-stein-nist pushed a commit to aj-stein-nist/metaschema that referenced this pull request Jan 10, 2023
)

* refactored markup use in the Metaschema XSD to make use of the oscal-prose-module.xsd
* Refactored prose module to allow img tags in markup. Resolves usnistgov/OSCAL#1132
aj-stein-nist pushed a commit to aj-stein-nist/metaschema that referenced this pull request Jan 10, 2023
)

* refactored markup use in the Metaschema XSD to make use of the oscal-prose-module.xsd
* Refactored prose module to allow img tags in markup. Resolves usnistgov/OSCAL#1132
aj-stein-nist pushed a commit to aj-stein-nist/metaschema that referenced this pull request Jan 10, 2023
)

* refactored markup use in the Metaschema XSD to make use of the oscal-prose-module.xsd
* Refactored prose module to allow img tags in markup. Resolves usnistgov/OSCAL#1132
david-waltermire added a commit that referenced this pull request Mar 9, 2023
* refactored markup use in the Metaschema XSD to make use of the oscal-prose-module.xsd
* Refactored prose module to allow img tags in markup. Resolves usnistgov/OSCAL#1132
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.

3 participants