Re: analysis of YANG vs. RELAX NG

Ladislav Lhotka <lhotka@cesnet.cz> Mon, 03 December 2007 13:56 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 1IzBmZ-00056H-H5; Mon, 03 Dec 2007 08:56:23 -0500
Received: from discuss by megatron.ietf.org with local (Exim 4.43) id 1IzBmY-000566-Kc for discuss-confirm+ok@megatron.ietf.org; Mon, 03 Dec 2007 08:56:22 -0500
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1IzBmY-00055o-7Q for discuss@apps.ietf.org; Mon, 03 Dec 2007 08:56:22 -0500
Received: from office2.cesnet.cz ([195.113.144.244]) by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1IzBmW-0004Cx-Kp for discuss@apps.ietf.org; Mon, 03 Dec 2007 08:56:22 -0500
Received: from [198.18.175.153] (unknown [207.236.117.226]) by office2.cesnet.cz (Postfix) with ESMTP id 2CA8CD800C7 for <discuss@apps.ietf.org>; Mon, 3 Dec 2007 14:56:13 +0100 (CET)
Subject: Re: analysis of YANG vs. RELAX NG
From: Ladislav Lhotka <lhotka@cesnet.cz>
To: discuss@apps.ietf.org
In-Reply-To: <517bf110712021242v43c462f0v86267f591e5cdfbd@mail.gmail.com>
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>
Content-Type: text/plain; charset=utf-8
Organization: CESNET
Date: Mon, 03 Dec 2007 14:56:02 +0100
Message-Id: <1196690162.5874.13.camel@missotis>
Mime-Version: 1.0
X-Mailer: Evolution 2.12.1
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Scan-Signature: ffa9dfbbe7cc58b3fa6b8ae3e57b0aa3
X-BeenThere: discuss@apps.ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
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

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.

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?

Lada

-- 
Ladislav Lhotka, CESNET
PGP Key ID: E74E8C0C