Hi, "Ivory, William" <[email protected]> wrote: > On 07/08/18 23:01, Acee Lindem (acee) wrote: > Is it possible to indicate that choice statement must be specified in a YANG > 1.1 “must” clause w/o specifying every case? Similarly, it is there a way > specify that a container cannot be empty in “must” clause? > Thanks, > Acee > > For the second, just check the container has children: > > must "<path_to_container>/*";
Note that if the container has an NP-container as a child, this expression will always return true (even if that NP-container is empty), since NP-containers exists in XPath evaluations (see 6.4.1 in RFC 7950). If there are no NP-containers the expression works -- except that it doesn't work if someone augments an NP-container into this container. /martin > > Regards, > > William > > _______________________________________________ > netmod mailing list > [email protected] > https://www.ietf.org/mailman/listinfo/netmod > _______________________________________________ netmod mailing list [email protected] https://www.ietf.org/mailman/listinfo/netmod
