Re: analysis of YANG vs. RELAX NG

Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de> Mon, 03 December 2007 14:09 UTC

Return-path: <discuss-bounces@apps.ietf.org>
Received: from [127.0.0.1] (helo=stiedprmman1.va.neustar.com) by megatron.ietf.org with esmtp (Exim 4.43) id 1IzByn-0004kY-Hw; Mon, 03 Dec 2007 09:09:01 -0500
Received: from discuss by megatron.ietf.org with local (Exim 4.43) id 1IzByl-0004k0-OG for discuss-confirm+ok@megatron.ietf.org; Mon, 03 Dec 2007 09:08:59 -0500
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1IzByl-0004js-Ej for discuss@apps.ietf.org; Mon, 03 Dec 2007 09:08:59 -0500
Received: from hermes.jacobs-university.de ([212.201.44.23]) by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1IzByi-0005Hs-W7 for discuss@apps.ietf.org; Mon, 03 Dec 2007 09:08:59 -0500
Received: from localhost (demetrius.jacobs-university.de [212.201.44.32]) by hermes.jacobs-university.de (Postfix) with ESMTP id A33B686267; Mon, 3 Dec 2007 15:08:55 +0100 (CET)
Received: from hermes.jacobs-university.de ([212.201.44.23]) by localhost (demetrius.jacobs-university.de [212.201.44.32]) (amavisd-new, port 10024) with ESMTP id 04989-05-6; Mon, 3 Dec 2007 15:08:50 +0100 (CET)
Received: from elstar.local (elstar.iuhb02.iu-bremen.de [10.50.231.133]) by hermes.jacobs-university.de (Postfix) with ESMTP id E152B8A2D9; Mon, 3 Dec 2007 15:08:46 +0100 (CET)
Received: by elstar.local (Postfix, from userid 501) id DD4B340671A; Mon, 3 Dec 2007 15:08:46 +0100 (CET)
Date: Mon, 3 Dec 2007 15:08:46 +0100
From: Juergen Schoenwaelder <j.schoenwaelder@jacobs-university.de>
To: Ladislav Lhotka <lhotka@cesnet.cz>
Subject: Re: analysis of YANG vs. RELAX NG
Message-ID: <20071203140846.GB17536@elstar.local>
References: <953beacc0711271504y7aea5f21jc301ccad886d3611@mail.gmail.com> <474D9194.3060103@ericsson.com> <953beacc0711281025w4d993dd7u77d729111074496c@mail.gmail.com> <20071128.230244.254578150.mbj@tail-f.com> <63F8A418-6AF0-4205-ACC7-53A8C7BC6A73@osafoundation.org> <47512728.6040201@gmx.de> <517bf110712021242v43c462f0v86267f591e5cdfbd@mail.gmail.com> <1196690162.5874.13.camel@missotis>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <1196690162.5874.13.camel@missotis>
User-Agent: Mutt/1.5.17 (2007-11-01)
X-Virus-Scanned: amavisd-new 2.3.3 (20050822) at jacobs-university.de
X-Spam-Score: 0.0 (/)
X-Scan-Signature: 97adf591118a232206bdb5a27b217034
Cc: discuss@apps.ietf.org
X-BeenThere: discuss@apps.ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: j.schoenwaelder@jacobs-university.de
List-Id: general discussion of application-layer protocols <discuss.apps.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/discuss>, <mailto:discuss-request@apps.ietf.org?subject=unsubscribe>
List-Post: <mailto:discuss@apps.ietf.org>
List-Help: <mailto:discuss-request@apps.ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/discuss>, <mailto:discuss-request@apps.ietf.org?subject=subscribe>
Errors-To: discuss-bounces@apps.ietf.org

On Mon, Dec 03, 2007 at 02:56:02PM +0100, Ladislav Lhotka wrote:
> Tim Bray p????e v Ne 02. 12. 2007 v 12:42 -0800:
> > I've been staying off this thread because I don't understand what a
> > NETCONF is or what you'd do with one.  But Julian's point is massively
> > important.  If you're going to design your own modeling language, you
> > need to spend a *lot* of time thinking about the extensibility model.
> > It's really easy to get wrong.  -Tim
> 
> Indeed. An extensibility problem in YANG is IMO the leaf statement. It
> is encoded as an XML element but the fact that it is declared as leaf
> effectively makes it into an XML attribute: It is impossible to extend
> it (e.g., add a qualifying subelement) without changing the leaf into
> container. In a RELAX NG schema, if properly designed, such an extension
> wouldn't have to touch the parent schema.

Leafs carry data and we strongly dislike mixed contents in NETCONF. So
this is actually a YANG feature and not a bug.
 
> Another problem might be the default statement in leaves (or it is
> proper to say leafs here?:-) or typedefs. What if a standard data model
> defines an item, say a hello timer, with such a default, but an
> implementation wants to use another value for the default? Should it
> come up with another schema?

No. There can only be one standard default. If you are thinking about
reusable groupings, then defaults can actually be changed wherever you
apply a grouping as far as I know.

/js

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1, 28759 Bremen, Germany
Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>