Certain XPath expressions in profile resolver don't match spec #1075
Labels
bug
closable
Scope: Tooling and APIs
Issues targeted at development of tooling and APIs to support OSCAL content creation and use.
Milestone
Describe the bug
I found some XPath expressions in
src/utils/util/resolver-pipeline/oscal-profile-resolve-select.xsl
that don't align with the latest spec. Can you confirm?Line 181:
<xsl:sequence select="some $m in ($importing/include/matching[o:calls-children(.)])
The element name
include
should sayinclude-controls
. Also, I believe the predicate expression belongs oninclude-controls
(notmatching
) to align with wherewith-child-controls
appears in the profile input document.Line 191:
<xsl:sequence select="some $m in ($importing/exclude-controls[o:calls-children(.)]/matcjomg)
matcjomg
is a typo; it should saymatching
.Lines 182 and 192:
satisfies (matches($candidate/ancestor::control/@id,$m/@pattern/o:glob-as-regex(string(.))))
The
matches
function call errors out if the candidate has multiple ancestor controls that have an ID. Is that nesting depth meant to be supported? If so, maybe thesome
expression on the preceding line can range over bothmatching
elements and ancestor controls.Who is the bug affecting?
Users of profile resolver, under the conditions pertaining to these specific XPath expressions.
What is affected by this bug?
Selection of controls in the output of the profile resolver.
How do we replicate the issue?
For the first two items, inspect the XPath expressions and compare with the spec.
For the item on lines 182 and 192, use pattern matching to include or exclude a control that has multiple ancestor controls having IDs.
The text was updated successfully, but these errors were encountered: