xml FEATURE support for special xml attr prefix
Which is interpreted as part of the name, not
as a prefix.
Refs cesnet/libnetconf2#318
diff --git a/src/tree_data.c b/src/tree_data.c
index a2c3ef3..29d2112 100644
--- a/src/tree_data.c
+++ b/src/tree_data.c
@@ -1417,6 +1417,14 @@
return LY_EVALID;
}
+ if ((pref_len == 3) && !strncmp(prefix, "xml", 3)) {
+ /* not a prefix but special name */
+ name = prefix;
+ name_len += 1 + pref_len;
+ prefix = NULL;
+ pref_len = 0;
+ }
+
/* get the module */
if (module_name) {
mod_len = strlen(module_name);
@@ -1459,6 +1467,14 @@
return LY_EVALID;
}
+ if ((pref_len == 3) && !strncmp(prefix, "xml", 3)) {
+ /* not a prefix but special name */
+ name = prefix;
+ name_len += 1 + pref_len;
+ prefix = NULL;
+ pref_len = 0;
+ }
+
/* set value if none */
if (!value) {
value = "";