Re: [netmod] Where can I use <CODE BEGINS> <CODE ENDS> ?

Balázs Lengyel <balazs.lengyel@ericsson.com> Thu, 26 March 2020 10:55 UTC

Return-Path: <balazs.lengyel@ericsson.com>
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 6CBF33A0E11 for <netmod@ietfa.amsl.com>; Thu, 26 Mar 2020 03:55:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.101
X-Spam-Level:
X-Spam-Status: No, score=-2.101 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=ericsson.com
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 tA2Kdb0ffIZG for <netmod@ietfa.amsl.com>; Thu, 26 Mar 2020 03:55:03 -0700 (PDT)
Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on062e.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0e::62e]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id F34B63A0E10 for <netmod@ietf.org>; Thu, 26 Mar 2020 03:55:02 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h0bNlvYrpM33XHlNCC8RpJN8LIPgUXsBu3B8xxF8U/ZZdxco8WTpgo/IuyNIK3jDDlplUwZQmY8vsPGFctx3D0+A0+ctIU0ow677y+ze5ROKjMvgwMeeYq/FoqwhbR0I766x5XsU6NmeSVBdj99+TeioZpuGqZ/6q+0cgAqJebndDvj1Dau7zKIxUtDakoEApei0egYpCz4Fk7MC6sMs1Gz5mKWPVTPznl0B4pVr32akFS03Lx87JeyTwxTEIs0rYfBbuKXuO7tzUxf3JfsE24n5ky9hjnXllDUBNJsCjovAzvbcIyk1+AYgaUGihFh92o/cRYUBDdyITppDXvsyLQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Qzu7sL7KtnXB35zisHGgd+3j2fc4HJ6Swwn5T080N1I=; b=kbqXQdU2DXyEIddb4vQ7l2QHyk1vmW7rlwT4W2ApJYzA9NKHVvaKuy8umdt88aKCFW/V76h+bQRo8NkmOuW38HIJlbByadZqZfSBF+/h72jC0vDLe4Nl+pBkeKUPfSEugw7lSROPgBWEbKgV8sw0Y/FtS6mQrskYaDd+5Gx01vOk/FZAZSf6C2IKcUNx0FRdtZXoZMGrlWLJAk7flPF9ub/2CdcmQcktxdhvQLT2OcdRuqdec9HRVDA9Z1tgZCfyazxtW4aBnw7dpz54je/ZDq2r8ffs6IRu5Vew+1/cAxlalL/cZhPftc+4qY+kmCVEbZc3Ud+GEBBVUoDUMb7jrQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ericsson.com; dmarc=pass action=none header.from=ericsson.com; dkim=pass header.d=ericsson.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Qzu7sL7KtnXB35zisHGgd+3j2fc4HJ6Swwn5T080N1I=; b=Dxh6qAxHag+A1fo/sEwxCY8EgPs0HyskyuUDCCKF6XMdBWIUjcTUDj6LjXO9xljEq3SMnxmgtlEWPly0fMLuBTUCFcpxIjuyygd+kfAjB8xSRQhnh/yb16Zt79IABct7whZ0a3pJVgekd/FwIsoEh+Qh0KnDH9bqjDnCFm2bEm8=
Received: from DB7PR07MB4011.eurprd07.prod.outlook.com (52.134.97.155) by DB7PR07MB4748.eurprd07.prod.outlook.com (52.135.137.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2856.15; Thu, 26 Mar 2020 10:55:00 +0000
Received: from DB7PR07MB4011.eurprd07.prod.outlook.com ([fe80::15cf:dc81:c6f4:aa0c]) by DB7PR07MB4011.eurprd07.prod.outlook.com ([fe80::15cf:dc81:c6f4:aa0c%7]) with mapi id 15.20.2856.019; Thu, 26 Mar 2020 10:55:00 +0000
From: Balázs Lengyel <balazs.lengyel@ericsson.com>
To: Kent Watsen <kent@watsen.net>, Balázs Lengyel <balazs.lengyel=40ericsson.com@dmarc.ietf.org>
CC: "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: [netmod] Where can I use <CODE BEGINS> <CODE ENDS> ?
Thread-Index: AdX/lKIsLy+ziTKqRA+fZO9j7aQG7ACWDxGAAAAySNAANyuOAAAjs38w
Date: Thu, 26 Mar 2020 10:54:59 +0000
Message-ID: <DB7PR07MB4011C7CA9D64CDBAAF90A511F0CF0@DB7PR07MB4011.eurprd07.prod.outlook.com>
References: <DB7PR07MB4011310A5327543D14FD9C19F0F20@DB7PR07MB4011.eurprd07.prod.outlook.com> <DA8180AD-7DDC-45DE-9733-A7AAFB6A2781@amsl.com> <DB7PR07MB40115DC070AD529CB9CFB69FF0F10@DB7PR07MB4011.eurprd07.prod.outlook.com> <0100017112b9fbb5-e808f29f-e38a-4ff4-bd61-ac93b02057a3-000000@email.amazonses.com>
In-Reply-To: <0100017112b9fbb5-e808f29f-e38a-4ff4-bd61-ac93b02057a3-000000@email.amazonses.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=balazs.lengyel@ericsson.com;
x-originating-ip: [80.98.254.17]
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 36add2c7-ade7-4565-13a2-08d7d1742152
x-ms-traffictypediagnostic: DB7PR07MB4748:
x-microsoft-antispam-prvs: <DB7PR07MB4748CC9158CBA13403D3582DF0CF0@DB7PR07MB4748.eurprd07.prod.outlook.com>
x-ms-oob-tlc-oobclassifiers: OLM:9508;
x-forefront-prvs: 0354B4BED2
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(136003)(366004)(39860400002)(346002)(376002)(396003)(8676002)(8936002)(66946007)(86362001)(85202003)(110136005)(81156014)(9686003)(85182001)(55016002)(66616009)(76116006)(33656002)(66476007)(81166006)(64756008)(66446008)(52536014)(6506007)(66556008)(7696005)(4326008)(53546011)(5660300002)(966005)(316002)(26005)(186003)(2906002)(71200400001)(66574012)(478600001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR07MB4748; H:DB7PR07MB4011.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords;
received-spf: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts)
x-ms-exchange-senderadcheck: 1
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: YLwIZjOdg6z9p5577SGmGVIdZPZecWPFmOuGW1wSuc1MoIqi3dJWL+Bk+xLSRodly67nrCfdm9zTwhsPLdsXfEuEicLkPrOXxysIsOZquYREXyJefkRbkDMZcC0iPZpcDr6n3hUyzA23LR+H0KU5Pv/dUUHFLQ4Nwh/C86V160BVhpCL++AGgkUFKGDmyUnraUxVzOpnVuM495FsBB5snc+EjSxT0I/KMx9+H9R1d+oEwsRg77LoY0g1P1vSAfIsI8gJZcTq+5qXWz/k90KQM8dURJoReSb8AWqjaCZVzXzCB5exd8+FekluL8ofY60ELD+6G3d+5Ht+f2MVI4aaK4cNMDwJQEkFl6CKW0dMP4j29NDUeMZxLd27onC8RzncA3jxDLjtmSI7/5uW4O6Hui0wgD6sB798SKua7IML4x1aRfa9Vfehmu5fpZIJRMasZ9TlCv3+7MA1d22OXUhX5jONfQ0x1dKCeszMsa4t0xtosXS4+IqL2URYYnZA49s0EZIs+Q3cFGJWp0glWaHvBQ==
x-ms-exchange-antispam-messagedata: VitoI8OcVhxelJd13ukc+YAkJ5YaZbJIMWYNXiH8JX5neq+bbUZvB2o4mIhjMaEIbba41P/YAxUTkQ7dAyAhaBAtyBE1QKasGeyYhE1qRAN6Ikt/9PoHClmAZe46dqOcxMALbc1sW/Cggj+espsaQg==
x-ms-exchange-transport-forked: True
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg="SHA1"; boundary="----=_NextPart_000_007A_01D60365.5F50A830"
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 36add2c7-ade7-4565-13a2-08d7d1742152
X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Mar 2020 10:55:00.0074 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: HFbcOHkD4mHDM0J4A0Es+4dC76q2F/iXu/H8LIiB699mXF04w67g80MR6YzD2DreLJvRoF9FVA7kalP5bnGKqU9n0LeQhlPrrtt5kSUc3Ig=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR07MB4748
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/nPO1tw7aPdR4-n4p3oJsH_N5ohM>
Subject: Re: [netmod] Where can I use <CODE BEGINS> <CODE ENDS> ?
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, 26 Mar 2020 10:55:17 -0000

Hello Kent,
OK, as you are strongly opposed to it, I will remove <CODE BEGINS> <CODE ENDS> in the next version.
That said, I do not really agree with you. If interested see, below.
Regards Balazs

-----Original Message-----
From: netmod <netmod-bounces@ietf.org> On Behalf Of Kent Watsen
Sent: 2020. március 25., szerda 18:25
To: Balázs Lengyel <balazs.lengyel=40ericsson.com@dmarc.ietf.org>
Cc: netmod@ietf.org
Subject: Re: [netmod] Where can I use <CODE BEGINS> <CODE ENDS> ?

Balazs,

While possible to use the markers for instance examples...

  - they’ve never been used before, AFIAK  (historical context)
BALAZS: S0 I am a revolutionary :-)  
As I understand validation of examples have always been an issue, so making that more simple by automating extraction would be a step in the good direction.
  - they're unneeded, as examples don’t contain copyright (per Lada’s comment)
BALAZS: I agree that copyright is a non-issue for these examples. However <CODE BEGINS> is needed for another reason: easy extraction, which would make checking the data simpler.
  - they're disallowed by RFC 8407 for example modules (per Benoit comment)
BALAZS: strictly speaking that is about YANG examples not instance data examples. I also don't know/understand the reasoning behind it. A separate example tag would be nice, but we don't have one.
  - as a contributor, I don’t wish to birth a new convention of using the markers for examples.  

In order to support programmatic extraction of examples from drafts, please just set the “name” attribute on the <sourcecode> or <artwork> element in the XML draft. 
BALAZS: As far as I understand sourcecode is only available in XML2RFC v3.  Name is not handled by rfcstrip or xym. (I don't have time to update the tools right now.) It would be nice to have an update to rfcstrip that checks every <artwork> and if it has a name attribute, it extracts the content into a file called "name".


2.48.2.  "name" Attribute

   A filename suitable for the contents (such as for extraction to a
   local file).  This attribute can be helpful for other kinds of tools
   (such as automated syntax checkers, which work by extracting the
   source code).  Note that the "name" attribute does not need to be
   unique for <artwork> elements in a document.  If multiple
   <sourcecode> elements have the same "name" attribute, a formatter
   might assume that the elements are all fragments of a single file,
   and such a formatter can collect those fragments for later
   processing.


Kent




> On Mar 24, 2020, at 11:33 AM, Balázs Lengyel <balazs.lengyel=40ericsson.com@dmarc.ietf.org> wrote:
> 
> Hello,
> A reply from the rfc-editor on <CODE BEGINS>. It seems it is OK.
> Regards Balazs
> 
> -----Original Message-----
> From: Alice Russo <arusso@amsl.com> 
> Sent: 2020. március 24., kedd 16:00
> To: Balázs Lengyel <balazs.lengyel@ericsson.com>
> Cc: RFC Editor <rfc-editor@rfc-editor.org>
> Subject: Re: Where can I use <CODE BEGINS> <CODE ENDS> ?
> 
> Greetings,
> 
> Please see below.
> 
>> On Mar 21, 2020, at 8:30 AM, Balázs Lengyel <balazs.lengyel@ericsson.com> wrote:
>> 
>> Hello,
>> Sorry if I am sending this question to the wrong person. 
>> We have a discussion in the NETMOD workgroup about when is it appropriate/allowed to use the <CODE BEGINS> <CODE ENDS> markings in drafts and RFCs.
>> We regularly use it to bracket the YANG modules defined. 
>> e.g.    <CODE BEGINS> file "ietf-yang-instance-data@2020-03-19.yang" 
>> 
> 
> Just FYI, if you are using the new XML vocabulary [1], the markers can be created automatically by using markers="true"
> -- for example --
> <sourcecode name="ietf-yang-instance-data@2020-03-19.yang" type="yang" markers="true">
> 
>> However is it allowed to use it to bracket XML or json examples in drafts/rfcs? 
>> e.g.    <CODE BEGINS> file read-only-acm-rules@2020-03-19.xml
> 
> Yes, it is allowed. The markers <CODE BEGINS> and <CODE ENDS> are mentioned in the Trust Legal Provisions [2].
> 
> [1] https://protect2.fireeye.com/v1/url?k=50261255-0cacc750-502652ce-861010bc36ff-8b3716f9fa495535&q=1&e=11f6fa43-0168-4d1f-8f5d-bffd46fff0d3&u=https%3A%2F%2Fwww.rfc-editor.org%2Fmaterials%2FFAQ-xml2rfcv3.html
> [2] https://trustee.ietf.org/license-info/IETF-TLP-5.htm (item 4d)
> 
> Thank you.
> RFC Editor/ar
> 
>> 
>> It is very handy that the rfcstrip tool can extract the CODE sections from a draft which facilitates checking these by external tools like yanglint. The checking is needed both for the YANG modules and the examples.
>> If you as an rfc-editor could give guidance on the issue it would be appreciated. I attached a planned draft.
>> Best regards Balazs Lengyel 
>> 
>> -- 
>> Balazs Lengyel                    Senior Specialist                       Ericsson Hungary Ltd. 
>> Mobile: +36-70-330-7909              email: Balazs.Lengyel@ericsson.com
>> 
>> <draft-ietf-netmod-yang-instance-file-format-11.txt>
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod

_______________________________________________
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod