Since 6.1 RESTCONF PUTs have added clixon-lib namespace for attributes.

These empty namespaces are removed.
This commit is contained in:
Olof hagsand 2023-03-27 12:57:24 +02:00
parent da2edceb7e
commit 2c104daee2
4 changed files with 21 additions and 4 deletions

View file

@ -653,6 +653,7 @@ text_modify(clicon_handle h,
if (strcmp(restype, "enumeration") == 0 ||
strcmp(restype, "bits") == 0)
x1bstr = clixon_trim2(x1bstr, " \t\n");
#if 0 /* Passes regression test without, keep for some time until other test requires it */
/* If origin body has namespace definitions, copy them. The reason is that
* some bodies rely on namespace prefixes, such as NACM path, but there is
* no way we can know this here.
@ -663,6 +664,7 @@ text_modify(clicon_handle h,
*/
if (assign_namespace_body(x1, x0) < 0)
goto done;
#endif
}
/* XXX here x1bstr is checked for null, while adding an empty string above */
if ((x0b = xml_body_get(x0)) == NULL && x1bstr && strlen(x1bstr)){