schema tree CHANGE remove lys_find_node() from the API

Hide use of schema path format from the API. The schema path format is
used only in YANG's augments and deviations. We have decided to have
only the data path and XPath formats in the API to keep it as simple as
possible. The cost of this simplicity is that it is not possible to
address structure schema nodes (choices, cases, ...) which cannot be
instantiated in data tree. However, we believe that the real world cases
are about the data nodes.

The schema path is used internally and there are functions working with
this format, so in case there will be need to support it in the API, it
can be added there later.
diff --git a/src/tree_schema.c b/src/tree_schema.c
index 1b9433c..05c7f23 100644
--- a/src/tree_schema.c
+++ b/src/tree_schema.c
@@ -194,72 +194,6 @@
 }
 
 API const struct lysc_node *
-lys_find_node(struct ly_ctx *ctx, const struct lysc_node *context_node, const char *qpath)
-{
-    const char *id = qpath;
-    const char *prefix, *name;
-    size_t prefix_len, name_len;
-    const struct lysc_node *node = context_node;
-    struct lys_module *mod = NULL;
-
-    LY_CHECK_ARG_RET(ctx, qpath, NULL);
-
-    while (*id) {
-        if (id[0] == '/') {
-            ++id;
-        }
-        /* precess ".." in relative paths */
-        while (!strncmp("../", id, 3)) {
-            id += 3;
-            if (!node) {
-                LOGERR(ctx, LY_EINVAL, "Invalid qpath \"%s\" - too many \"..\" in the path.", qpath);
-                return NULL;
-            }
-            node = node->parent;
-        }
-
-        if (ly_parse_nodeid(&id, &prefix, &prefix_len, &name, &name_len) != LY_SUCCESS) {
-            LOGERR(ctx, LY_EINVAL, "Invalid qpath \"%s\" - invalid nodeid \"%.*s\".", qpath, id - qpath, qpath);
-            return NULL;
-        }
-        if (prefix) {
-            if (context_node) {
-                mod = lys_module_find_prefix(context_node->module, prefix, prefix_len);
-            } else {
-                for (uint32_t u = 0; u < ctx->list.count; ++u) {
-                    if (!ly_strncmp(((struct lys_module *)ctx->list.objs[u])->name, prefix, prefix_len)) {
-                        struct lys_module *m = (struct lys_module *)ctx->list.objs[u];
-                        if (mod) {
-                            if (m->implemented) {
-                                mod = m;
-                                break;
-                            } else if (m->latest_revision) {
-                                mod = m;
-                            }
-                        } else {
-                            mod = m;
-                        }
-                    }
-                }
-            }
-        }
-        if (!mod) {
-            LOGERR(ctx, LY_EINVAL, "Invalid qpath - unable to find module connected with the prefix of the node \"%.*s\".",
-                    id - qpath, qpath);
-            return NULL;
-        }
-
-        node = lys_find_child(node, mod, name, name_len, 0, LYS_GETNEXT_NOSTATECHECK);
-        if (!node) {
-            LOGERR(ctx, LY_EINVAL, "Invalid qpath - unable to find \"%.*s\".", id - qpath, qpath);
-            return NULL;
-        }
-    }
-
-    return node;
-}
-
-API const struct lysc_node *
 lys_find_child(const struct lysc_node *parent, const struct lys_module *module, const char *name, size_t name_len,
         uint16_t nodetype, uint32_t options)
 {
diff --git a/src/tree_schema.h b/src/tree_schema.h
index d0ec2d3..923d780 100644
--- a/src/tree_schema.h
+++ b/src/tree_schema.h
@@ -1993,25 +1993,6 @@
         const char *name, size_t name_len, uint16_t nodetype, uint32_t options);
 
 /**
- * @brief Get schema node specified by the schema path.
- *
- * In case the @p qpath uses prefixes (from imports or of the schema itself), the @p context_node must be specified
- * even if the path is absolute. In case the @p context_node is not provided, the names of the schemas are expected as the
- * node's prefixes in the @qpath. It also means that the relative paths are accepted only with the schema prefixes,
- * not the full names.
- *
- * @param[in] ctx libyang context for logging and getting the correct schema if @p contet_node not provided.
- * @param[in] context_node Context node for relative paths and/or as a source of the context module to resolve node's
- * prefixes in @qpath.
- * @param[in] qpath Schema path to be resolved. Not prefixed nodes inherits the prefix from its parent nodes. It means
- * that the first node in the path must be prefixed. Both, import prefixes as well as full schema names are accepted as
- * prefixes according to the @p context_node parameter presence.
- * @return NULL in case of invalid path.
- * @return found schema node.
- */
-const struct lysc_node *lys_find_node(struct ly_ctx *ctx, const struct lysc_node *context_node, const char *qpath);
-
-/**
  * @brief Make the specific module implemented.
  *
  * @param[in] mod Module to make implemented. It is not an error
diff --git a/tools/lint/commands.c b/tools/lint/commands.c
index 78f5a00..233b935 100644
--- a/tools/lint/commands.c
+++ b/tools/lint/commands.c
@@ -64,11 +64,11 @@
     printf("\ttree-options:\t--tree-print-groupings\t(print top-level groupings in a separate section)\n");
     printf("\t             \t--tree-print-uses\t(print uses nodes instead the resolved grouping nodes)\n");
     printf("\t             \t--tree-no-leafref-target\t(do not print the target nodes of leafrefs)\n");
-    printf("\t             \t--tree-path <schema-path>\t(print only the specified subtree)\n");
+    printf("\t             \t--tree-path <data-path>\t(print only the specified subtree)\n");
     printf("\t             \t--tree-line-length <line-length>\t(wrap lines if longer than line-length,\n");
     printf("\t             \t\tnot a strict limit, longer lines can often appear)\n");
     printf("\n");
-    printf("\tinfo-path:\t<schema-path> | identity/<identity-name> | feature/<feature-name>\n");
+    printf("\tinfo-path:\t<data-path> | identity/<identity-name> | feature/<feature-name>\n");
     printf("\n");
     printf("\tschema-path:\t( /<module-name>:<node-identifier> )+\n");
 }
@@ -503,7 +503,7 @@
     }
 
     if (target_path) {
-        const struct lysc_node *node = lys_find_node(ctx, NULL, target_path);
+        const struct lysc_node *node = ly_ctx_get_node(ctx, NULL, target_path, 0);
         if (node) {
             ret = lys_print_node(out, node, format, tree_ll, output_opts);
         } else {
diff --git a/tools/lint/main_ni.c b/tools/lint/main_ni.c
index efc0c85..a276030 100644
--- a/tools/lint/main_ni.c
+++ b/tools/lint/main_ni.c
@@ -788,7 +788,7 @@
     /* convert (print) to FORMAT */
     if (outformat_s) {
         if (outtarget_s) {
-            const struct lysc_node *node = lys_find_node(ctx, NULL, outtarget_s);
+            const struct lysc_node *node = ly_ctx_get_node(ctx, NULL, outtarget_s, 0);
             if (node) {
                 lys_print_node(out, node, outformat_s, outline_length_s, outoptions_s);
             } else {