Re: [netmod] CODE BEGINS ENDS for examples ?

Ladislav Lhotka <lhotka@nic.cz> Mon, 23 March 2020 07:42 UTC

Return-Path: <lhotka@nic.cz>
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 263B93A088D for <netmod@ietfa.amsl.com>; Mon, 23 Mar 2020 00:42:48 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_NONE=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=nic.cz
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 0uX3L-suQepE for <netmod@ietfa.amsl.com>; Mon, 23 Mar 2020 00:42:41 -0700 (PDT)
Received: from mail.nic.cz (mail.nic.cz [IPv6:2001:1488:800:400::400]) (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 1299C3A0885 for <netmod@ietf.org>; Mon, 23 Mar 2020 00:42:29 -0700 (PDT)
Received: from birdie (unknown [IPv6:2001:1488:fffe:6:a88f:7eff:fed2:45f8]) by mail.nic.cz (Postfix) with ESMTPSA id 980E6143172; Mon, 23 Mar 2020 08:42:26 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1584949346; bh=6MKZY4U/IQD8qqKyCc5xjeJApV64xE9pWy2hxzVjBGI=; h=From:To:Date; b=XfuMX8bS3G+e5I6X5WS6j2ig31Ms0W1DAhaps/TA5NMxiKDQ9raWJ0fbIVxl3gYGQ nzhWpb0MxeurMOHskfk/Oox0I23IE1+DnrdonZKQswhIsFPt+W1Tm9mE2H6sWB+teN wcgMIjdoeXZY7C2a/qHPDonZaoR/f2mLdPLnajYY=
Message-ID: <041486ccaf132be0d8dda2da55b94a67d49d3c07.camel@nic.cz>
From: Ladislav Lhotka <lhotka@nic.cz>
To: =?ISO-8859-1?Q?Bal=E1zs?= Lengyel <balazs.lengyel=40ericsson.com@dmarc.ietf.org>, Kent Watsen <kent@watsen.net>
Cc: "netmod@ietf.org" <netmod@ietf.org>
Date: Mon, 23 Mar 2020 08:42:26 +0100
In-Reply-To: =?utf-8?q?=3CDB7PR07MB40114D8350A0E22F101A353DF0F20=40DB7PR07MB?= =?utf-8?q?4011=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_=3CDB7PR07MB40114D8350A0E22F101A353DF0F20=40DB7PR07MB4011=2Ee?= =?utf-8?q?urprd07=2Eprod=2Eoutlook=2Ecom=3E?=
Organization: CZ.NIC
Content-Type: text/plain; charset="UTF-8"
User-Agent: Evolution 3.36.0
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Virus-Scanned: clamav-milter 0.101.4 at mail
X-Virus-Status: Clean
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/kKkXlSIRg8AiiqRcfkl6K-uV7lM>
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: Mon, 23 Mar 2020 07:42:49 -0000

On Sat, 2020-03-21 at 14:56 +0000, Balázs Lengyel wrote:
> 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?

Note that according to Legal Provisions Relating to IETF Documents [1], the
<CODE BEGIN> ... <CODE END> tags demarcate "Code Components", so the license
provisions specified in that document apply.

Lada

[1] https://trustee.ietf.org/license-info/IETF-TLP-5.htm

>  
> 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> 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: Balazs.Lengyel@ericsson.com
> >  
> > _______________________________________________
> > 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
-- 
Ladislav Lhotka
Head, CZ.NIC Labs
PGP Key ID: 0xB8F92B08A9F76C67