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 <wiv...@brocade.com> 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
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod
>
>
_______________________________________________
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to