[YANG] mandatory empty
Andy Bierman <ietf@andybierman.com> Mon, 04 February 2008 18:16 UTC
Return-Path: <yang-bounces@ietf.org>
X-Original-To: ietfarch-yang-archive@core3.amsl.com
Delivered-To: ietfarch-yang-archive@core3.amsl.com
Received: from localhost (localhost [127.0.0.1])
by core3.amsl.com (Postfix) with ESMTP id 92D7E3A6DB0;
Mon, 4 Feb 2008 10:16:14 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.369
X-Spam-Level:
X-Spam-Status: No, score=-2.369 tagged_above=-999 required=5 tests=[AWL=0.230,
BAYES_00=-2.599]
Received: from core3.amsl.com ([127.0.0.1])
by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id H8mZ675x+UCg; Mon, 4 Feb 2008 10:16:13 -0800 (PST)
Received: from core3.amsl.com (localhost [127.0.0.1])
by core3.amsl.com (Postfix) with ESMTP id C81FC3A6D33;
Mon, 4 Feb 2008 10:16:13 -0800 (PST)
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 700413A6D4B
for <yang@core3.amsl.com>; Mon, 4 Feb 2008 10:16:12 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
Received: from core3.amsl.com ([127.0.0.1])
by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id nSAGUZw0ASiO for <yang@core3.amsl.com>;
Mon, 4 Feb 2008 10:16:11 -0800 (PST)
Received: from smtp104.sbc.mail.mud.yahoo.com (smtp104.sbc.mail.mud.yahoo.com
[68.142.198.203])
by core3.amsl.com (Postfix) with SMTP id A167A3A6D33
for <yang@ietf.org>; Mon, 4 Feb 2008 10:16:11 -0800 (PST)
Received: (qmail 96394 invoked from network); 4 Feb 2008 18:17:45 -0000
Received: from unknown (HELO ?192.168.0.10?)
(andybierman@att.net@67.122.136.212 with plain)
by smtp104.sbc.mail.mud.yahoo.com with SMTP; 4 Feb 2008 18:17:45 -0000
X-YMail-OSG: K0EGf1UVM1nisNe_DGBaCubCE1UOsWXgs_wdTOmg.gxn4fo_
X-Yahoo-Newman-Property: ymail-3
Message-ID: <47A756C9.8000401@andybierman.com>
Date: Mon, 04 Feb 2008 10:17:45 -0800
From: Andy Bierman <ietf@andybierman.com>
User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
MIME-Version: 1.0
To: yang <yang@ietf.org>
Subject: [YANG] mandatory empty
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: <http://www.ietf.org/mailman/listinfo/yang>,
<mailto:yang-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/pipermail/yang>
List-Post: <mailto:yang@ietf.org>
List-Help: <mailto:yang-request@ietf.org?subject=help>
List-Subscribe: <http://www.ietf.org/mailman/listinfo/yang>,
<mailto:yang-request@ietf.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: yang-bounces@ietf.org
Errors-To: yang-bounces@ietf.org
Hi,
What does this mean exactly?
leaf foo {
type empty;
mandatory true;
}
Does this translate to:
<element name='foo' minOccurs='0'/>
The empty data type can be modeled in XSD as an empty complexType:
<complexType name='empty'/>
Can it be modeled as a simpleType?
<simpleType name='empty'>
<restriction base='xs:string'>
<maxLength value='0'/>
</restriction>
</simpleType>
If mandatory means that the manager must supply a value,
then the leaf 'foo' can never be missing.
Even if it means the agent must supply a value,
it still seems strange. Perhaps more text is needed
about the empty data type.
IMO, 'mandatory' and 'units' are not applicable to built-in type 'empty'.
Andy
_______________________________________________
YANG mailing list
YANG@ietf.org
http://www.ietf.org/mailman/listinfo/yang
- [YANG] mandatory empty Andy Bierman
- Re: [YANG] mandatory empty Martin Bjorklund
- Re: [YANG] mandatory empty Phil Shafer