Skip to content

When statement xpath not correctly evaluated within case nodes #46

@christian-herber

Description

@christian-herber

According to https://datatracker.ietf.org/doc/html/rfc7950#section-7.21.5

      If the "when" statement is a child of a "uses", "choice", or
      "case" statement, then the context node is the closest ancestor
      node to the node with the "when" statement that is also a data
      node.  If no such node exists, the context node is the root node.
      The accessible tree is tentatively altered during the processing
      of the XPath expression by removing all instances (if any) of the
      nodes added by the "uses", "choice", or "case" statement.

The extension seems to not use the closest ancestor node that is a data node as context node.
For the reference of when to be displayed in the editor, you need to add ../ to the path, which is incorrect. In a correct model, the reference is not shown in the editor.

Originally, I suspected an issue in another tool, and created this ticket: CZ-NIC/yangson#112. Maybe this is helpful

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions