[YANG] Leaf node ambiguity in container elements

Alex Dickinson <alexd@redback.com> Fri, 24 April 2009 21:33 UTC

Return-Path: <prvs=alexd=358002e3c@redback.com>
X-Original-To: yang@core3.amsl.com
Delivered-To: yang@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 71F943A737B for <yang@core3.amsl.com>; Fri, 24 Apr 2009 14:33:00 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3+1khQCj070u for <yang@core3.amsl.com>; Fri, 24 Apr 2009 14:32:59 -0700 (PDT)
Received: from mgate-2.redback.com (mgate-2.redback.com [209.82.119.199]) by core3.amsl.com (Postfix) with ESMTP id 8128028C78F for <yang@ietf.org>; Fri, 24 Apr 2009 14:32:37 -0700 (PDT)
X-IronPort-AV: E=Sophos;i="4.40,243,1239001200"; d="scan'208";a="15756"
Received: from unknown (HELO mailhost.van.redback.com) ([155.53.172.64]) by mgate-2.redback.com with ESMTP; 24 Apr 2009 14:33:56 -0700
Received: from [127.0.0.1] (unknown [155.53.189.235]) by mailhost.van.redback.com (Postfix) with ESMTP id CD2F058C20 for <yang@ietf.org>; Fri, 24 Apr 2009 14:33:55 -0700 (PDT)
Message-ID: <49F23043.80803@redback.com>
Date: Fri, 24 Apr 2009 14:33:55 -0700
From: Alex Dickinson <alexd@redback.com>
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
To: yang@ietf.org
X-Enigmail-Version: 0.95.7
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
Subject: [YANG] Leaf node ambiguity in container elements
X-BeenThere: yang@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: YANG modeling Language for NETCONF <yang.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/yang>, <mailto:yang-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/yang>
List-Post: <mailto:yang@ietf.org>
List-Help: <mailto:yang-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/yang>, <mailto:yang-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 24 Apr 2009 21:35:54 -0000

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