Resolved profile catalogs fail XSD validation when source profile contains unordered lists
Rene2mt opened this issue · 3 comments
Describe the bug
When resolving profiles that have unordered lists, the generated resolved profile catalog contains invalid markup (e.g., <li>
elements with child <p>
elements).
Who is the bug affecting?
Users who are using the oscal-cli for profile resolution
What is affected by this bug?
The (XML) resolved profiles that are generated by the oscal-cli fail XSD validations.
When does this occur?
The bug occurs when a part
contains unordered list. It also occurs if p
elements within a part
start with a hyphen ( - ).
How do we replicate the issue?
- Create a (XML) profile
- Add a part (e.g., //profile/modify/alter/add/part )
- Within that part:
add an unordered list like
<ul><li>my content</li></ul>
or
add a paragraph that starts with a hyphen:<p>- my content</p>
The resolved profile will convert this to<li><p>my content</p></li>
which fails XSD validation
Expected behavior (i.e. solution)
XSD validation indicates that only a
, b
, code
, em
, i
, img
, insert
, ol
, q
, strong
, sub
, sup
, and ul
are expected. Profile resolution should either keep the original valid content from the source profile or ensure that only expected elements are used in the generated content.
Other Comments
None.
Thanks for the report, @Rene2mt. Per discussion today when you brought this up: can you confirm this is specific to only this CLI and the Java implementation and not XSLT by using the FedRAMP Automation CI/CD pipeline? If you need help, please let us know!
@Rene2mt, this is still an issue for you, correct?
This lacks sufficient test vectors to build a unit test, but I believe this was addressed by usnistgov/metaschema-java#159. These changes will be integrated when #155 is merged.