xmlns sanity check
This commit is contained in:
parent
849e46191e
commit
0ad6703663
4 changed files with 23 additions and 8 deletions
|
|
@ -80,6 +80,9 @@ typedef int (xml_applyfn_t)(cxobj *x, void *arg);
|
|||
#define XML_FLAG_CHANGE 0x08 /* Node is changed (commits) or child changed rec */
|
||||
#define XML_FLAG_NONE 0x10 /* Node is added as NONE */
|
||||
|
||||
/* Full xmlns validation check is made only if XML has associated YANG spec */
|
||||
#define XMLNS_YANG_ONLY 1
|
||||
|
||||
/* Sort and binary search of XML children
|
||||
* Experimental
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -253,9 +253,12 @@ xml_namespace_check(cxobj *xn,
|
|||
return 0;
|
||||
xn = xp;
|
||||
}
|
||||
#ifdef XMLNS_YANG_ONLY
|
||||
if (ys == NULL)
|
||||
return 0; /* If no yang spec */
|
||||
else{
|
||||
else
|
||||
#endif
|
||||
{
|
||||
/* Check if my namespace */
|
||||
if ((n = yang_find_myprefix(ys)) != NULL && strcmp(nsn,n)==0)
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue