-
Notifications
You must be signed in to change notification settings - Fork 183
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
Properly support <img> tags in OSCAL markup block elements #1132
Comments
This seems like a good learning experience, @david-waltermire-nist . Since this is a confirmed bug, can I volunteer to work on this one and write a fix to get up to speed on how to make core changes to Metaschema? |
What does the offending markup look like? Assuming it is something like this:
and not just (currently valid):
How do markdown processors handle naked images? We should arguably conform with common practice. BTW this does raise issues about backward compatibility since solo images appearing at block level make the same Markdown as solo images inside paragraphs:
Both forms of markup convert to this (with and without |
@aj-stein-nist I fixed this while working in the prose module to support metaschema-java XSD generation. Let's find another way for you to learn more about working on Metaschema internals. I am working with @wendellpiez to make sure these changes do not disrupt the XSLT-based XSD generation. |
Oh I see what you did there with the prose module. I now understand the goal of the changes now that you added this, looks good! |
A PR is still needed to upgrade OSCAL to use the latest Metaschema submodule once the Metaschema code is merged. |
@wendellpiez is testing the metaschema changes. We will post a PR once this is completed. |
Discussed this on the NIST team status call. In our flavor of Markdown, images may only appear in paragraph or other blocks. It is important to maintain parity between our HTML and Markdown use. We should remove the support for paragraphs at the block level to maintain this parity. |
* 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
…solves usnistgov/OSCAL#1132. Resolves usnistgov/OSCAL#1131. Resolves usnistgov/OSCAL#1003.
This work requires usnistgov/metaschema#191, which won't be ready until OSCAL 1.1. Moving the milestone accordingly. |
* 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
Issue #195 covers the follow on work to implement this in the XSLT implementation. |
* Implemented JSON schema generation. Resolves usnistgov/OSCAL#1145. Resolves usnistgov/OSCAL#1132. Resolves usnistgov/OSCAL#1131. Resolves usnistgov/OSCAL#1003. * Improved JSON schema generation. Worked out unicode support for JSON and XSD. Resolves usnistgov/OSCAL#1127. Resolves usnistgov/OSCAL#956. * Fixed bugs in DateAdapter causing dates without timezones to not parse or write properly. * Refactored and moved validation API to metaschema-model-common. * Fixed a bug in write operations causing some file contents to not be truncated when overwriting files. Added StandardOpenOption.TRUNCATE_EXISTING to write operations. * Fixed a bug in array writing for properties using in-json=ARRAY or SINGLETON_OR_ARRAY, that caused an error related to the closing array syntax. * Refactored Java class generation to provide more information to the caller about generated classes. * Added dynamic test support for Metaschema-based testing in a new module metaschema-testing. * Updated JSON parsing code to be more resilient. * Updated to new metaschema feature branch for major refactor. * Schema generation refactor, focusing on XML and JSON alignment. * Fixed some compiler, PMD, and checkstyle warnings. Making incremental progress towards getting these cleaned up. * Simplified and removed some unneeded interfaces and abstract classes. Reducing public/protected classes and methods. * Fixed bugs around inline type handling in schema generation. * Migrated the metaschema-java-binding-annotations module sources to metaschema-java-binding. * Completed full support for Metaschema information in bound Java classes. * Refactored function library, adding functions for abs, boolean, ceiling, compare, data, floor, and round. Identified all functions that need to be implemented eventually. * Added some Javadocs. * Fixing relative path in POM causing build errors in CI.
* 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
* 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
* 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
) * 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
) * 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
) * 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
) * 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
) * 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
) * 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
* 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
* 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
Describe the bug
Block elements in OSCAL markup should support HTML img tags, but the OSCAL XML schemas do not allow this.
Who is the bug affecting?
Anyone trying to use tags.
What is affected by this bug?
All users of OSCAL XML Schemas.
When does this occur?
The following example illustrates this problem.
basic-catalog-img.zip
How do we replicate the issue?
Run a validation against the example provided above.
Expected behavior (i.e. solution)
The attached content should validate.
The text was updated successfully, but these errors were encountered: