Re: [netmod] Use XML namespaces in YANG document examples

Carsten Bormann <cabo@tzi.org> Thu, 03 February 2022 17:48 UTC

Return-Path: <cabo@tzi.org>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 73CDC3A1218; Thu, 3 Feb 2022 09:48:51 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tGm1cl2E0UgX; Thu, 3 Feb 2022 09:48:46 -0800 (PST)
Received: from gabriel-smtp.zfn.uni-bremen.de (gabriel-smtp.zfn.uni-bremen.de [IPv6:2001:638:708:32::15]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D68723A121E; Thu, 3 Feb 2022 09:48:43 -0800 (PST)
Received: from smtpclient.apple (p5089ad4f.dip0.t-ipconnect.de [80.137.173.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gabriel-smtp.zfn.uni-bremen.de (Postfix) with ESMTPSA id 4JqR3p4HJlzDCdP; Thu, 3 Feb 2022 18:48:38 +0100 (CET)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.40.0.1.81\))
From: Carsten Bormann <cabo@tzi.org>
In-Reply-To: <C2FC4904-F0BA-4992-9F50-090313CCD528@gmail.com>
Date: Thu, 03 Feb 2022 18:48:37 +0100
Cc: Tim Bray <tbray@textuality.com>, "dhc-chairs@ietf.org" <dhc-chairs@ietf.org>, "Eric Vyncke (evyncke)" <evyncke@cisco.com>, "netmod@ietf.org" <netmod@ietf.org>, "drafts-expert-review@iana.org" <drafts-expert-review@iana.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <75DE84FE-D4A0-42D3-9AE0-73BA68C0CF1F@tzi.org>
References: <B6F5C201-A42B-47AB-9518-886C97EBA931@gmx.com> <AM7PR07MB624865498F51F41EFD26D723A0289@AM7PR07MB6248.eurprd07.prod.outlook.com> <CABCOCHSM0MdXwY5AKkSXvvxDqf_CDX6SamZtMJotrn4R8FQ7Bw@mail.gmail.com> <CAHBU6iucqMiyVdZncfTHdO=y7dqz=4i0UTqMRa+BBSp=1sTpSw@mail.gmail.com> <C2FC4904-F0BA-4992-9F50-090313CCD528@gmail.com>
To: Mahesh Jethanandani <mjethanandani@gmail.com>
X-Mailer: Apple Mail (2.3693.40.0.1.81)
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/Yzp9Yf3bjg0iIavAW1RZuxiez_g>
Subject: Re: [netmod] Use XML namespaces in YANG document examples
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 03 Feb 2022 17:48:52 -0000

On 3. Feb 2022, at 18:43, Mahesh Jethanandani <mjethanandani@gmail.com> wrote:
> 
>> [mj] That is correct. We have been beaten up enough number of times for not using the prefix defined by the YANG module. Is the suggestion to state that in the draft?


RFC 7950, Section 7.1.4:

   When used inside the "import" statement, the "prefix" statement
   defines the prefix to be used when accessing definitions inside the
   imported module.  When a reference to an identifier from the imported
   module is used, the prefix string for the imported module followed by
   a colon (":") and the identifier is used, e.g., "if:ifIndex".  To
   improve readability of YANG modules, the prefix defined by a module
   SHOULD be used when the module is imported, unless there is a
   conflict.  If there is a conflict, i.e., two different modules that
   both have defined the same prefix are imported, at least one of them
   MUST be imported with a different prefix.

Is there a reason to violate the SHOULD?

Grüße, Carsten