[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[YANG] Leaf node ambiguity in container elements



Hello,

Suppose I define the following container:

container aaa {

  leaf bar {
    description: "Some configuration parameter"
    mandatory: false;
    type: string;
  }

  leaf bar {
    description:
      "Some other configuration parameter, but distinct from
       the first"
    mandatory: false;
    type: int;
  }
}


Now given the following XML instance document:

<aaa>
  <bar>123</bar>
</aaa>

It is ambiguous as to which bar leaf node definition that the <bar>
element represents.

Are there any constraints present in the YANG spec that prevents the
initial container from being formed?

Cheers,
Alex Dickinson