I understand that the "when" statement in a Yang model takes an XPATH expression as its argument.
What is the correct YANG XPATH syntax to combine multiple expressions in order to model a type/value data container as follows ?
container c1 {
leaf attrib-type {
type uint32;
}
leaf attrib-val-int {
when "../attrib-type = 1 or ../attrib-type = 2"
type uint32;
}
leaf attrib-val-string {
when "../attrib-type = 5 or ../attrib-type = 6"
type string;
}
}