Hi Andy, Thanks. So if we have a tightly controlled set of YANG files, and restrict usage to a specific use case where we have a set of nodes across multiple modules with the same name, we should be fine.
William From: Andy Bierman [mailto:[email protected]] Sent: 28 March 2016 20:51 To: William Ivory <[email protected]> Cc: [email protected] Subject: Re: [netmod] Query about usage of local-name() in YANG XPATH expressions Hi, This was raised as a concern by Lada (see netmod WG email arourd July 2014) The issue is that the expression breaks module containment and will match depending on what other YANG modules are known to the YANG compiler. Andy On Sat, Mar 26, 2016 at 3:08 AM, William Ivory <[email protected]<mailto:[email protected]>> wrote: Hi, From RFC 6087 (YANG Usage Guidelines), section 5.6.2, the following is noted about the use of the XPATH local-name() function: The 'local-name' function SHOULD NOT be used to reference local names outside of the YANG module defining the must or when expression containing the 'local-name' function. Example of a local-name function that should not be used: /*[local-name()='foo'] However, no explanation is given as to why this is a bad idea. We have a specific use case where local-name() would appear to allow us to massively simplify some rather cumbersome must expressions, but I wanted to check I’m not missing some ‘gotcha’ here. Is it simply that relying on a common node name across multiple modules is generally a bad design as it ties the modules together, or is there more to it? If so, then in our case this is a reasonable restriction. Thanks, William _______________________________________________ netmod mailing list [email protected]<mailto:[email protected]> https://www.ietf.org/mailman/listinfo/netmod<https://urldefense.proofpoint.com/v2/url?u=https-3A__www.ietf.org_mailman_listinfo_netmod&d=CwMFaQ&c=IL_XqQWOjubgfqINi2jTzg&r=GByLeg9jZvOv_AlgBo9uvdDrxizlOR7l_SnTXowyJU8&m=VZGB2NkaE9--68moPlgZM_ag1CgKvjJqSwwZ2iw1gio&s=7Ju95XbNKdlg4tPZG9ahSeMHUT_lqGFPtiZxcXevTxw&e=>
_______________________________________________ netmod mailing list [email protected] https://www.ietf.org/mailman/listinfo/netmod
