mbj4668 / pyang

An extensible YANG validator and converter in python
ISC License
528 stars 342 forks source link

How to differentiate between local referenced 'uses' statements and foreign referenced one #906

Open noviceAnkit opened 1 month ago

noviceAnkit commented 1 month ago

a.yang

module a { import b {prefix b} container x { leaf y { } uses b:z-top; } }

b.yang

module b { leaf z{} }

I am working with a.yang(Generating xpath without expanding foreign 'uses' statement), how can I differentiate between the local referenced and foreign referenced 'uses' statement, like in above example, I don't want to keep xpath expanded from "uses b" because it is not locally defined and defined in some other yang file.