OK, let's bite the bullet: OLD
The "path" statement, which is a substatement to the "type" statement, MUST be present if the type is "leafref". It takes as an argument a string that MUST refer to a leaf or leaf-list node. The syntax for a path argument is a subset of the XPath abbreviated syntax. Predicates are used only for constraining the values for the key nodes for list entries. Each predicate consists of exactly one equality test per key, and multiple adjacent predicates MAY be present if a list has multiple keys. The syntax is formally defined by the rule "path-arg" in Section 14. NEW The "path" statement, which is a substatement to the "type" statement, MUST be present if the type is "leafref". The syntax for its argument is formally defined by the rule "path-arg" in Section 14. The "path" statement is used in two ways: 1. It refers to another "leaf" node that is obtained by treating the "path" argument as a path in the schema tree. If the argument begins with the slash character ("/"), i.e., corresponds to the ABNF rule "absolute-path", the path starts at the root of the schema tree, otherwise it starts at the current "leaf" node with the "leafref" type. The steps along this path are performed by interpreting each of the slash-separated components of the "path" argument as follows: o If the component is the double-dot string (".."), go to the closest schema tree ancestor that is a data node or schema root. o Otherwise, the component contains a data node identifier and an optional path predicate enclosed in square brackets. Go to the data child (see below) whose name is the data node identifier. A data child of data node N is a descendant node in the schema tree for which node N is the closest ancestor that is a data node. The path predicate, if present, is ignored. The "leaf" node to which the "path" argument refers MUST exist in the schema tree. 2. If the "require-instance" property (Section 9.9.3) is "true", the "path" argument is evaluated as an XPath expression once for each instance of the "leaf" with the "leafref" type. The result of every such evaluation MUST be a non-empty node set. Path predicates are used only for specifying the values for the key nodes for list entries. Each predicate consists of exactly one equality test per key, and multiple adjacent predicates MAY be present if a list has multiple keys. Lada -- Ladislav Lhotka, CZ.NIC Labs PGP Key ID: E74E8C0C _______________________________________________ netmod mailing list netmod@ietf.org https://www.ietf.org/mailman/listinfo/netmod