From 52143d10580075ede0aef75380acb2d8695ddd09 Mon Sep 17 00:00:00 2001 From: Michal Vasko Date: Wed, 14 Apr 2021 15:36:39 +0200 Subject: [PATCH] xpath CHANGE forbid non-prefix node names in XML It is not specified generally but works this way for instance-identifiers so use the same rules. --- src/xpath.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/xpath.c b/src/xpath.c index c5898b779..01de7c2a5 100644 --- a/src/xpath.c +++ b/src/xpath.c @@ -5328,8 +5328,9 @@ moveto_resolve_model(const char **qname, uint16_t *qname_len, const struct lyxp_ } break; case LY_PREF_XML: - /* not defined */ - LOGINT_RET(set->ctx); + /* all nodes need to be prefixed */ + LOGVAL(set->ctx, LYVE_DATA, "Non-prefixed node \"%.*s\" in XML xpath found.", *qname_len, *qname); + return LY_EVALID; } }