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

Balázs Lengyel <balazs.lengyel@ericsson.com> Thu, 26 March 2020 21:46 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 89A733A0DF6 for <netmod@ietfa.amsl.com>; Thu, 26 Mar 2020 14:46:00 -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=unavailable 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 fYt4Y_pJwpcm for <netmod@ietfa.amsl.com>; Thu, 26 Mar 2020 14:45:58 -0700 (PDT)
Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20080.outbound.protection.outlook.com [40.107.2.80]) (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 8DB3C3A0D0F for <netmod@ietf.org>; Thu, 26 Mar 2020 14:45:57 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c2+arMCMi3ReVdv8B2JpWaNuqDkr1FSqhyYLFu5S3pfAc4zyLCAni27kchUz939jmxV86wWOu/ikiyWvtSZjcnPV1ZlMBZX3qqxGl0Gdb1xLMy2+1RkHiOKEnmBusuDM6AV/C5kDRkVDd8nbRhTkl0gqRmSuSbZuaXBhY1fTTz+pgad7UQ4/DDRDNRO3DkRe1Fpt+/R7QnLP5OHbgbG+hvGgDW0G2vtz/3XEZ7UpunLMx4E4mLETc8rVXQbtuizmCyx6YlIpGAtRPGwsz4rcb8gcSQ9MG/yroMWVmavu5ROvbJ8v/+iAh1yOMYGXUf/NAGtPr9Yn+ygC3S7ad95mRg==
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=FQtIvn0aNCWcTMMaHHbMicJGyeSeFuuNk9939l1mUW0=; b=Xx0bFEddyyfQ0++wi4a8VvLFLACdoC8m3CQMhz+x6KOQkwWjC199x7KPAwlToz5Sw04LmoSgWIRblAo8cjjMc6CKUcn0Kf5PIGgaG27GKbud/uo6WU6bd5rIUZBXJ4FyeRYGJYhpps16YC6ARWhefec7mL1DgGnTsHAgg7q0Lz3Nz2sqXQB0KBLfHNzPY/MQQWGNeC122zOaZoe0VLOXOQtwaU0hLFbpgTSStcXcrrLJilbhI5nTNlzLM6L6GBwRzFJLUnHSsPBzmh5tRy7jxWC+FD7EyS7gqm6Fsfcbawtz2oMyKGIjb4OOPCZbWltUhRdMcj9pioM8bBzNTbBviA==
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=FQtIvn0aNCWcTMMaHHbMicJGyeSeFuuNk9939l1mUW0=; b=FNORIarQoKGZrDKWpMaabQ1VzyN+om0+ajZVOZovdC19Uo5KQLJmKM5y35m4K1D23iMQWuelXqGRMVs1TRDDjvQ+sMWeHE3U1my/J9m9T1jda7k41m+2NbA70Bsm2hVF4/yC0kPUbgY8QluMHrXZuTQ0Fr27KQemmDD7SwkQhAI=
Received: from DB7PR07MB4011.eurprd07.prod.outlook.com (52.134.97.155) by DB7PR07MB4122.eurprd07.prod.outlook.com (52.134.105.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2856.9; Thu, 26 Mar 2020 21:45:52 +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 21:45:52 +0000
From: =?utf-8?B?QmFsw6F6cyBMZW5neWVs?= <balazs.lengyel@ericsson.com>
To: =?utf-8?B?QmFsw6F6cyBMZW5neWVs?= <balazs.lengyel=40ericsson.com@dmarc.ietf.org>, Kent Watsen <kent@watsen.net>
CC: "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: [netmod] Where can I use <CODE BEGINS> <CODE ENDS> ?
Thread-Index: AdX/lKIsLy+ziTKqRA+fZO9j7aQG7ACWDxGAAAAySNAANyuOAAAjs38wABebYrA=
Date: Thu, 26 Mar 2020 21:45:52 +0000
Message-ID: <DB7PR07MB4011CD1D9F84D2E675B11583F0CF0@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> <DB7PR07MB4011C7CA9D64CDBAAF90A511F0CF0@DB7PR07MB4011.eurprd07.prod.outlook.com>
In-Reply-To: <DB7PR07MB4011C7CA9D64CDBAAF90A511F0CF0@DB7PR07MB4011.eurprd07.prod.outlook.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: 0e09f7d4-455f-4093-2ba3-08d7d1cf0e5d
x-ms-traffictypediagnostic: DB7PR07MB4122:
x-microsoft-antispam-prvs: <DB7PR07MB4122601DBF52B265325CE376F0CF0@DB7PR07MB4122.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)(346002)(376002)(366004)(39860400002)(396003)(9686003)(71200400001)(53546011)(66476007)(66556008)(66446008)(6506007)(81166006)(8676002)(85202003)(2906002)(66616009)(8936002)(66946007)(76116006)(81156014)(26005)(7696005)(64756008)(85182001)(52536014)(186003)(66574012)(110136005)(4326008)(478600001)(316002)(2940100002)(33656002)(55016002)(5660300002)(966005)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR07MB4122; 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: Cs2GBpfkWx64O7V/3q5dRFxSWBjXijc0uEWbKUwbXno/v3PZ6MnxpKKnyUclSUUOcbf1Z6W2/VCZgQRaOz7c35NgE7dQEALhm/1LUNvyPG72/jXwtj0JKBbzi0GexToMEZy6a0SAKz44lrhRFpPjitl1JPCd/2wB7EQI9SMnwzlNzAZ8gmqYVSshLwPZjcz7ZvorqueZezCwoU+OngXxXvlrysiijipDYN2Zx47vlP/d2o0ZfFhS9VjeQAeYLCYzo2d9QLXC68aYAZMVWU0BNIpNx4Z3R/4gzgaa1UsK7VaiPDMo6V/KBON+l3SfchvrMzqQ13iZm/XNj7zGV6QEyfCBkJW2llEXgufKqc+QDS9QA/I7kYawJLqI1PCB5UsRkmA/fWMRPAui3Yk4ZuoR8RwEvs2btyFwgH8kAnl2AQdwB+eBpMC7l5zpNmvgtCx15NSdE9P4uUm8uqN742MJI30TpfympEVgf3vD02vqAdEaynHCvi3l3Fg7IF6fr762cH7nckVID0dts8X2URPrDQ==
x-ms-exchange-antispam-messagedata: RGKuJBgQnru7VzaHkVZ+fNbKy9k9XQvpZSKCIT/wWGgO1IukJaIlybJa8KUhdBesPLD/Ao+3WclLvHKmoKurQc58XQfho8dVuj6kHZj+HNAPOa/KV/bx2CL4wnraAFCMwxqvYOsNiUnbeWHnY2eMtw==
x-ms-exchange-transport-forked: True
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg=SHA1; boundary="----=_NextPart_000_00C2_01D603C0.4C85F560"
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 0e09f7d4-455f-4093-2ba3-08d7d1cf0e5d
X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Mar 2020 21:45:52.2778 (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: 7ZxHY3tG46wN0fVBVxXAw3ckdBguaAmi4DvDXhQeULdb8JneOmqzPktjJzKaja0KGlyR1wo6k42nIwQJQhWr7pmfEVq2lhlcydVo1opAp4M=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR07MB4122
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/EVNDaOpyAYPW2x_W-JxQZNBadJo>
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 21:46:01 -0000

Hello,
I created an update to rfcstrip in Github.

Revision 1.1balazs - 2020-03-26
added -a option. If it is specified, the file must be an XML2RFC
XML file.
All artworks will be extracted from it if they carry a name attribute.
Artwork unfolding will also be executed.
If the artwork contains the , <CODE BEGIN/END> markers
they are removed.

Regards Balazs

-----Original Message-----
From: Balázs Lengyel <balazs.lengyel=40ericsson.com@dmarc.ietf.org> 
Sent: 2020. március 26., csütörtök 11:55
To: Kent Watsen <kent@watsen.net>et>; Balázs Lengyel <balazs.lengyel@ericsson.com>
Cc: netmod@ietf.org
Subject: RE: [netmod] Where can I use <CODE BEGINS> <CODE ENDS> ?

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