Maintain a SchemaInferenceStack in SchemaTracker (YANGTOOLS-1233)

[YANGTOOLS-1235] Add SchemaInferenceStack.enterChoice(QName) Created: 11/Feb/21  Updated: 12/Feb/21  Resolved: 12/Feb/21

Status: Resolved
Project: yangtools
Component/s: model-util
Affects Version/s: None
Fix Version/s: 7.0.0

Type: Sub-task Priority: Medium
Reporter: Robert Varga Assignee: Robert Varga
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

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.


Generated at Wed Feb 07 20:55:34 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.