xpath BUGFIX pass xcontext explicitly
diff --git a/src/schema_compile.c b/src/schema_compile.c
index f7ce1f8..c35aaca 100644
--- a/src/schema_compile.c
+++ b/src/schema_compile.c
@@ -798,8 +798,8 @@
LOG_LOCSET(node, NULL, NULL, NULL);
LY_ARRAY_FOR(node->when, u) {
when = node->when[u];
- ret = lyxp_atomize(when->cond, node->module, LY_PREF_SCHEMA_RESOLVED, when->prefixes, when->context,
- &tmp_set, LYXP_SCNODE_SCHEMA);
+ ret = lyxp_atomize(set->ctx, when->cond, node->module, LY_PREF_SCHEMA_RESOLVED, when->prefixes,
+ when->context, &tmp_set, LYXP_SCNODE_SCHEMA);
if (ret != LY_SUCCESS) {
LOGVAL(set->ctx, LYVE_SEMANTICS, "Invalid when condition \"%s\".", when->cond->expr);
goto cleanup;
@@ -997,8 +997,8 @@
}
/* check "when" */
- ret = lyxp_atomize(when[u]->cond, node->module, LY_PREF_SCHEMA_RESOLVED, when[u]->prefixes, when[u]->context,
- &tmp_set, opts);
+ ret = lyxp_atomize(ctx->ctx, when[u]->cond, node->module, LY_PREF_SCHEMA_RESOLVED, when[u]->prefixes,
+ when[u]->context, &tmp_set, opts);
if (ret) {
LOGVAL(ctx->ctx, LYVE_SEMANTICS, "Invalid when condition \"%s\".", when[u]->cond->expr);
goto cleanup;
@@ -1047,7 +1047,8 @@
}
/* check "must" */
- ret = lyxp_atomize(musts[u].cond, node->module, LY_PREF_SCHEMA_RESOLVED, musts[u].prefixes, node, &tmp_set, opts);
+ ret = lyxp_atomize(ctx->ctx, musts[u].cond, node->module, LY_PREF_SCHEMA_RESOLVED, musts[u].prefixes, node,
+ &tmp_set, opts);
if (ret) {
LOGVAL(ctx->ctx, LYVE_SEMANTICS, "Invalid must restriction \"%s\".", musts[u].cond->expr);
goto cleanup;