schema CHANGE unify naming of children nodes in schema nodes
Use `child` instead of data. The only exception is module where the data
stands for the complete tree.
diff --git a/src/parser_yin.c b/src/parser_yin.c
index 6eb8c9b..1329799 100644
--- a/src/parser_yin.c
+++ b/src/parser_yin.c
@@ -2235,21 +2235,21 @@
/* parse notification content */
LY_CHECK_RET(subelems_allocator(ctx, subelems_size = 16, (struct lysp_node *)notif, &subelems,
- LY_STMT_ANYDATA, ¬if->data, 0,
- LY_STMT_ANYXML, ¬if->data, 0,
- LY_STMT_CHOICE, ¬if->data, 0,
- LY_STMT_CONTAINER, ¬if->data, 0,
+ LY_STMT_ANYDATA, ¬if->child, 0,
+ LY_STMT_ANYXML, ¬if->child, 0,
+ LY_STMT_CHOICE, ¬if->child, 0,
+ LY_STMT_CONTAINER, ¬if->child, 0,
LY_STMT_DESCRIPTION, ¬if->dsc, YIN_SUBELEM_UNIQUE,
LY_STMT_GROUPING, ¬if->groupings, 0,
LY_STMT_IF_FEATURE, ¬if->iffeatures, 0,
- LY_STMT_LEAF, ¬if->data, 0,
- LY_STMT_LEAF_LIST, ¬if->data, 0,
- LY_STMT_LIST, ¬if->data, 0,
+ LY_STMT_LEAF, ¬if->child, 0,
+ LY_STMT_LEAF_LIST, ¬if->child, 0,
+ LY_STMT_LIST, ¬if->child, 0,
LY_STMT_MUST, ¬if->musts, YIN_SUBELEM_VER2,
LY_STMT_REFERENCE, ¬if->ref, YIN_SUBELEM_UNIQUE,
LY_STMT_STATUS, ¬if->flags, YIN_SUBELEM_UNIQUE,
LY_STMT_TYPEDEF, ¬if->typedefs, 0,
- LY_STMT_USES, ¬if->data, 0,
+ LY_STMT_USES, ¬if->child, 0,
LY_STMT_EXTENSION_INSTANCE, NULL, 0));
ret = yin_parse_content(ctx, subelems, subelems_size, LY_STMT_NOTIFICATION, NULL, ¬if->exts);
@@ -2288,20 +2288,20 @@
/* parse grouping content */
LY_CHECK_RET(subelems_allocator(ctx, subelems_size = 16, &grp->node, &subelems,
LY_STMT_ACTION, &grp->actions, 0,
- LY_STMT_ANYDATA, &grp->data, 0,
- LY_STMT_ANYXML, &grp->data, 0,
- LY_STMT_CHOICE, &grp->data, 0,
- LY_STMT_CONTAINER, &grp->data, 0,
+ LY_STMT_ANYDATA, &grp->child, 0,
+ LY_STMT_ANYXML, &grp->child, 0,
+ LY_STMT_CHOICE, &grp->child, 0,
+ LY_STMT_CONTAINER, &grp->child, 0,
LY_STMT_DESCRIPTION, &grp->dsc, YIN_SUBELEM_UNIQUE,
LY_STMT_GROUPING, &grp->groupings, 0,
- LY_STMT_LEAF, &grp->data, 0,
- LY_STMT_LEAF_LIST, &grp->data, 0,
- LY_STMT_LIST, &grp->data, 0,
+ LY_STMT_LEAF, &grp->child, 0,
+ LY_STMT_LEAF_LIST, &grp->child, 0,
+ LY_STMT_LIST, &grp->child, 0,
LY_STMT_NOTIFICATION, &grp->notifs, 0,
LY_STMT_REFERENCE, &grp->ref, YIN_SUBELEM_UNIQUE,
LY_STMT_STATUS, &grp->flags, YIN_SUBELEM_UNIQUE,
LY_STMT_TYPEDEF, &grp->typedefs, 0,
- LY_STMT_USES, &grp->data, 0,
+ LY_STMT_USES, &grp->child, 0,
LY_STMT_EXTENSION_INSTANCE, NULL, 0));
ret = yin_parse_content(ctx, subelems, subelems_size, LY_STMT_GROUPING, NULL, &grp->exts);
subelems_deallocator(subelems_size, subelems);
@@ -2487,23 +2487,23 @@
/* parser input/output content */
LY_CHECK_RET(subelems_allocator(ctx, subelems_size = 12, (struct lysp_node *)inout_meta->inout_p, &subelems,
- LY_STMT_ANYDATA, &inout_meta->inout_p->data, YIN_SUBELEM_VER2,
- LY_STMT_ANYXML, &inout_meta->inout_p->data, 0,
- LY_STMT_CHOICE, &inout_meta->inout_p->data, 0,
- LY_STMT_CONTAINER, &inout_meta->inout_p->data, 0,
+ LY_STMT_ANYDATA, &inout_meta->inout_p->child, YIN_SUBELEM_VER2,
+ LY_STMT_ANYXML, &inout_meta->inout_p->child, 0,
+ LY_STMT_CHOICE, &inout_meta->inout_p->child, 0,
+ LY_STMT_CONTAINER, &inout_meta->inout_p->child, 0,
LY_STMT_GROUPING, &inout_meta->inout_p->groupings, 0,
- LY_STMT_LEAF, &inout_meta->inout_p->data, 0,
- LY_STMT_LEAF_LIST, &inout_meta->inout_p->data, 0,
- LY_STMT_LIST, &inout_meta->inout_p->data, 0,
+ LY_STMT_LEAF, &inout_meta->inout_p->child, 0,
+ LY_STMT_LEAF_LIST, &inout_meta->inout_p->child, 0,
+ LY_STMT_LIST, &inout_meta->inout_p->child, 0,
LY_STMT_MUST, &inout_meta->inout_p->musts, YIN_SUBELEM_VER2,
LY_STMT_TYPEDEF, &inout_meta->inout_p->typedefs, 0,
- LY_STMT_USES, &inout_meta->inout_p->data, 0,
+ LY_STMT_USES, &inout_meta->inout_p->child, 0,
LY_STMT_EXTENSION_INSTANCE, NULL, 0));
ret = yin_parse_content(ctx, subelems, subelems_size, inout_kw, NULL, &inout_meta->inout_p->exts);
subelems_deallocator(subelems_size, subelems);
LY_CHECK_RET(ret);
- if (!inout_meta->inout_p->data) {
+ if (!inout_meta->inout_p->child) {
LOGVAL_PARSER((struct lys_parser_ctx *)ctx, LY_VCODE_MISSTMT, "data-def-stmt", ly_stmt2str(inout_kw));
return LY_EVALID;
}