module bar { namespace bar; prefix bar-mod; import baz { prefix baz-imp; } typedef bar-leafref { type baz-imp:my-leafref; description "bar-leafref"; } typedef bar-base-leafref { type leafref { path "/baz-imp:root/baz-imp:target"; } } leaf my-leafref-in-bar { type bar-base-leafref; } leaf my-leafref-in-bar-2 { type bar-base-leafref; description "bar-base-leafref-2"; } leaf bar-target { type string; } }