Subject: [YANG] Leaf node ambiguity in container elements

From: Alex Dickinson <[email-masked]>
Date: Fri, 24 Apr 2009 14:33:55 -0700

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