doc BUGFIX internal docs' issues reported by doxygen
diff --git a/src/json.h b/src/json.h
index a43f90c..96504c5 100644
--- a/src/json.h
+++ b/src/json.h
@@ -54,11 +54,11 @@
     const struct ly_ctx *ctx;
     struct ly_in *in;       /* input structure */
 
-    struct ly_set status;   /* stack of LYJSON_PARSER_STATUS values corresponding to the JSON items being processed */
+    struct ly_set status;   /* stack of ::LYJSON_PARSER_STATUS values corresponding to the JSON items being processed */
 
-    const char *value;      /* LYJSON_STRING, LYJSON_NUMBER, LYJSON_OBJECT */
-    size_t value_len;       /* LYJSON_STRING, LYJSON_NUMBER, LYJSON_OBJECT */
-    ly_bool dynamic;        /* LYJSON_STRING, LYJSON_NUMBER, LYJSON_OBJECT */
+    const char *value;      /* ::LYJSON_STRING, ::LYJSON_NUMBER, ::LYJSON_OBJECT */
+    size_t value_len;       /* ::LYJSON_STRING, ::LYJSON_NUMBER, ::LYJSON_OBJECT */
+    ly_bool dynamic;        /* ::LYJSON_STRING, ::LYJSON_NUMBER, ::LYJSON_OBJECT */
     uint32_t depth;         /* current number of nested blocks, see ::LY_MAX_BLOCK_DEPTH */
 
     struct {
@@ -77,7 +77,7 @@
  *
  * @param[in] ctx libyang context.
  * @param[in] in JSON string data to parse.
- * @param[out] jsonctx New JSON context with status ::LYJSON_VALUE.
+ * @param[out] jsonctx New JSON context with status referring the parsed value.
  * @return LY_ERR value.
  */
 LY_ERR lyjson_ctx_new(const struct ly_ctx *ctx,  struct ly_in *in, struct lyjson_ctx **jsonctx);
@@ -87,7 +87,7 @@
  *
  * @param[in] jsonctx JSON context to check.
  * @param[in] index Index of the token, starting by 0 for the last token
- * @return LYJSON_ERROR in case of invalid index, other LYJSON_PARSER_STATUS corresponding to the token.
+ * @return ::LYJSON_ERROR in case of invalid index, other ::LYJSON_PARSER_STATUS corresponding to the token.
  */
 enum LYJSON_PARSER_STATUS lyjson_ctx_status(struct lyjson_ctx *jsonctx, uint32_t index);
 
@@ -100,7 +100,7 @@
 const char *lyjson_token2str(enum LYJSON_PARSER_STATUS status);
 
 /**
- * @brief Move to the next JSON artefact and update parser status.
+ * @brief Move to the next JSON artifact and update parser status.
  *
  * @param[in] jsonctx XML context to move.
  * @param[out] status Optional parameter to provide new parser status
diff --git a/src/parser_internal.h b/src/parser_internal.h
index 559d254..0428e26 100644
--- a/src/parser_internal.h
+++ b/src/parser_internal.h
@@ -23,7 +23,7 @@
 struct ly_in;
 
 /**
- * @brief Callback for lyd_ctx to free the structure
+ * @brief Callback for ::lyd_ctx to free the structure
  *
  * @param[in] ctx Data parser context to free.
  */
@@ -42,7 +42,7 @@
 /**
  * @brief Internal (common) context for YANG data parsers.
  *
- * Covers ::lyd_xml_ctx, ::lyd_json_ctx and lyd_lyb_ctx.
+ * Covers ::lyd_xml_ctx, ::lyd_json_ctx and ::lyd_lyb_ctx.
  */
 struct lyd_ctx {
     const struct lysc_ext_instance *ext; /**< extension instance possibly changing document root context of the data being parsed */
@@ -69,13 +69,13 @@
 };
 
 /**
- * @brief Common part of the lyd_ctx_free_t callbacks.
+ * @brief Common part to supplement the specific ::lyd_ctx_free_clb callbacks.
  */
 void lyd_ctx_free(struct lyd_ctx *);
 
 /**
  * @brief Parse submodule from YANG data.
- * @param[in,out] ctx Parser context.
+ * @param[in,out] context Parser context.
  * @param[in] ly_ctx Context of YANG schemas.
  * @param[in] main_ctx Parser context of main module.
  * @param[in] in Input structure.
@@ -87,7 +87,7 @@
 
 /**
  * @brief Parse module from YANG data.
- * @param[in] ctx Parser context.
+ * @param[in] context Parser context.
  * @param[in] in Input structure.
  * @param[in,out] mod Prepared module structure where the parsed information, including the parsed
  * module structure, will be filled in.
@@ -182,7 +182,7 @@
  * @brief Search all the parents for an operation node, check validity based on internal parser flags.
  *
  * @param[in] parent Parent to connect the parsed nodes to.
- * @param[in] int_opt Internal parser options.
+ * @param[in] int_opts Internal parser options.
  * @param[out] op Found operation, if any.
  * @return LY_ERR value.
  */
@@ -201,7 +201,17 @@
  * @brief Wrapper around ::lyd_create_term() for data parsers.
  *
  * @param[in] lydctx Data parser context.
- * @param[in] hints Data parser's hint for the value's type.
+ * @param[in] schema Schema node of the new data node.
+ * @param[in] value String value to be parsed.
+ * @param[in] value_len Length of @p value, must be set correctly.
+ * @param[in,out] dynamic Flag if @p value is dynamically allocated, is adjusted when @p value is consumed.
+ * @param[in] format Input format of @p value.
+ * @param[in] prefix_data Format-specific data for resolving any prefixes (see ::ly_resolve_prefix).
+ * @param[in] hints [Data parser's hints](@ref lydvalhints) for the value's type.
+ * @param[out] node Created node.
+ * @return LY_SUCCESS on success.
+ * @return LY_EINCOMPLETE in case data tree is needed to finish the validation.
+ * @return LY_ERR value if an error occurred.
  */
 LY_ERR lyd_parser_create_term(struct lyd_ctx *lydctx, const struct lysc_node *schema, const void *value, size_t value_len,
         ly_bool *dynamic, LY_VALUE_FORMAT format, void *prefix_data, uint32_t hints, struct lyd_node **node);
diff --git a/src/path.c b/src/path.c
index 69be7f9..6500b70 100644
--- a/src/path.c
+++ b/src/path.c
@@ -380,7 +380,8 @@
  *
  * @param[in] ctx libyang context.
  * @param[in] cur_node Optional current (original context) node.
- * @param[in] cur_mod Current module of the path (where the path is "instantiated"). Needed for ::LY_VALUE_SCHEMA*.
+ * @param[in] cur_mod Current module of the path (where the path is "instantiated"). Needed for ::LY_VALUE_SCHEMA
+ * and ::LY_VALUE_SCHEMA_RESOLVED.
  * @param[in] prev_ctx_node Previous context node. Needed for ::LY_VALUE_JSON.
  * @param[in] expr Parsed path.
  * @param[in] tok_idx Index in @p expr.
@@ -797,7 +798,7 @@
  *
  * @param[in] ctx libyang context.
  * @param[in] cur_mod Current module of the path (where it was "instantiated"), ignored of @p lref. Used for nodes
- * without a prefix for ::LY_PREF_SCHEMA* format.
+ * without a prefix for ::LY_VALUE_SCHEMA and ::LY_VALUE_SCHEMA_RESOLVED format.
  * @param[in] ctx_node Optional context node, mandatory of @p lref.
  * @param[in] ext Extension instance containing the definition of the data being created. It is used to find the top-level
  * node inside the extension instance instead of a module. Note that this is the case not only if the @p ctx_node is NULL,
diff --git a/src/path.h b/src/path.h
index 3061926..b98f366 100644
--- a/src/path.h
+++ b/src/path.h
@@ -146,7 +146,7 @@
  *
  * @param[in] ctx libyang context.
  * @param[in] cur_mod Current module of the path (where it was "instantiated"). Used for nodes in schema-nodeid
- * without a prefix for ::LY_PREF_SCHEMA* format.
+ * without a prefix for ::LY_VALUE_SCHEMA and ::LY_VALUE_SCHEMA_RESOLVED format.
  * @param[in] ctx_node Optional context node.
  * @param[in] ext Extension instance containing the definition of the data being created. It is used to find the top-level
  * node inside the extension instance instead of a module. Note that this is the case not only if the @p ctx_node is NULL,
@@ -189,7 +189,7 @@
  * @param[in] ctx libyang context.
  * @param[in] cur_node Optional current (original context) node.
  * @param[in] cur_mod Current module of the path (where it was "instantiated"). Used for nodes without a prefix
- * for ::LY_PREF_SCHEMA* format.
+ * for ::LY_VALUE_SCHEMA and ::LY_VALUE_SCHEMA_RESOLVED format.
  * @param[in] ctx_node Context node, node for which the predicate is defined.
  * @param[in] expr Parsed path.
  * @param[in,out] tok_idx Index in @p expr, is adjusted for parsed tokens.
diff --git a/src/plugins_internal.h b/src/plugins_internal.h
index dd10823..86da39d 100644
--- a/src/plugins_internal.h
+++ b/src/plugins_internal.h
@@ -68,7 +68,7 @@
  * only the plugins with NULL revision specified.
  * @param[in] name Name of the type/extension which the plugin implements.
  * @return NULL if the plugin matching the restrictions is not present.
- * @return Pointer to the matching ::ly_type_plugin or ::lyext_plugin according to the plugin's @p type.
+ * @return Pointer to the matching ::lyplg_ext or ::lyplg_type according to the plugin's @p type.
  */
 void *lyplg_find(enum LYPLG type, const char *module, const char *revision, const char *name);
 
diff --git a/src/schema_compile.h b/src/schema_compile.h
index 474cc22..cd41bf5 100644
--- a/src/schema_compile.h
+++ b/src/schema_compile.h
@@ -75,9 +75,9 @@
  * @brief Unres structure global for compilation.
  */
 struct lys_glob_unres {
-    struct ly_set dep_sets;     /**< set of dependency sets of modules, see ::ly_ctx_compile_deps_mod_r() */
+    struct ly_set dep_sets;     /**< set of dependency sets of modules, see ::lys_compile_dep_set_r() */
     struct ly_set implementing; /**< set of YANG schemas being atomically implemented (compiled); the first added
-                                    module is always the explcitly implemented module, the other ones are dependencies */
+                                    module is always the explicitly implemented module, the other ones are dependencies */
     struct ly_set creating;     /**< set of YANG schemas being atomically created (parsed); it is a subset of implemented
                                     and all these modules are freed if any error occurs */
     struct lys_depset_unres ds_unres;   /**< unres specific for the current dependency set */
@@ -101,6 +101,7 @@
  * @param[in] CTX libyang context of the dictionary.
  * @param[in] ORIG String to duplicate.
  * @param[out] DUP Where to store the result.
+ * @param[out] RET Where to store the return code.
  */
 #define DUP_STRING(CTX, ORIG, DUP, RET) if (ORIG) {RET = lydict_insert(CTX, ORIG, 0, &DUP);}
 #define DUP_STRING_RET(CTX, ORIG, DUP) if (ORIG) {LY_ERR __ret = lydict_insert(CTX, ORIG, 0, &DUP); LY_CHECK_RET(__ret);}
diff --git a/src/schema_compile_amend.h b/src/schema_compile_amend.h
index 5915268..9fe5c65 100644
--- a/src/schema_compile_amend.h
+++ b/src/schema_compile_amend.h
@@ -124,7 +124,7 @@
  * @param[in] pnode Parsed node to consider.
  * @param[in] parent First compiled parent of @p pnode.
  * @param[out] dev_pnode Copy of parsed node @p pnode with deviations and refines, if any. NULL if there are none.
- * @param[out] no_supported Whether a not-supported deviation is defined for the node.
+ * @param[out] not_supported Whether a not-supported deviation is defined for the node.
  * @return LY_ERR value.
  */
 LY_ERR lys_compile_node_deviations_refines(struct lysc_ctx *ctx, const struct lysp_node *pnode,
diff --git a/src/schema_compile_node.h b/src/schema_compile_node.h
index 619099e..2114ae9 100644
--- a/src/schema_compile_node.h
+++ b/src/schema_compile_node.h
@@ -49,7 +49,7 @@
  *
  * @param[in] ctx Context.
  * @param[in] pattern Pattern to check.
- * @param[in,out] pcre2_code Compiled PCRE2 pattern. If NULL, the compiled information used to validate pattern are freed.
+ * @param[in,out] code Compiled PCRE2 pattern. If NULL, the compiled information used to validate pattern are freed.
  * @return LY_ERR value - LY_SUCCESS, LY_EMEM, LY_EVALID.
  */
 LY_ERR lys_compile_type_pattern_check(struct ly_ctx *ctx, const char *pattern, pcre2_code **code);
@@ -100,6 +100,7 @@
  * @param[in] ctx Compile context
  * @param[in] child_p Parsed choice children nodes.
  * @param[in] node Compiled choice node to compile and add children to.
+ * @param[in,out] child_set Optional set to add all the compiled nodes into (can be more in case of uses).
  * @return LY_ERR value - LY_SUCCESS or LY_EVALID.
  */
 LY_ERR lys_compile_node_choice_child(struct lysc_ctx *ctx, struct lysp_node *child_p, struct lysc_node *node,
diff --git a/src/schema_features.h b/src/schema_features.h
index d005458..2e4a085 100644
--- a/src/schema_features.h
+++ b/src/schema_features.h
@@ -47,9 +47,9 @@
 LY_ERR lys_set_features(struct lysp_module *pmod, const char **features);
 
 /**
- * @brief Compile if-features of features in the current module and all its submodules.
+ * @brief Compile if-features of features in the provided module and all its submodules.
  *
- * @param[in] ctx Compile context.
+ * @param[in] pmod Parsed module to process.
  * @return LY_ERR value.
  */
 LY_ERR lys_compile_feature_iffeatures(struct lysp_module *pmod);
diff --git a/src/tree_data_internal.h b/src/tree_data_internal.h
index 395f45a..8b960d7 100644
--- a/src/tree_data_internal.h
+++ b/src/tree_data_internal.h
@@ -268,7 +268,7 @@
  */
 LY_ERR lyd_create_meta(struct lyd_node *parent, struct lyd_meta **meta, const struct lys_module *mod, const char *name,
         size_t name_len, const char *value, size_t value_len, ly_bool *dynamic, LY_VALUE_FORMAT format,
-        void *prefix_data, uint32_t hints, ly_bool clear_dlft, ly_bool *incomplete);
+        void *prefix_data, uint32_t hints, ly_bool clear_dflt, ly_bool *incomplete);
 
 /**
  * @brief Insert an attribute (last) into a parent
diff --git a/src/tree_schema_internal.h b/src/tree_schema_internal.h
index e2d0f6b..e53626a 100644
--- a/src/tree_schema_internal.h
+++ b/src/tree_schema_internal.h
@@ -318,7 +318,7 @@
  *
  * @param[in] ctx libyang context.
  * @param[in] name Name of the module to load.
- * @param[in] revison Optional revision of the module to load. If NULL, the newest revision is loaded.
+ * @param[in] revision Optional revision of the module to load. If NULL, the newest revision is loaded.
  * @param[in,out] new_mods Set of all the new mods added to the context. Includes this module and all of its imports.
  * @param[out] mod Created module structure.
  * @return LY_SUCCESS on success.
@@ -670,12 +670,18 @@
 /**
  * @brief Free the parsed extension instance structure.
  * @param[in] ctx libyang context where the string data resides in a dictionary.
- * @param[in] type Parsed extension instance structure to free. Note that the instance itself is not freed.
+ * @param[in] ext Parsed extension instance structure to free. Note that the instance itself is not freed.
  */
 void lysp_ext_instance_free(struct ly_ctx *ctx, struct lysp_ext_instance *ext);
 
 /**
+ * @brief Parse generic statement structure into a specific parsed-schema structure.
+ *
+ * @param[in] ctx The compilation context of the @p stmt being processed
+ * @param[in] stmt Generic statement structure to process.
+ * @param[out] result Specific parsed-schema structure for the given statement. For the specific type for the particular statement, check the function code.
  * @param[in,out] exts [sized array](@ref sizedarrays) For extension instances in case of statements that do not store extension instances in their own list.
+ * @return LY_ERR value.
  */
 LY_ERR lysp_stmt_parse(struct lysc_ctx *ctx, const struct lysp_stmt *stmt, void **result, struct lysp_ext_instance **exts);
 
@@ -828,15 +834,15 @@
 /**
  * @brief Get format-specific prefix for a module.
  *
- * For type plugins available as ::ly_type_print_get_prefix().
+ * This function is available for type plugins via ::lyplg_type_get_prefix() API function.
  *
  * @param[in] mod Module whose prefix to get.
  * @param[in] format Format of the prefix.
  * @param[in] prefix_data Format-specific data based on @p format:
  *      LY_VALUE_CANON           - NULL
- *      LY_VALUE_SCHEMA          - const struct lysp_module * (module used for resolving imports to prefixes)
- *      LY_VALUE_SCHEMA_RESOLVED - struct lyd_value_prefix * (sized array of pairs: prefix - module)
- *      LY_VALUE_XML             - struct ly_set * (set of all returned modules as ::struct lys_module)
+ *      LY_VALUE_SCHEMA          - const struct ::lysp_module* (module used for resolving imports to prefixes)
+ *      LY_VALUE_SCHEMA_RESOLVED - struct ::lysc_prefix* (sized array of pairs: prefix - module)
+ *      LY_VALUE_XML             - struct ::ly_set* (set of all returned modules as struct ::lys_module)
  *      LY_VALUE_JSON            - NULL
  *      LY_VALUE_LYB             - NULL
  * @return Module prefix to print.
@@ -847,8 +853,6 @@
 /**
  * @brief Resolve format-specific prefixes to modules.
  *
- * For type plugins available as ::ly_type_store_resolve_prefix().
- *
  * @param[in] ctx libyang context.
  * @param[in] prefix Prefix to resolve.
  * @param[in] prefix_len Length of @p prefix.
diff --git a/src/validation.h b/src/validation.h
index 4135447..4ecefb5 100644
--- a/src/validation.h
+++ b/src/validation.h
@@ -88,7 +88,7 @@
  * @param[in] val_opts Validation options, see @ref datavalidationoptions.
  * @param[in] validate_subtree Whether subtree was already validated (as part of data parsing) or not (separate validation).
  * @param[in] node_when_p Set of nodes with when conditions, if NULL a local set is used.
- * @param[in] node_exts Set with nodes with extension instances with validation plugin callback, if NULL a local set is used.
+ * @param[in] node_exts_p Set with nodes with extension instances with validation plugin callback, if NULL a local set is used.
  * @param[in] node_types_p Set of unres node types, if NULL a local set is used.
  * @param[in] meta_types_p Set of unres metadata types, if NULL a local set is used.
  * @param[out] diff Generated validation diff, not generated if NULL.
diff --git a/src/xml.h b/src/xml.h
index 4f27119..edf9512 100644
--- a/src/xml.h
+++ b/src/xml.h
@@ -136,10 +136,8 @@
  * @brief Get a namespace record for the given prefix in the current context.
  *
  * @param[in] ns_set Set with namespaces from the XML context.
- * @param[in] prefix Pointer to the namespace prefix as taken from ::lyxml_get_attribute() or ::lyxml_get_element().
- * Can be NULL for default namespace.
- * @param[in] prefix_len Length of the prefix string (since it is not NULL-terminated when returned from ::lyxml_get_attribute() or
- * ::lyxml_get_element()).
+ * @param[in] prefix Pointer to the namespace prefix. Can be NULL for default namespace.
+ * @param[in] prefix_len Length of the prefix string (since it might not be NULL-terminated).
  * @return The namespace record or NULL if the record for the specified prefix not found.
  */
 const struct lyxml_ns *lyxml_ns_get(const struct ly_set *ns_set, const char *prefix, size_t prefix_len);
diff --git a/src/xpath.h b/src/xpath.h
index 1ef3dfc..eb66736 100644
--- a/src/xpath.h
+++ b/src/xpath.h
@@ -26,11 +26,15 @@
 struct ly_ctx;
 struct lyd_node;
 
-/*
+/**
+ * @internal
+ * @page internals
+ * @section internalsXpath XPath Implementation
+ *
  * XPath evaluator fully compliant with http://www.w3.org/TR/1999/REC-xpath-19991116/
  * except the following restrictions in the grammar.
  *
- * PARSED GRAMMAR
+ * @subsection internalsXpathGrammar Parsed Grammar
  *
  * Full axes are not supported, abbreviated forms must be used,
  * variables are not supported, "id()" function is not supported,
@@ -39,7 +43,7 @@
  * constants are tokens.
  *
  * Modified full grammar:
- *
+ * @code
  * [1] Expr ::= OrExpr // just an alias
  *
  * [2] LocationPath ::= RelativeLocationPath | AbsoluteLocationPath
@@ -73,6 +77,7 @@
  *                     | MultiplicativeExpr 'mod' UnaryExpr
  * [19] UnaryExpr ::= UnionExpr | '-' UnaryExpr
  * [20] UnionExpr ::= PathExpr | UnionExpr '|' PathExpr
+ * @endcode
  */
 
 /* expression tokens allocation */