Interface YangXPathExpression

All Superinterfaces:
Immutable
All Known Subinterfaces:
YangXPathExpression.QualifiedBound, YangXPathExpression.UnqualifiedBound

public interface YangXPathExpression extends Immutable
An XPath expression. This interface defines a parsed representation of an XPath defined in a YANG context, as specified in RFC7950, Section 6.4.

The specification along with rules for path statement evaluation rules end up defining four incremental levels to which an XPath expression can be bound:

  • Unbound Expressions, which is a essentially a parse tree. No namespace binding has been performed, i.e. all node identifiers are in UnresolvedQName.Qualified or UnresolvedQName.Unqualified form. This level is typically not used when dealing with YANG models directly, but can be useful for validating a String conforms to XPath syntax.
  • Qualified-bound Expressions, where all UnresolvedQName.Qualifieds are resolved and bound to QNames, but UnresolvedQName.Unqualifieds are still present. This level corresponds to how far a YANG parser can interpret XPath expressions defined in typedef statements and statements which are not fully instantiated, i.e. are descendants of a grouping statement.
  • Namespace-bound Expressions, where all node identifier references are resolved to QNames. This level corresponds to how far a YANG parser can interpret XPath expressions at their place of instantiation, either in the data tree or an action/@{code rpc}/notification or similar context.
  • Context-bound Expressions, where the expression is bound to a {code context node}, i.e. current() function result is know. This API does not handle this state, as it is inherently bound to a particular data object model.