-
Notifications
You must be signed in to change notification settings - Fork 187
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
JSON to XML SSP transform injects a <br/>
element in the output
#1151
Comments
…nstrating Markdown/markup conversion usnistgov#213 cf usnistgov/OSCAL#1151 (one XSpec each way)
… successful unit tests demonstrating Markdown/markup conversion usnistgov#213 cf usnistgov/OSCAL#1151 (one XSpec each way); Obfuscated one of the unit tests
… successful unit tests demonstrating Markdown/markup conversion usnistgov#213 cf usnistgov/OSCAL#1151 (one XSpec each way); Obfuscated one of the unit tests
… successful unit tests demonstrating Markdown/markup conversion #213 cf usnistgov/OSCAL#1151 (one XSpec each way); Obfuscated one of the unit tests (#218)
… successful unit tests demonstrating Markdown/markup conversion #213 cf usnistgov/OSCAL#1151 (one XSpec each way); Obfuscated one of the unit tests (#218)
… successful unit tests demonstrating Markdown/markup conversion usnistgov#213 cf usnistgov/OSCAL#1151 (one XSpec each way); Obfuscated one of the unit tests (usnistgov#218)
… successful unit tests demonstrating Markdown/markup conversion usnistgov#213 cf usnistgov/OSCAL#1151 (one XSpec each way); Obfuscated one of the unit tests (usnistgov#218)
… successful unit tests demonstrating Markdown/markup conversion usnistgov#213 cf usnistgov/OSCAL#1151 (one XSpec each way); Obfuscated one of the unit tests (usnistgov#218)
… successful unit tests demonstrating Markdown/markup conversion usnistgov#213 cf usnistgov/OSCAL#1151 (one XSpec each way); Obfuscated one of the unit tests (usnistgov#218)
… successful unit tests demonstrating Markdown/markup conversion usnistgov#213 cf usnistgov/OSCAL#1151 (one XSpec each way); Obfuscated one of the unit tests (usnistgov#218)
… successful unit tests demonstrating Markdown/markup conversion usnistgov#213 cf usnistgov/OSCAL#1151 (one XSpec each way); Obfuscated one of the unit tests (usnistgov#218)
|
… successful unit tests demonstrating Markdown/markup conversion #213 cf usnistgov/OSCAL#1151 (one XSpec each way); Obfuscated one of the unit tests (#218)
This bug is already reported in usnistgov/metaschema-xslt#21 |
After some brief testing, it seems the For now, it seems the converter is most happy with lists whose top level are separated by an extra line, and whose lower level is not separated by an extra line, e.g.:
Mixing |
This is awesome - the analysis confirms what we knew, namely that the implementation fails (both to conform to Commonmark-alikeness, and by some general definition) out where the specification gets soft. More importantly, it gives us a place to define 'correct' for a correct implementation. "Correct" here means both seeing to it that a known-invalid Suggested next steps:
Also - should the specs include how to handle odd-but-not-illegal inputs or are we simply trying to feature-match the tool?
check out the Github rendering:
Github sees a sublist but no sub-sub-list, and item 1.i is promoted a level. This handling is not round-trippable and hence somewhat concerning. My guess is Commonmark does something similar? |
Thanks to @nikitawootten-nist and @wendellpiez for their work on this. As it stands, the quoted message from Nikita above documents a workaround for using the XSLT-M4 implementation. Nikita and Wendell confirmed for me today that the oscal-cli does not have the same issue. As far as the current specs of OSCAL are concerned, this is not a bug in said specs, but a known area of ambiguity in the Metaschema specs and how the XSLT M4 implementation has deferred enhancements until the under-defined mechanics of around the complexity of lists referenced in that Metaschema issue. We recommend you follow the workaround for now if you use the XSLT-M4 toolchain, or use the oscal-cli as an alternative. When the Metaschema issue link tracks enhanced testing and development regarding Commonmark to HTML processing, follow-on work for M4 can be revisited. |
… successful unit tests demonstrating Markdown/markup conversion #213 cf usnistgov/OSCAL#1151 (one XSpec each way); Obfuscated one of the unit tests (#218)
Describe the bug
CMS recently released a version of their Acceptable Risk Safeguards (ARS) v5.0 in JSON format.
I forked that repository, cloned the fork to a local copy, made a branch, and then invoked the
oscal_catalog_json-to-xml-converter.xsl
transform to obtain the XML equivalent. The commandwas used.
When the transform result document was inspected using the OSCAL catalog schema, a syntax error was found at
CMS_ARS_5_0.xml
line 1761 which was associated withCMS_ARS_5_0.json
line 4908.(A separate syntax error was the result of an input document syntax error.)
A conversation thread on Gitter which began with "Any reason why a
<br/>
would end up in a transformation of CMS_ARS_5_0.json (line 4908) to CMS_ARS_5_0.xml (line 1761) using oscal_catalog_json-to-xml-converter.xsl?" elicited a suspicion that the input JSON and the transform were responsible.Who is the bug affecting?
Users of
oscal_catalog_json-to-xml-converter.xsl
.What is affected by this bug?
The transform emits an unacceptable element.
When does this occur?
When the above input and transform are used.
How do we replicate the issue?
Perform the steps in this issue's description.
If applicable, add screenshots to help explain your problem.}
Expected behavior (i.e. solution)
Disregarding input flaws, the output of the transform should be syntactically correct.
Other Comments
The text was updated successfully, but these errors were encountered: