* Strict XML Prefixed namespace check

* Yang augment created multiple augmented children (no side-effect)
* XML prefixed attribute names were not copied into the datastore
This commit is contained in:
Olof hagsand 2019-03-04 19:15:23 +01:00
parent b182e8666f
commit 4b17af0278
9 changed files with 208 additions and 90 deletions

View file

@ -362,19 +362,12 @@ xml_localname_check(cxobj *xn,
return 0;
xn = xp;
}
#ifdef XMLNS_YANG_ONLY
if (ys == NULL)
return 0; /* If no yang spec */
else
#endif
{
/* Check if my namespace */
if ((n = yang_find_myprefix(ys)) != NULL && strcmp(nsn,n)==0)
return 0;
/* Check if any imported module */
if (yang_find_module_by_prefix(ys, nsn) != NULL)
return 0;
}
/* Check if my namespace */
if ((n = yang_find_myprefix(ys)) != NULL && strcmp(nsn,n)==0)
return 0;
/* Check if any imported module */
if (yang_find_module_by_prefix(ys, nsn) != NULL)
return 0;
/* Not found, error */
clicon_err(OE_XML, ENOENT, "Namespace name %s in %s:%s not found",
nsn, nsn, xml_name(xn));