Re: [netmod] CODE BEGINS ENDS for examples ?

Balázs Lengyel <balazs.lengyel@ericsson.com> Sat, 21 March 2020 14:56 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 775543A09A1 for <netmod@ietfa.amsl.com>; Sat, 21 Mar 2020 07:56:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.09
X-Spam-Level:
X-Spam-Status: No, score=-2.09 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, HTML_MESSAGE=0.001, SPF_PASS=-0.001, T_SPF_HELO_TEMPERROR=0.01, 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 FeXy1YbrVJ-Z for <netmod@ietfa.amsl.com>; Sat, 21 Mar 2020 07:56:48 -0700 (PDT)
Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150059.outbound.protection.outlook.com [40.107.15.59]) (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 1C2303A141C for <netmod@ietf.org>; Sat, 21 Mar 2020 07:56:47 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; =?utf-8?q?b=3DDain57Ku0b98ijvvvgJ2k4k33V9l3k4m7wIHXVxDwObimC5E+ROAOajmPnJHl?= =?utf-8?q?SyHvLvQe7g89BmpzxjuRti9S4kaBvfcqtRa4IxWPuqDdS/p6YPaqxz8pM1scksnUf?= =?utf-8?q?7fhuHzfddqAWIkbj1Sb9651Urr9AVWmgzAD3BqyIO5Hzhkj/+x+is2v+iFmWvWYSB?= =?utf-8?q?vv4VJhY+vHeNvztj6N3Tnw2OGEFR9dvu0hY4hDiiY/hYNYqdzpC+Zw/vwy3W/4GiH?= =?utf-8?q?AtjBnDqFAICm2qgXJjTx94S8WzvpNFCIZvJAd9Fmpqiq6hqymcL1dQJ1O/qdGjn/v?= =?utf-8?q?oX/q06YNVunnra70VH2mg=3D=3D?=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; =?utf-8?q?h=3DFrom=3ADate=3ASubject=3AMessage-ID=3ACont?= =?utf-8?q?ent-Type=3AMIME-Version=3AX-MS-Exchange-SenderADCheck=3B?= =?utf-8?q?bh=3DZaouxd5+wlhkhGxbeYwrER1sWRyKWARHzldPZo+Uwvk=3D=3B_b=3DW8XRdQ?= =?utf-8?q?/krhac532CHtXXKonxEMUJKr9gTYXW11kvT34rH1nZbQg7dP7/f7fp9X4Y40vZp0p?= =?utf-8?q?+5OVJJfYQy9rWsaZffsXR9pFcVNM1jDBxd25F7bEhghzyuNnx5EPVsCip50RG/jsw?= =?utf-8?q?eXyvlYmRcQuPEMqFp5X8Lz4fVqsF+7iKsnonFRS5ej8ZzZEr83Wtz7FljGhWGN+bP?= =?utf-8?q?FS+YmgX9e9TJbu5GnupKVzRBn2TK0FU4Ftfw/hlSMDy68GColkS54QrUtjnYJEYB7?= =?utf-8?q?I1TRDxgnRqlWy0cVnZ/UY6p9W8fPaxQZaj63ke19QRdqztf9hQT95y6VRytvBXIhM?= =?utf-8?q?xRK9oyiNzGg=3D=3D?=
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; =?utf-8?q?h=3DFrom=3ADate=3ASubject=3AMessage-ID=3AContent-Typ?= =?utf-8?q?e=3AMIME-Version=3AX-MS-Exchange-SenderADCheck=3B?= =?utf-8?q?bh=3DZaouxd5+wlhkhGxbeYwrER1sWRyKWARHzldPZo+Uwvk=3D=3B_b=3DfS5p8h?= =?utf-8?q?FCeck8wQEEHWGUJzzqb7cePbSldZioi/kDYrpmgw3U4933Ian09Mk7uHDVzkDxMFf?= =?utf-8?q?2AkjiiJiQue9lI6jpEs8cgZ3gzAd3oj6LYSX9qVrCNGQAxnRBq0VgQuV+66YpBnlF?= =?utf-8?q?lgN5KRxwEqWr1cwu/i0iuKCZDgxux+K/zvQ=3D?=
Received: from DB7PR07MB4011.eurprd07.prod.outlook.com (52.134.97.155) by DB7PR07MB6012.eurprd07.prod.outlook.com (20.178.85.211) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.12; Sat, 21 Mar 2020 14:56:45 +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.2835.013; Sat, 21 Mar 2020 14:56:45 +0000
From: =?utf-8?B?QmFsw6F6cyBMZW5neWVs?= <balazs.lengyel@ericsson.com>
To: Kent Watsen <kent@watsen.net>
CC: "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: [netmod] CODE BEGINS ENDS for examples ?
Thread-Index: AdX+14XchWpTwSP9TECumgI75/RSewAM+iUAACDzvqA=
Date: Sat, 21 Mar 2020 14:56:45 +0000
Message-ID: =?utf-8?q?=3CDB7PR07MB40114D8350A0E22F101A353DF0F20=40DB7PR07MB4?= =?utf-8?q?011=2Eeurprd07=2Eprod=2Eoutlook=2Ecom=3E?=
References: =?utf-8?q?=3CDB7PR07MB401126C42CF7ECA417BC82B5F0F50=40DB7PR07MB4?= =?utf-8?q?011=2Eeurprd07=2Eprod=2Eoutlook=2Ecom=3E_=3C01000170fa2db5c9-960b?= =?utf-8?q?7cf9-6e75-4cb4-a974-93703b852ab7-000000=40email=2Eamazonses=2Ecom?= =?utf-8?q?=3E?=
In-Reply-To: =?utf-8?q?=3C01000170fa2db5c9-960b7cf9-6e75-4cb4-a974-93703b852?= =?utf-8?q?ab7-000000=40email=2Eamazonses=2Ecom=3E?=
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: 45470bc4-240c-4b5c-117e-08d7cda812ea
x-ms-traffictypediagnostic: DB7PR07MB6012:
x-microsoft-antispam-prvs: =?utf-8?q?=3CDB7PR07MB60122FFC6DA055525E78BE0BF0F?= =?utf-8?q?20=40DB7PR07MB6012=2Eeurprd07=2Eprod=2Eoutlook=2Ecom=3E?=
x-ms-oob-tlc-oobclassifiers: OLM:9508;
x-forefront-prvs: 034902F5BC
x-forefront-antispam-report: SFV:NSPM; =?utf-8?q?SFS=3A=2810009020=29=284636?= =?utf-8?b?MDA5KSgzNDYwMDIpKDM5ODYwNDAwMDAyKSgzNzYwMDIpKDM5NjAwMykoMzY2?= =?utf-8?b?MDA0KSgxMzYwMDMpKDE5OTAwNCkoMjYwMDUpKDg2MzYyMDAxKSgxODYwMDMpKDQz?= =?utf-8?q?26008=29=2866574012=29=2885182001=29=2871200400001=29=28966005=29?= =?utf-8?b?KDgxMTU2MDE0KSg5Njg2MDAzKSg2NTA2MDA3KSg4OTM2MDAyKSg3Njk2MDA1KSg4?= =?utf-8?q?5202003=29=28316002=29=28478600001=29=282906002=29=2853546011=29?= =?utf-8?q?=2852536014=29=286916009=29=288676002=29=2876116006=29=2833656002?= =?utf-8?b?KSg2NjU1NjAwOCkoOTMyNjAwMikoNjY5NDYwMDcpKDY2NDc2MDA3KSg2NDc1?= =?utf-8?q?6008=29=2881166006=29=2866446008=29=2866616009=29=2855016002=29?= =?utf-8?q?=285660300002=29=3B?= DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR07MB6012; H:DB7PR07MB4011.eurprd07.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1;
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: =?utf-8?q?IKmYJD/khUgf+iBQEnv+llMlrtvwozh?= =?utf-8?q?zRgNR7ISr9KZBOSHW5tatmiNzpTy07PskCO9bzzpagRh0Bk4wwpC7m6afDSSHer4Y?= =?utf-8?q?0O2lw/d8SO04W4EWy07pxqlvjXzkF+3u3ulS5m8N7A34fymLLBHEy9IWx0NicjZ+l?= =?utf-8?q?vySqs8rxtyTrWDmDWxoR3VjmRpdRtVlMSK+j2tfpvR7i4iOiHkhmauVZtqgloJa5m?= =?utf-8?q?3S3/n5IuAUENZsKTo9NwArK4pqTu1avJnacPbTGxhbbeKx0cQEkUN1HNmVDp47rXw?= =?utf-8?q?N7EI9wgrlec3xFqDm9ceXlps/ZqmM8hsdPUo74H/tJfLy4/olf5qukSTgEAXc/xV/?= =?utf-8?q?EeSHkygryxYw/BgMCgz69vdqh4Nh5LEhh5hYoNEtj2E3qkJ0hEm7tfE8WwaouwmBB?= =?utf-8?q?CeArV4Svg0AGgCdboBiWXiUsXQupnEOqsz6At9ZENR47a5zOKxuu8KNiVu+wHR6SB?= =?utf-8?q?2dV8qzlkuzi7wV74UW0WkySMbATz3WVqOo28kiUc/MY7divg=3D=3D?=
x-ms-exchange-antispam-messagedata: =?utf-8?q?Je34e8UJO796pRw7H3UzhvxSD0C96g?= =?utf-8?q?bJxFL5ETiTkXhMPlpwYQJu6iaq4P/kYAPoD/Yj6RIQiQiAFQEIGFX3fQHE1GyFYoC?= =?utf-8?q?tVckginUwQBn5+hmBnM45VvkGdz0vUhCHOYfuhFWt+mzxvxPzFUcUZQ=3D=3D?=
x-ms-exchange-transport-forked: True
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg=SHA1; boundary="----=_NextPart_000_00CF_01D5FF99.513BF260"
MIME-Version: 1.0
X-OriginatorOrg: ericsson.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 45470bc4-240c-4b5c-117e-08d7cda812ea
X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Mar 2020 14:56:45.0534 (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: =?utf-8?q?fBoExoFvzJT68Tw5tC16C?= =?utf-8?q?SE4xjukPAPs+PeAGUZxZtMZhHHiMMywENSol172T60L1SSqwwvLbfH2zl0k65fpF2?= =?utf-8?q?FUkwRAwmydXjJWzVcKK+s=3D?=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR07MB6012
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/ur1nip7pTW7vGZa9ATQ9V94A0vI>
Subject: Re: [netmod] CODE BEGINS ENDS for 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: Sat, 21 Mar 2020 14:56:54 -0000

Hello Kent,

First <CODE BEGIN> <CODE END> is very handy and easier to use then xmllint.

Also some people (not me) are writing RFCs without XML. SO if it acceptable to you, the RFC editor to whoever I will use <CODE...> for the examples. Is that acceptable?

 

Folding:

Rfcfold folds the line at a fixed 69 character length. This produces some not so nice results:

Rfcfold:

    <inline-schema>

      <modules-state xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-li\

brary">

        <module>

Manual folding:

    <inline-schema>

      <modules-state \

          xmlns="urn:ietf:params:xml:ns:yang:ietf-yang-library">

        <module>

The manual folding can keep a nice tabulation and fold the line at a word or element boundary. I know such editorial niceties are very hard to program in a script; but this is one reason to do manual folding.

 

I used rfcfold to unfold the acme-router-modules example and I don’t notice anything strange.

Regards Balazs

 

From: Kent Watsen <kent@watsen.net> 
Sent: 2020. március 21., szombat 0:01
To: Balázs Lengyel <balazs.lengyel@ericsson.com>
Cc: netmod@ietf.org
Subject: Re: [netmod] CODE BEGINS ENDS for examples ?

 

Hi Balazs,

 

As I understand it, the <CODE BEGIN> <CODE END> blocks are not appropriate for examples. 

 

Examples are easily extracted from XML via `xmllint` with the “—xpath” parameter, after which the `rfcfold` script can be run.  Strongly recommend setting the “name” attribute on the <sourcecode> or <artwork> element in the XML draft.  It’s good to see that you want to do it this way, as I noticed you hand-folded the examples and I’m pretty sure I spotted what looked like might result in an undesirable unfolding artifact...

 

FWIW, https://pypi.org/project/xiax attempts to do all this, but I suspended that effort getting distracted with other things...

 

Kent // contributor

 

 





On Mar 20, 2020, at 1:02 PM, Balázs Lengyel <balazs.lengyel=40ericsson.com@dmarc.ietf.org <mailto:balazs.lengyel=40ericsson.com@dmarc.ietf.org> > wrote:

 

Hello,

Is it allowed/recommended to use <CODE BEGINS> <CODE ENDS> around examples. In my case it would be examples of XML and JSON instance data. I would find it rather useful.

 

As a second step if someone could combine rfcstrip with artwork-unfolding that would be even better.

Regards Balazs

 

-- 

Balazs Lengyel                    Senior Specialist                       Ericsson Hungary Ltd. 

Mobile: +36-70-330-7909              email:  <mailto:Balazs.Lengyel@ericsson.com> Balazs.Lengyel@ericsson.com

 

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