diff --git a/src/context.c b/src/context.c
new file mode 100644
index 0000000..c2eba9b
--- /dev/null
+++ b/src/context.c
@@ -0,0 +1,291 @@
+/**
+ * @file context.c
+ * @author Radek Krejci <rkrejci@cesnet.cz>
+ * @brief Context implementations
+ *
+ * Copyright (c) 2015 - 2018 CESNET, z.s.p.o.
+ *
+ * This source code is licensed under BSD 3-Clause License (the "License").
+ * You may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://opensource.org/licenses/BSD-3-Clause
+ */
+
+#include <errno.h>
+#include <unistd.h>
+
+#include "libyang.h"
+#include "common.h"
+#include "context.h"
+
+#define LY_INTERNAL_MODS_COUNT 0 /* TODO 6 when parser available */
+
+#define IETF_YANG_METADATA_PATH "../models/ietf-yang-metadata@2016-08-05.h"
+#define YANG_PATH "../models/yang@2017-02-20.h"
+#define IETF_INET_TYPES_PATH "../models/ietf-inet-types@2013-07-15.h"
+#define IETF_YANG_TYPES_PATH "../models/ietf-yang-types@2013-07-15.h"
+#define IETF_DATASTORES "../models/ietf-datastores@2017-08-17.h"
+#define IETF_YANG_LIB_PATH "../models/ietf-yang-library@2018-01-17.h"
+#define IETF_YANG_LIB_REV "2018-01-17"
+
+#if LY_INTERNAL_MODS_COUNT
+#include IETF_YANG_METADATA_PATH
+#include YANG_PATH
+#include IETF_INET_TYPES_PATH
+#include IETF_YANG_TYPES_PATH
+#include IETF_DATASTORES
+#include IETF_YANG_LIB_PATH
+#endif
+
+static struct internal_modules_s {
+    const char *name;
+    const char *revision;
+    const char *data;
+    uint8_t implemented;
+    LYS_INFORMAT format;
+} internal_modules[LY_INTERNAL_MODS_COUNT] = {
+#if LY_INTERNAL_MODS_COUNT
+    {"ietf-yang-metadata", "2016-08-05", (const char*)ietf_yang_metadata_2016_08_05_yin, 0, LYS_IN_YIN},
+    {"yang", "2017-02-20", (const char*)yang_2017_02_20_yin, 1, LYS_IN_YIN},
+    {"ietf-inet-types", "2013-07-15", (const char*)ietf_inet_types_2013_07_15_yin, 0, LYS_IN_YIN},
+    {"ietf-yang-types", "2013-07-15", (const char*)ietf_yang_types_2013_07_15_yin, 0, LYS_IN_YIN},
+    /* ietf-datastores and ietf-yang-library must be right here at the end of the list! */
+    {"ietf-datastores", "2017-08-17", (const char*)ietf_datastores_2017_08_17_yin, 0, LYS_IN_YIN},
+    {"ietf-yang-library", IETF_YANG_LIB_REV, (const char*)ietf_yang_library_2018_01_17_yin, 1, LYS_IN_YIN}
+#endif
+};
+
+API LY_ERR
+ly_ctx_set_searchdir(struct ly_ctx *ctx, const char *search_dir)
+{
+    char *new_dir = NULL;
+    LY_ERR rc = LY_ESYS;
+
+    LY_CHECK_ARG_RET(ctx, ctx, LY_EINVAL);
+
+    if (search_dir) {
+        LY_CHECK_ERR_GOTO(access(search_dir, R_OK | X_OK),
+                          LOGERR(ctx, LY_ESYS, "Unable to use search directory \"%s\" (%s)", search_dir, strerror(errno)),
+                          cleanup);
+        new_dir = realpath(search_dir, NULL);
+        LY_CHECK_ERR_GOTO(!new_dir,
+                          LOGERR(ctx, LY_ESYS, "realpath() call failed for \"%s\" (%s).", search_dir, strerror(errno)),
+                          cleanup);
+        if (ly_set_add(ctx->search_paths, new_dir) == -1) {
+            free(new_dir);
+            return LY_EMEM;
+        }
+
+        rc = LY_SUCCESS;
+    } else {
+        /* consider that no change is not actually an error */
+        return LY_SUCCESS;
+    }
+
+cleanup:
+    free(new_dir);
+    return rc;
+}
+
+API const char * const *
+ly_ctx_get_searchdirs(const struct ly_ctx *ctx)
+{
+    LY_CHECK_ARG_RET(ctx, ctx, NULL);
+    return (const char * const *)ctx->search_paths.objs;
+}
+
+API LY_ERR
+ly_ctx_unset_searchdirs(struct ly_ctx *ctx, int index)
+{
+    if (!ctx->search_paths.number) {
+        return LY_SUCCESS;
+    }
+
+    if (index >= 0) {
+        /* remove specific search directory */
+        return ly_set_rm_index(ctx->search_paths, index);
+    } else {
+        /* remove them all */
+        for (; ctx->search_paths.number; ctx->search_paths.number--) {
+            free(ctx->search_paths.objs[ctx->search_paths.number - 1]);
+        }
+        free(ctx->search_paths.objs);
+        memset(&ctx->search_paths, 0, sizeof ctx->search_paths);
+    }
+
+    return LY_SUCCESS;
+}
+
+API LY_ERR
+ly_ctx_new(const char *search_dir, int options, struct ly_ctx **new_ctx)
+{
+    struct ly_ctx *ctx = NULL;
+    struct lys_module *module;
+    char *search_dir_list;
+    char *sep, *dir;
+    LY_ERR rc = LY_SUCCESS;
+    int i;
+
+    ctx = calloc(1, sizeof *ctx);
+    LY_CHECK_ERR_RETURN(!ctx, LOGMEM(NULL), LY_EMEM);
+
+    /* dictionary */
+    lydict_init(&ctx->dict);
+
+    /* plugins */
+    ly_load_plugins();
+
+    /* initialize thread-specific key */
+    while ((i = pthread_key_create(&ctx->errlist_key, ly_err_free)) == EAGAIN);
+
+    /* models list */
+    ctx->flags = options;
+    if (search_dir) {
+        search_dir_list = strdup(search_dir);
+        LY_CHECK_ERR_GOTO(!search_dir_list, LOGMEM(NULL); rc = LY_EMEM, error);
+
+        for (dir = search_dir_list; (sep = strchr(dir, ':')) != NULL && rc == LY_SUCCESS; dir = sep + 1) {
+            *sep = 0;
+            rc = ly_ctx_set_searchdir(ctx, dir);
+        }
+        if (*dir && rc == LY_SUCCESS) {
+            rc = ly_ctx_set_searchdir(ctx, dir);
+        }
+        free(search_dir_list);
+
+        /* If ly_ctx_set_searchdir() failed, the error is already logged. Just exit */
+        if (rc != LY_SUCCESS) {
+            goto error;
+        }
+    }
+    ctx->module_set_id = 1;
+
+    /* load internal modules */
+    for (i = 0; i < (options & LY_CTX_NOYANGLIBRARY) ? LY_INTERNAL_MODS_COUNT - 2 : LY_INTERNAL_MODS_COUNT; i++) {
+        module = (struct lys_module *)lys_parse_mem(ctx, internal_modules[i].data, internal_modules[i].format);
+        LY_CHECK_GOTO(!module, error);
+        module->parsed->implemented = internal_modules[i].implemented;
+    }
+
+    *new_ctx = ctx;
+    return rc;
+
+error:
+    ly_ctx_destroy(ctx, NULL);
+    return rc;
+}
+
+API void
+ly_ctx_set_disable_searchdirs(struct ly_ctx *ctx)
+{
+    LY_CHECK_ARG_RET(ctx, ctx,);
+    ctx->flags |= LY_CTX_DISABLE_SEARCHDIRS;
+}
+
+API void
+ly_ctx_unset_disable_searchdirs(struct ly_ctx *ctx)
+{
+    LY_CHECK_ARG_RET(ctx, ctx,);
+    ctx->flags &= ~LY_CTX_DISABLE_SEARCHDIRS;
+}
+
+API void
+ly_ctx_set_disable_searchdir_cwd(struct ly_ctx *ctx)
+{
+    LY_CHECK_ARG_RET(ctx, ctx,);
+    ctx->flags |= LY_CTX_DISABLE_SEARCHDIR_CWD;
+}
+
+API void
+ly_ctx_unset_disable_searchdir_cwd(struct ly_ctx *ctx)
+{
+    LY_CHECK_ARG_RET(ctx, ctx,);
+    ctx->flags &= ~LY_CTX_DISABLE_SEARCHDIR_CWD;
+}
+
+API void
+ly_ctx_set_prefer_searchdirs(struct ly_ctx *ctx)
+{
+    LY_CHECK_ARG_RET(ctx, ctx,);
+    ctx->flags |= LY_CTX_PREFER_SEARCHDIRS;
+}
+
+API void
+ly_ctx_unset_prefer_searchdirs(struct ly_ctx *ctx)
+{
+    LY_CHECK_ARG_RET(ctx, ctx,);
+    ctx->flags &= ~LY_CTX_PREFER_SEARCHDIRS;
+}
+
+API void
+ly_ctx_set_allimplemented(struct ly_ctx *ctx)
+{
+    LY_CHECK_ARG_RET(ctx, ctx,);
+    ctx->flags |= LY_CTX_ALLIMPLEMENTED;
+}
+
+API void
+ly_ctx_unset_allimplemented(struct ly_ctx *ctx)
+{
+    LY_CHECK_ARG_RET(ctx, ctx,);
+    ctx->flags &= ~LY_CTX_ALLIMPLEMENTED;
+}
+
+API void
+ly_ctx_set_trusted(struct ly_ctx *ctx)
+{
+    LY_CHECK_ARG_RET(ctx, ctx,);
+    ctx->flags |= LY_CTX_TRUSTED;
+}
+
+API void
+ly_ctx_unset_trusted(struct ly_ctx *ctx)
+{
+    LY_CHECK_ARG_RET(ctx, ctx,);
+    ctx->flags &= ~LY_CTX_TRUSTED;
+}
+
+API int
+ly_ctx_get_options(struct ly_ctx *ctx)
+{
+    return ctx->flags;
+}
+
+API uint16_t
+ly_ctx_get_module_set_id(const struct ly_ctx *ctx)
+{
+    return ctx->module_set_id;
+}
+
+API void
+ly_ctx_destroy(struct ly_ctx *ctx, void (*private_destructor)(const struct lys_node *node, void *priv))
+{
+    LY_CHECK_ARG_RET(ctx, ctx,);
+
+    /* models list */
+    for (; ctx->list.number; ctx->list.number--) {
+        /* remove the module */
+#if 0 /* TODO when parser implemented */
+        lys_free(ctx->list[ctx->list.number - 1], private_destructor, 1, 0);
+#endif
+    }
+    free(ctx->list.objs);
+
+    /* search paths list */
+    ly_ctx_unset_searchdirs(ctx, -1);
+
+    /* clean the error list */
+    ly_err_clean(ctx, 0);
+    pthread_key_delete(ctx->errlist_key);
+
+    /* dictionary */
+    lydict_clean(&ctx->dict);
+
+#if 0 /* TODO when plugins implemented */
+    /* plugins - will be removed only if this is the last context */
+    ly_clean_plugins();
+#endif
+
+    free(ctx);
+}
diff --git a/src/context.h b/src/context.h
index c3067e5..4ff45ad 100644
--- a/src/context.h
+++ b/src/context.h
@@ -21,29 +21,16 @@
 #include "hash_table.h"
 #include "tree_schema.h"
 
-struct ly_modules_list {
-    char **search_paths;
-    int size;
-    int used;
-    struct lys_module **list;
-    /* all (sub)modules that are currently being parsed */
-    struct lys_module **parsing_sub_modules;
-    /* all already parsed submodules of a module, which is before all its submodules (to mark submodule imports) */
-    struct lys_module **parsed_submodules;
-    uint8_t parsing_sub_modules_count;
-    uint8_t parsed_submodules_count;
-    uint16_t module_set_id;
-    int flags; /* see @ref contextoptions. */
-};
-
 /**
  * @brief Context of the YANG schemas
  */
 struct ly_ctx {
-    struct dict_table dict;
-    struct ly_modules_list models;
-    pthread_key_t errlist_key;
+    struct dict_table dict;           /**< dictionary to effectively store strings used in the context related structures */
+    struct ly_set search_paths;       /**< set of directories where to search for schema's imports/includes */
+    struct ly_set list;               /**< set of YANG schemas */
+    uint16_t module_set_id;           /**< ID of the current set of schemas */
+    uint16_t flags;                   /**< context settings, see @ref contextoptions. */
+    pthread_key_t errlist_key;        /**< key for the thread-specific list of errors related to the context */
 };
 
-
 #endif /* LY_CONTEXT_H_ */
diff --git a/src/libyang.h b/src/libyang.h
index ca649c3..a023fbb 100644
--- a/src/libyang.h
+++ b/src/libyang.h
@@ -15,23 +15,257 @@
 #ifndef LY_LIBYANG_H_
 #define LY_LIBYANG_H_
 
+#include <stdint.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 /**
+ * @defgroup context Context
+ * @{
+ *
+ * Structures and functions to manipulate with the libyang "containers". The \em context concept allows callers
+ * to work in environments with different sets of YANG schemas. More detailed information can be found at
+ * @ref howtocontext page.
+ */
+
+/**
  * @struct ly_ctx
  * @brief libyang context handler.
  */
 struct ly_ctx;
 
-
-#ifdef __cplusplus
-}
-#endif
+/**@} context */
 
 #include "log.h"
 #include "set.h"
 #include "dict.h"
+#include "tree_schema.h"
+
+/**
+ * @ingroup context
+ * @{
+ */
+
+/**
+ * @defgroup contextoptions Context options
+ * @ingroup context
+ *
+ * Options to change context behavior.
+ * @{
+ */
+
+#define LY_CTX_ALLIMPLEMENTED 0x01 /**< All the imports of the schema being parsed are treated implemented. */
+#define LY_CTX_TRUSTED        0x02 /**< Handle the schema being parsed as trusted and skip its validation
+                                        tests. Note that while this option improves performance, it can
+                                        lead to an undefined behavior if the schema is not correct. */
+#define LY_CTX_NOYANGLIBRARY  0x04 /**< Do not internally implement ietf-yang-library module. The option
+                                        causes that function ly_ctx_info() does not work (returns NULL) until
+                                        the ietf-yang-library module is loaded manually. While any revision
+                                        of this schema can be loaded with this option, note that the only
+                                        revisions implemented by ly_ctx_info() are 2016-04-09 and 2018-01-17.
+                                        This option cannot be used with ly_ctx_new_yl*() functions. */
+#define LY_CTX_DISABLE_SEARCHDIRS 0x08  /**< Do not search for schemas in context's searchdirs neither in current
+                                        working directory. It is entirely skipped and the only way to get
+                                        schema data for imports or for ly_ctx_load_module() is to use the
+                                        callbacks provided by caller via ly_ctx_set_module_imp_clb() */
+#define LY_CTX_DISABLE_SEARCHDIR_CWD 0x10 /**< Do not automatically search for schemas in current working
+                                        directory, which is by default searched automatically (despite not
+                                        recursively). */
+#define LY_CTX_PREFER_SEARCHDIRS 0x20 /**< When searching for schema, prefer searchdirs instead of user callback. */
+/**@} contextoptions */
+
+/**
+ * @brief Create libyang context.
+ *
+ * Context is used to hold all information about schemas. Usually, the application is supposed
+ * to work with a single context in which libyang is holding all schemas (and other internal
+ * information) according to which the data trees will be processed and validated. So, the schema
+ * trees are tightly connected with the specific context and they are held by the context internally
+ * - caller does not need to keep pointers to the schemas returned by lys_parse(), context knows
+ * about them. The data trees created with lyd_parse() are still connected with the specific context,
+ * but they are not internally held by the context. The data tree just points and lean on some data
+ * held by the context (schema tree, string dictionary, etc.). Therefore, in case of data trees, caller
+ * is supposed to keep pointers returned by the lyd_parse() and manage the data tree on its own. This
+ * also affects the number of instances of both tree types. While you can have only one instance of
+ * specific schema connected with a single context, number of data tree instances is not connected.
+ *
+ * @param[in] search_dir Directory where libyang will search for the imported or included modules
+ * and submodules. If no such directory is available, NULL is accepted.
+ * @param[in] options Context options, see @ref contextoptions.
+ * @param[out] new_ctx Pointer to the created libyang context if LY_SUCCESS returned.
+ * @return LY_ERR return value.
+ */
+LY_ERR ly_ctx_new(const char *search_dir, int options, struct ly_ctx **new_ctx);
+
+/**
+ * @brief Add the search path into libyang context
+ *
+ * To reset search paths set in the context, use ly_ctx_unset_searchdirs() and then
+ * set search paths again.
+ *
+ * @param[in] ctx Context to be modified.
+ * @param[in] search_dir New search path to add to the current paths previously set in ctx.
+ * @return EXIT_SUCCESS, EXIT_FAILURE.
+ */
+int ly_ctx_set_searchdir(struct ly_ctx *ctx, const char *search_dir);
+
+/**
+ * @brief Clean the search path(s) from the libyang context
+ *
+ * @param[in] ctx Context to be modified.
+ * @param[in] index Index of the search path to be removed, use negative value to remove them all.
+ *            Correct index value can be checked via ly_ctx_get_searchdirs().
+ * @return LY_ERR return value
+ */
+LY_ERR ly_ctx_unset_searchdirs(struct ly_ctx *ctx, int index);
+
+/**
+ * @brief Get the NULL-terminated list of the search paths in libyang context. Do not modify the result!
+ *
+ * @param[in] ctx Context to query.
+ * @return NULL-terminated list (array) of the search paths, NULL if no searchpath was set.
+ * Do not modify the provided data in any way!
+ */
+const char * const *ly_ctx_get_searchdirs(const struct ly_ctx *ctx);
+
+/**
+ * @brief Get the currently set context's options.
+ *
+ * @param[in] ctx Context to query.
+ * @return Combination of all the currently set context's options, see @ref contextoptions.
+ */
+int ly_ctx_get_options(struct ly_ctx *ctx);
+
+/**
+ * @brief Make context to stop searching for schemas (imported, included or requested via ly_ctx_load_module())
+ * in searchdirs set via ly_ctx_set_searchdir() functions. Searchdirs are still stored in the context, so by
+ * unsetting the option by ly_ctx_unset_disable_searchdirs() searching in all previously searchdirs is restored.
+ *
+ * The same effect is achieved by using #LY_CTX_DISABLE_SEARCHDIRS option when creating new context or parsing
+ * a specific schema.
+ *
+ * @param[in] ctx Context to be modified.
+ */
+void ly_ctx_set_disable_searchdirs(struct ly_ctx *ctx);
+
+/**
+ * @brief Reverse function to ly_ctx_set_disable_searchdirs().
+ *
+ * @param[in] ctx Context to be modified.
+ */
+void ly_ctx_unset_disable_searchdirs(struct ly_ctx *ctx);
+
+/**
+ * @brief Make context to stop implicitly searching for schemas (imported, included or requested via ly_ctx_load_module())
+ * in current working directory. This flag can be unset by ly_ctx_unset_disable_searchdir_cwd().
+ *
+ * The same effect is achieved by using #LY_CTX_DISABLE_SEARCHDIR_CWD option when creating new context or parsing
+ * a specific schema.
+ *
+ * @param[in] ctx Context to be modified.
+ */
+void ly_ctx_set_disable_searchdir_cwd(struct ly_ctx *ctx);
+
+/**
+ * @brief Reverse function to ly_ctx_set_disable_searchdir_cwd().
+ *
+ * @param[in] ctx Context to be modified.
+ */
+void ly_ctx_unset_disable_searchdir_cwd(struct ly_ctx *ctx);
+
+/**
+ * @brief Prefer context's searchdirs before the user callback (ly_module_imp_clb) provided via ly_ctx_set_module_imp_clb()).
+ *
+ * The same effect is achieved by using #LY_CTX_PREFER_SEARCHDIRS option when creating new context or parsing
+ * a specific schema.
+ *
+ * @param[in] ctx Context to be modified.
+ */
+void ly_ctx_set_prefer_searchdirs(struct ly_ctx *ctx);
+
+/**
+ * @brief Reverse function to ly_ctx_set_prefer_searchdirs().
+ *
+ * @param[in] ctx Context to be modified.
+ */
+void ly_ctx_unset_prefer_searchdirs(struct ly_ctx *ctx);
+
+/**
+ * @brief Make context to set all the imported modules to be implemented. By default,
+ * if the imported module is not used in leafref's path, augment or deviation, it is
+ * imported and its data tree is not taken into account.
+ *
+ * The same effect is achieved by using #LY_CTX_ALLIMPLEMENTED option when creating new context or parsing
+ * a specific schema.
+ *
+ * Note, that function does not make the currently loaded modules, it just change the
+ * schema parser behavior for the future parsing. This flag can be unset by ly_ctx_unset_allimplemented().
+ *
+ * @param[in] ctx Context to be modified.
+ */
+void ly_ctx_set_allimplemented(struct ly_ctx *ctx);
+
+/**
+ * @brief Reverse function to ly_ctx_set_allimplemented().
+ *
+ * @param[in] ctx Context to be modified.
+ */
+void ly_ctx_unset_allimplemented(struct ly_ctx *ctx);
+
+/**
+ * @brief Change the schema parser behavior when parsing new schemas forcing it to skip some of the schema
+ * validation checks to improve performance. Note that parsing invalid schemas this way may lead to an
+ * undefined behavior later, e.g. when working with data trees.
+ *
+ * The same effect is achieved by using #LY_CTX_TRUSTED option when creating new context or parsing
+ * a specific schema.
+ *
+ * This flag can be unset by ly_ctx_unset_trusted().
+ *
+ * @param[in] ctx Context to be modified.
+ */
+void ly_ctx_set_trusted(struct ly_ctx *ctx);
+
+/**
+ * @brief Reverse function to ly_ctx_set_trusted().
+ *
+ * @param[in] ctx Context to be modified.
+ */
+void ly_ctx_unset_trusted(struct ly_ctx *ctx);
+
+/**
+ * @brief Get current ID of the modules set. The value is available also
+ * as module-set-id in ly_ctx_info() result.
+ *
+ * @param[in] ctx Context to be examined.
+ * @return Numeric identifier of the current context's modules set.
+ */
+uint16_t ly_ctx_get_module_set_id(const struct ly_ctx *ctx);
+
+/**
+ * @brief Free all internal structures of the specified context.
+ *
+ * The function should be used before terminating the application to destroy
+ * and free all structures internally used by libyang. If the caller uses
+ * multiple contexts, the function should be called for each used context.
+ *
+ * All instance data are supposed to be freed before destroying the context.
+ * Data models are destroyed automatically as part of ly_ctx_destroy() call.
+ *
+ * @param[in] ctx libyang context to destroy
+ * @param[in] private_destructor Optional destructor function for private objects assigned
+ * to the nodes via lys_set_private(). If NULL, the private objects are not freed by libyang.
+ * Remember the differences between the structures derived from ::lys_node and always check
+ * ::lys_node#nodetype.
+ */
+void ly_ctx_destroy(struct ly_ctx *ctx, void (*private_destructor)(const struct lysc_node *node, void *priv));
+
+/** @} context */
+
+#ifdef __cplusplus
+}
+#endif
 
 #endif /* LY_LIBYANG_H_ */
diff --git a/src/tree_schema.h b/src/tree_schema.h
index 4e3f095..6dc23ed 100644
--- a/src/tree_schema.h
+++ b/src/tree_schema.h
@@ -24,6 +24,27 @@
  * Data structures and functions to manipulate and access schema tree.
  */
 
+/**
+ * @brief Schema input formats accepted by libyang [parser functions](@ref howtoschemasparsers).
+ */
+typedef enum {
+    LYS_IN_UNKNOWN = 0,  /**< unknown format, used as return value in case of error */
+    LYS_IN_YANG = 1,     /**< YANG schema input format */
+    LYS_IN_YIN = 2       /**< YIN schema input format */
+} LYS_INFORMAT;
+
+/**
+ * @brief Schema output formats accepted by libyang [printer functions](@ref howtoschemasprinters).
+ */
+typedef enum {
+    LYS_OUT_UNKNOWN = 0, /**< unknown format, used as return value in case of error */
+    LYS_OUT_YANG = 1,    /**< YANG schema output format */
+    LYS_OUT_YIN = 2,     /**< YIN schema output format */
+    LYS_OUT_TREE,        /**< Tree schema output format, for more information see the [printers](@ref howtoschemasprinters) page */
+    LYS_OUT_INFO,        /**< Info schema output format, for more information see the [printers](@ref howtoschemasprinters) page */
+    LYS_OUT_JSON,        /**< JSON schema output format, reflecting YIN format with conversion of attributes to object's members */
+} LYS_OUTFORMAT;
+
 #define LY_REV_SIZE 11   /**< revision data string length (including terminating NULL byte) */
 
 #define LYS_UNKNOWN 0x0000,        /**< uninitalized unknown statement node */
@@ -619,6 +640,12 @@
 };
 
 /**
+ * @brief Compiled YANG data node
+ */
+struct lysc_node {
+};
+
+/**
  * @brief Available YANG schema tree structures representing YANG module.
  */
 struct lys_module {
