You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given certain assemblies fields and flags, a developer way want to write constraints and use Metapath axes relative to the current location of a constraint @target or @test to evaluate the ancestor. If the ancestor:: axis element has no explicit name (it is implied, so the OSCAL modules have it and the Metapath references ancestor::authorization-boundary, for example) it will not be correctly evaluated in the predicated. Adding the wildcard, per this issue, will similarly fail (e.g. ancestor::*:authorization-boundary).
Who is the bug affecting
Developers who use metaschema-java for Metaschema processing of OSCAL and other models with implied and explicit namespace lookups. For this report, the specific issue was noticed in Metapath with predicates that look up a predicate of a node in the current context without the namespace, and did not properly filter, nor with a wildcard, and only worked once explicit with a namespace binding.
How do we replicate this issue
Use the metaschema command in oscal-cli or metaschema-cli independently to run the constraint with id="has-authorization-boundary-diagram-link-href-target" from this branch to reproduce the error. There is no stack trace given the nature of this issue.
Given external constraints and OSCAL Metaschema modules, a Metapath @test or @target must properly evaluate a target OSCAL document instance to find an ancestor::ancestor-element without explicit namespace declarate with a /metaschema-meta-constraints/namespace-binding.
Other comments
TBD
The text was updated successfully, but these errors were encountered:
Describe the bug
Given certain assemblies fields and flags, a developer way want to write constraints and use Metapath axes relative to the current location of a constraint
@target
or@test
to evaluate the ancestor. If theancestor::
axis element has no explicit name (it is implied, so the OSCAL modules have it and the Metapath referencesancestor::authorization-boundary
, for example) it will not be correctly evaluated in the predicated. Adding the wildcard, per this issue, will similarly fail (e.g.ancestor::*:authorization-boundary
).Who is the bug affecting
Developers who use metaschema-java for Metaschema processing of OSCAL and other models with implied and explicit namespace lookups. For this report, the specific issue was noticed in Metapath with predicates that look up a predicate of a node in the current context without the namespace, and did not properly filter, nor with a wildcard, and only worked once explicit with a namespace binding.
How do we replicate this issue
Use the metaschema command in oscal-cli or metaschema-cli independently to run the constraint with
id="has-authorization-boundary-diagram-link-href-target"
from this branch to reproduce the error. There is no stack trace given the nature of this issue.https://github.com/aj-stein-gsa/fedramp-automation/tree/bug-metaschema-java-291-example-ancestor-repro
Expected behavior (i.e. solution)
Given external constraints and OSCAL Metaschema modules, a Metapath
@test
or@target
must properly evaluate a target OSCAL document instance to find anancestor::ancestor-element
without explicit namespace declarate with a/metaschema-meta-constraints/namespace-binding
.Other comments
TBD
The text was updated successfully, but these errors were encountered: