Add SchemaInferenceStack.enterChoice(QName)
Description
Activity
Show:
Done
Details
Details
Assignee

Reporter

Components
Fix versions
Priority
Created February 11, 2021 at 7:26 PM
Updated February 12, 2021 at 10:29 AM
Resolved February 12, 2021 at 10:29 AM
yang-data-impl's SchemaTracker performs a rather weird dance, where (due to NormalizedNode) hierarchy it performs a hybrid schema tree/data tree walk.
While it can enter a ChoiceEffectiveStatement via schema tree, it needs to deal with choice/case/choice traversal, where it does not see the intermediate case.
SchemaInferenceStack is well equipped to handle this, as it already needs to deal with choice/case crossing during SchemaNodeIdentifier construction when data tree steps are involved.
Introduce an alternative enterChoice(QName), which will examine parent and based on that either turns into a enterSchemaTree() or, if parent is a Choice, will do a case traversal search – resulting in a clean=false step which resolveSchemaTreeSteps() needs to unwind.